Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jplewa/f2a70a09ea6d460a2d5afa759e253df0 to your computer and use it in GitHub Desktop.
Save jplewa/f2a70a09ea6d460a2d5afa759e253df0 to your computer and use it in GitHub Desktop.
{
"name": "azure-native",
"displayName": "Azure Native",
"config": {
"variables": {
"auxiliaryTenantIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Any additional Tenant IDs which should be used for authentication."
},
"clientCertificatePassword": {
"type": "string",
"description": "The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate",
"secret": true
},
"clientCertificatePath": {
"type": "string",
"description": "The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate."
},
"clientId": {
"type": "string",
"description": "The Client ID which should be used.",
"secret": true
},
"clientSecret": {
"type": "string",
"description": "The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.",
"secret": true
},
"disablePulumiPartnerId": {
"type": "boolean",
"description": "This will disable the Pulumi Partner ID which is used if a custom `partnerId` isn't specified."
},
"environment": {
"type": "string",
"description": "The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public."
},
"location": {
"type": "string",
"description": "The location to use. ResourceGroups will consult this property for a default location, if one was not supplied explicitly when defining the resource."
},
"metadataHost": {
"type": "string",
"description": "The Hostname of the Azure Metadata Service."
},
"msiEndpoint": {
"type": "string",
"description": "The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically."
},
"oidcRequestToken": {
"type": "string",
"description": "Your cloud service or provider’s bearer token to exchange for an OIDC ID token."
},
"oidcRequestUrl": {
"type": "string",
"description": "The URL to initiate the OIDC token exchange. "
},
"oidcToken": {
"type": "string",
"description": "The OIDC token to exchange for an Azure token."
},
"partnerId": {
"type": "string",
"description": "A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution."
},
"subscriptionId": {
"type": "string",
"description": "The Subscription ID which should be used."
},
"tenantId": {
"type": "string",
"description": "The Tenant ID which should be used."
},
"useMsi": {
"type": "boolean",
"description": "Allow Managed Service Identity be used for Authentication."
},
"useOidc": {
"type": "boolean",
"description": "Allow OpenID Connect (OIDC) to be used for Authentication."
}
}
},
"language": {
"csharp": {
"namespaces": {
"aad": "Aad",
"aadiam": "AadIam",
"addons": "Addons",
"adhybridhealthservice": "ADHybridHealthService",
"advisor": "Advisor",
"agfoodplatform": "AgFoodPlatform",
"alertsmanagement": "AlertsManagement",
"analysisservices": "AnalysisServices",
"apicenter": "ApiCenter",
"apimanagement": "ApiManagement",
"app": "App",
"appcomplianceautomation": "AppComplianceAutomation",
"appconfiguration": "AppConfiguration",
"appplatform": "AppPlatform",
"attestation": "Attestation",
"authorization": "Authorization",
"automanage": "Automanage",
"automation": "Automation",
"autonomousdevelopmentplatform": "AutonomousDevelopmentPlatform",
"avs": "AVS",
"azure-native": "AzureNative",
"azureactivedirectory": "AzureActiveDirectory",
"azurearcdata": "AzureArcData",
"azuredata": "AzureData",
"azuredatatransfer": "AzureDataTransfer",
"azurelargeinstance": "AzureLargeInstance",
"azureplaywrightservice": "AzurePlaywrightService",
"azuresphere": "AzureSphere",
"azurestack": "AzureStack",
"azurestackhci": "AzureStackHCI",
"baremetalinfrastructure": "BareMetalInfrastructure",
"batch": "Batch",
"billing": "Billing",
"billingbenefits": "BillingBenefits",
"blockchain": "Blockchain",
"blueprint": "Blueprint",
"botservice": "BotService",
"cache": "Cache",
"capacity": "Capacity",
"carbon": "Carbon",
"cdn": "Cdn",
"certificateregistration": "CertificateRegistration",
"changeanalysis": "ChangeAnalysis",
"chaos": "Chaos",
"cloudngfw": "Cloudngfw",
"codesigning": "CodeSigning",
"cognitiveservices": "CognitiveServices",
"commerce": "Commerce",
"communication": "Communication",
"community": "Community",
"compute": "Compute",
"confidentialledger": "ConfidentialLedger",
"confluent": "Confluent",
"connectedvmwarevsphere": "ConnectedVMwarevSphere",
"consumption": "Consumption",
"containerinstance": "ContainerInstance",
"containerregistry": "ContainerRegistry",
"containerservice": "ContainerService",
"containerstorage": "ContainerStorage",
"costmanagement": "CostManagement",
"customerinsights": "CustomerInsights",
"customerlockbox": "CustomerLockbox",
"customproviders": "CustomProviders",
"dashboard": "Dashboard",
"databasewatcher": "DatabaseWatcher",
"databox": "DataBox",
"databoxedge": "DataBoxEdge",
"databricks": "Databricks",
"datacatalog": "DataCatalog",
"datadog": "Datadog",
"datafactory": "DataFactory",
"datalakeanalytics": "DataLakeAnalytics",
"datalakestore": "DataLakeStore",
"datamigration": "DataMigration",
"dataprotection": "DataProtection",
"datareplication": "DataReplication",
"datashare": "DataShare",
"dbformariadb": "DBforMariaDB",
"dbformysql": "DBforMySQL",
"dbforpostgresql": "DBforPostgreSQL",
"delegatednetwork": "DelegatedNetwork",
"desktopvirtualization": "DesktopVirtualization",
"devcenter": "DevCenter",
"devhub": "DevHub",
"deviceregistry": "DeviceRegistry",
"devices": "Devices",
"deviceupdate": "DeviceUpdate",
"devops": "DevOps",
"devopsinfrastructure": "DevOpsInfrastructure",
"devspaces": "DevSpaces",
"devtestlab": "DevTestLab",
"digitaltwins": "DigitalTwins",
"documentdb": "DocumentDB",
"domainregistration": "DomainRegistration",
"dynamics365fraudprotection": "Dynamics365Fraudprotection",
"dynamicstelemetry": "DynamicsTelemetry",
"easm": "Easm",
"edgemarketplace": "EdgeMarketplace",
"edgeorder": "EdgeOrder",
"edgeorderpartner": "EdgeOrderPartner",
"edgezones": "EdgeZones",
"education": "Education",
"elastic": "Elastic",
"elasticsan": "ElasticSan",
"engagementfabric": "EngagementFabric",
"enterpriseknowledgegraph": "EnterpriseKnowledgeGraph",
"eventgrid": "EventGrid",
"eventhub": "EventHub",
"extendedlocation": "ExtendedLocation",
"features": "Features",
"fluidrelay": "FluidRelay",
"graphservices": "GraphServices",
"guestconfiguration": "GuestConfiguration",
"hanaonazure": "HanaOnAzure",
"hardwaresecuritymodules": "HardwareSecurityModules",
"hdinsight": "HDInsight",
"healthbot": "HealthBot",
"healthcareapis": "HealthcareApis",
"help": "Help",
"hybridcloud": "HybridCloud",
"hybridcompute": "HybridCompute",
"hybridconnectivity": "HybridConnectivity",
"hybridcontainerservice": "HybridContainerService",
"hybriddata": "HybridData",
"hybridnetwork": "HybridNetwork",
"importexport": "ImportExport",
"insights": "Insights",
"integrationspaces": "IntegrationSpaces",
"intune": "Intune",
"iotcentral": "IoTCentral",
"iotfirmwaredefense": "IoTFirmwareDefense",
"iotoperationsdataprocessor": "IoTOperationsDataProcessor",
"iotoperationsmq": "IoTOperationsMQ",
"iotoperationsorchestrator": "IoTOperationsOrchestrator",
"keyvault": "KeyVault",
"kubernetes": "Kubernetes",
"kubernetesconfiguration": "KubernetesConfiguration",
"kubernetesruntime": "KubernetesRuntime",
"kusto": "Kusto",
"labservices": "LabServices",
"loadtestservice": "LoadTestService",
"logic": "Logic",
"logz": "Logz",
"m365securityandcompliance": "M365SecurityAndCompliance",
"machinelearning": "MachineLearning",
"machinelearningcompute": "MachineLearningCompute",
"machinelearningexperimentation": "MachineLearningExperimentation",
"machinelearningservices": "MachineLearningServices",
"maintenance": "Maintenance",
"managedidentity": "ManagedIdentity",
"managednetwork": "ManagedNetwork",
"managednetworkfabric": "ManagedNetworkFabric",
"managedservices": "ManagedServices",
"management": "Management",
"managementpartner": "ManagementPartner",
"maps": "Maps",
"marketplace": "Marketplace",
"marketplacenotifications": "MarketplaceNotifications",
"marketplaceordering": "MarketplaceOrdering",
"media": "Media",
"migrate": "Migrate",
"mixedreality": "MixedReality",
"mobilenetwork": "MobileNetwork",
"mobilepacketcore": "MobilePacketCore",
"monitor": "Monitor",
"netapp": "NetApp",
"network": "Network",
"networkanalytics": "NetworkAnalytics",
"networkcloud": "NetworkCloud",
"networkfunction": "NetworkFunction",
"notificationhubs": "NotificationHubs",
"offazure": "OffAzure",
"offazurespringboot": "OffAzureSpringBoot",
"openenergyplatform": "OpenEnergyPlatform",
"operationalinsights": "OperationalInsights",
"operationsmanagement": "OperationsManagement",
"orbital": "Orbital",
"peering": "Peering",
"policyinsights": "PolicyInsights",
"portal": "Portal",
"portalservices": "PortalServices",
"powerbi": "PowerBI",
"powerbidedicated": "PowerBIDedicated",
"powerplatform": "PowerPlatform",
"professionalservice": "ProfessionalService",
"providerhub": "ProviderHub",
"purview": "Purview",
"quantum": "Quantum",
"quota": "Quota",
"recommendationsservice": "RecommendationsService",
"recoveryservices": "RecoveryServices",
"redhatopenshift": "RedHatOpenShift",
"relay": "Relay",
"resourceconnector": "ResourceConnector",
"resourcegraph": "ResourceGraph",
"resourcehealth": "ResourceHealth",
"resources": "Resources",
"saas": "SaaS",
"scheduler": "Scheduler",
"scom": "Scom",
"scvmm": "ScVmm",
"search": "Search",
"security": "Security",
"securityandcompliance": "SecurityAndCompliance",
"securitydevops": "SecurityDevOps",
"securityinsights": "SecurityInsights",
"serialconsole": "SerialConsole",
"servicebus": "ServiceBus",
"servicefabric": "ServiceFabric",
"servicefabricmesh": "ServiceFabricMesh",
"servicelinker": "ServiceLinker",
"servicenetworking": "ServiceNetworking",
"signalrservice": "SignalRService",
"softwareplan": "SoftwarePlan",
"solutions": "Solutions",
"sql": "Sql",
"sqlvirtualmachine": "SqlVirtualMachine",
"standbypool": "StandbyPool",
"storage": "Storage",
"storageactions": "StorageActions",
"storagecache": "StorageCache",
"storagemover": "StorageMover",
"storagepool": "StoragePool",
"storagesync": "StorageSync",
"storsimple": "StorSimple",
"streamanalytics": "StreamAnalytics",
"subscription": "Subscription",
"support": "Support",
"synapse": "Synapse",
"syntex": "Syntex",
"testbase": "TestBase",
"timeseriesinsights": "TimeSeriesInsights",
"videoanalyzer": "VideoAnalyzer",
"videoindexer": "VideoIndexer",
"virtualmachineimages": "VirtualMachineImages",
"visualstudio": "VisualStudio",
"vmwarecloudsimple": "VMwareCloudSimple",
"voiceservices": "VoiceServices",
"web": "Web",
"webpubsub": "WebPubSub",
"windowsesu": "WindowsESU",
"windowsiot": "WindowsIoT",
"workloadmonitor": "WorkloadMonitor",
"workloads": "Workloads"
},
"packageReferences": {
"Pulumi": "3.*",
"System.Collections.Immutable": "5.0.0"
}
},
"go": {
"disableInputTypeRegistrations": true,
"generateResourceContainerTypes": false,
"importBasePath": "github.com/pulumi/pulumi-azure-native-sdk/v2",
"internalModuleName": "utilities",
"packageImportAliases": {
"github.com/pulumi/pulumi-azure-native-sdk/v2/aad/v2": "aad",
"github.com/pulumi/pulumi-azure-native-sdk/v2/aadiam/v2": "aadiam",
"github.com/pulumi/pulumi-azure-native-sdk/v2/addons/v2": "addons",
"github.com/pulumi/pulumi-azure-native-sdk/v2/adhybridhealthservice/v2": "adhybridhealthservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/advisor/v2": "advisor",
"github.com/pulumi/pulumi-azure-native-sdk/v2/agfoodplatform/v2": "agfoodplatform",
"github.com/pulumi/pulumi-azure-native-sdk/v2/alertsmanagement/v2": "alertsmanagement",
"github.com/pulumi/pulumi-azure-native-sdk/v2/analysisservices/v2": "analysisservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/apicenter/v2": "apicenter",
"github.com/pulumi/pulumi-azure-native-sdk/v2/apimanagement/v2": "apimanagement",
"github.com/pulumi/pulumi-azure-native-sdk/v2/app/v2": "app",
"github.com/pulumi/pulumi-azure-native-sdk/v2/appcomplianceautomation/v2": "appcomplianceautomation",
"github.com/pulumi/pulumi-azure-native-sdk/v2/appconfiguration/v2": "appconfiguration",
"github.com/pulumi/pulumi-azure-native-sdk/v2/appplatform/v2": "appplatform",
"github.com/pulumi/pulumi-azure-native-sdk/v2/attestation/v2": "attestation",
"github.com/pulumi/pulumi-azure-native-sdk/v2/authorization/v2": "authorization",
"github.com/pulumi/pulumi-azure-native-sdk/v2/automanage/v2": "automanage",
"github.com/pulumi/pulumi-azure-native-sdk/v2/automation/v2": "automation",
"github.com/pulumi/pulumi-azure-native-sdk/v2/autonomousdevelopmentplatform/v2": "autonomousdevelopmentplatform",
"github.com/pulumi/pulumi-azure-native-sdk/v2/avs/v2": "avs",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azureactivedirectory/v2": "azureactivedirectory",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azurearcdata/v2": "azurearcdata",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azuredata/v2": "azuredata",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azuredatatransfer/v2": "azuredatatransfer",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azurelargeinstance/v2": "azurelargeinstance",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azureplaywrightservice/v2": "azureplaywrightservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azuresphere/v2": "azuresphere",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azurestack/v2": "azurestack",
"github.com/pulumi/pulumi-azure-native-sdk/v2/azurestackhci/v2": "azurestackhci",
"github.com/pulumi/pulumi-azure-native-sdk/v2/baremetalinfrastructure/v2": "baremetalinfrastructure",
"github.com/pulumi/pulumi-azure-native-sdk/v2/batch/v2": "batch",
"github.com/pulumi/pulumi-azure-native-sdk/v2/billing/v2": "billing",
"github.com/pulumi/pulumi-azure-native-sdk/v2/billingbenefits/v2": "billingbenefits",
"github.com/pulumi/pulumi-azure-native-sdk/v2/blockchain/v2": "blockchain",
"github.com/pulumi/pulumi-azure-native-sdk/v2/blueprint/v2": "blueprint",
"github.com/pulumi/pulumi-azure-native-sdk/v2/botservice/v2": "botservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/cache/v2": "cache",
"github.com/pulumi/pulumi-azure-native-sdk/v2/capacity/v2": "capacity",
"github.com/pulumi/pulumi-azure-native-sdk/v2/carbon/v2": "carbon",
"github.com/pulumi/pulumi-azure-native-sdk/v2/cdn/v2": "cdn",
"github.com/pulumi/pulumi-azure-native-sdk/v2/certificateregistration/v2": "certificateregistration",
"github.com/pulumi/pulumi-azure-native-sdk/v2/changeanalysis/v2": "changeanalysis",
"github.com/pulumi/pulumi-azure-native-sdk/v2/chaos/v2": "chaos",
"github.com/pulumi/pulumi-azure-native-sdk/v2/cloudngfw/v2": "cloudngfw",
"github.com/pulumi/pulumi-azure-native-sdk/v2/codesigning/v2": "codesigning",
"github.com/pulumi/pulumi-azure-native-sdk/v2/cognitiveservices/v2": "cognitiveservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/commerce/v2": "commerce",
"github.com/pulumi/pulumi-azure-native-sdk/v2/communication/v2": "communication",
"github.com/pulumi/pulumi-azure-native-sdk/v2/community/v2": "community",
"github.com/pulumi/pulumi-azure-native-sdk/v2/compute/v2": "compute",
"github.com/pulumi/pulumi-azure-native-sdk/v2/confidentialledger/v2": "confidentialledger",
"github.com/pulumi/pulumi-azure-native-sdk/v2/confluent/v2": "confluent",
"github.com/pulumi/pulumi-azure-native-sdk/v2/connectedvmwarevsphere/v2": "connectedvmwarevsphere",
"github.com/pulumi/pulumi-azure-native-sdk/v2/consumption/v2": "consumption",
"github.com/pulumi/pulumi-azure-native-sdk/v2/containerinstance/v2": "containerinstance",
"github.com/pulumi/pulumi-azure-native-sdk/v2/containerregistry/v2": "containerregistry",
"github.com/pulumi/pulumi-azure-native-sdk/v2/containerservice/v2": "containerservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/containerstorage/v2": "containerstorage",
"github.com/pulumi/pulumi-azure-native-sdk/v2/costmanagement/v2": "costmanagement",
"github.com/pulumi/pulumi-azure-native-sdk/v2/customerinsights/v2": "customerinsights",
"github.com/pulumi/pulumi-azure-native-sdk/v2/customerlockbox/v2": "customerlockbox",
"github.com/pulumi/pulumi-azure-native-sdk/v2/customproviders/v2": "customproviders",
"github.com/pulumi/pulumi-azure-native-sdk/v2/dashboard/v2": "dashboard",
"github.com/pulumi/pulumi-azure-native-sdk/v2/databasewatcher/v2": "databasewatcher",
"github.com/pulumi/pulumi-azure-native-sdk/v2/databox/v2": "databox",
"github.com/pulumi/pulumi-azure-native-sdk/v2/databoxedge/v2": "databoxedge",
"github.com/pulumi/pulumi-azure-native-sdk/v2/databricks/v2": "databricks",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datacatalog/v2": "datacatalog",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datadog/v2": "datadog",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datafactory/v2": "datafactory",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datalakeanalytics/v2": "datalakeanalytics",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datalakestore/v2": "datalakestore",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datamigration/v2": "datamigration",
"github.com/pulumi/pulumi-azure-native-sdk/v2/dataprotection/v2": "dataprotection",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datareplication/v2": "datareplication",
"github.com/pulumi/pulumi-azure-native-sdk/v2/datashare/v2": "datashare",
"github.com/pulumi/pulumi-azure-native-sdk/v2/dbformariadb/v2": "dbformariadb",
"github.com/pulumi/pulumi-azure-native-sdk/v2/dbformysql/v2": "dbformysql",
"github.com/pulumi/pulumi-azure-native-sdk/v2/dbforpostgresql/v2": "dbforpostgresql",
"github.com/pulumi/pulumi-azure-native-sdk/v2/delegatednetwork/v2": "delegatednetwork",
"github.com/pulumi/pulumi-azure-native-sdk/v2/desktopvirtualization/v2": "desktopvirtualization",
"github.com/pulumi/pulumi-azure-native-sdk/v2/devcenter/v2": "devcenter",
"github.com/pulumi/pulumi-azure-native-sdk/v2/devhub/v2": "devhub",
"github.com/pulumi/pulumi-azure-native-sdk/v2/deviceregistry/v2": "deviceregistry",
"github.com/pulumi/pulumi-azure-native-sdk/v2/devices/v2": "devices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/deviceupdate/v2": "deviceupdate",
"github.com/pulumi/pulumi-azure-native-sdk/v2/devops/v2": "devops",
"github.com/pulumi/pulumi-azure-native-sdk/v2/devopsinfrastructure/v2": "devopsinfrastructure",
"github.com/pulumi/pulumi-azure-native-sdk/v2/devspaces/v2": "devspaces",
"github.com/pulumi/pulumi-azure-native-sdk/v2/devtestlab/v2": "devtestlab",
"github.com/pulumi/pulumi-azure-native-sdk/v2/digitaltwins/v2": "digitaltwins",
"github.com/pulumi/pulumi-azure-native-sdk/v2/documentdb/v2": "documentdb",
"github.com/pulumi/pulumi-azure-native-sdk/v2/domainregistration/v2": "domainregistration",
"github.com/pulumi/pulumi-azure-native-sdk/v2/dynamics365fraudprotection/v2": "dynamics365fraudprotection",
"github.com/pulumi/pulumi-azure-native-sdk/v2/dynamicstelemetry/v2": "dynamicstelemetry",
"github.com/pulumi/pulumi-azure-native-sdk/v2/easm/v2": "easm",
"github.com/pulumi/pulumi-azure-native-sdk/v2/edgemarketplace/v2": "edgemarketplace",
"github.com/pulumi/pulumi-azure-native-sdk/v2/edgeorder/v2": "edgeorder",
"github.com/pulumi/pulumi-azure-native-sdk/v2/edgeorderpartner/v2": "edgeorderpartner",
"github.com/pulumi/pulumi-azure-native-sdk/v2/edgezones/v2": "edgezones",
"github.com/pulumi/pulumi-azure-native-sdk/v2/education/v2": "education",
"github.com/pulumi/pulumi-azure-native-sdk/v2/elastic/v2": "elastic",
"github.com/pulumi/pulumi-azure-native-sdk/v2/elasticsan/v2": "elasticsan",
"github.com/pulumi/pulumi-azure-native-sdk/v2/engagementfabric/v2": "engagementfabric",
"github.com/pulumi/pulumi-azure-native-sdk/v2/enterpriseknowledgegraph/v2": "enterpriseknowledgegraph",
"github.com/pulumi/pulumi-azure-native-sdk/v2/eventgrid/v2": "eventgrid",
"github.com/pulumi/pulumi-azure-native-sdk/v2/eventhub/v2": "eventhub",
"github.com/pulumi/pulumi-azure-native-sdk/v2/extendedlocation/v2": "extendedlocation",
"github.com/pulumi/pulumi-azure-native-sdk/v2/features/v2": "features",
"github.com/pulumi/pulumi-azure-native-sdk/v2/fluidrelay/v2": "fluidrelay",
"github.com/pulumi/pulumi-azure-native-sdk/v2/graphservices/v2": "graphservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/guestconfiguration/v2": "guestconfiguration",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hanaonazure/v2": "hanaonazure",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hardwaresecuritymodules/v2": "hardwaresecuritymodules",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hdinsight/v2": "hdinsight",
"github.com/pulumi/pulumi-azure-native-sdk/v2/healthbot/v2": "healthbot",
"github.com/pulumi/pulumi-azure-native-sdk/v2/healthcareapis/v2": "healthcareapis",
"github.com/pulumi/pulumi-azure-native-sdk/v2/help/v2": "help",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hybridcloud/v2": "hybridcloud",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hybridcompute/v2": "hybridcompute",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hybridconnectivity/v2": "hybridconnectivity",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hybridcontainerservice/v2": "hybridcontainerservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hybriddata/v2": "hybriddata",
"github.com/pulumi/pulumi-azure-native-sdk/v2/hybridnetwork/v2": "hybridnetwork",
"github.com/pulumi/pulumi-azure-native-sdk/v2/importexport/v2": "importexport",
"github.com/pulumi/pulumi-azure-native-sdk/v2/insights/v2": "insights",
"github.com/pulumi/pulumi-azure-native-sdk/v2/integrationspaces/v2": "integrationspaces",
"github.com/pulumi/pulumi-azure-native-sdk/v2/intune/v2": "intune",
"github.com/pulumi/pulumi-azure-native-sdk/v2/iotcentral/v2": "iotcentral",
"github.com/pulumi/pulumi-azure-native-sdk/v2/iotfirmwaredefense/v2": "iotfirmwaredefense",
"github.com/pulumi/pulumi-azure-native-sdk/v2/iotoperationsdataprocessor/v2": "iotoperationsdataprocessor",
"github.com/pulumi/pulumi-azure-native-sdk/v2/iotoperationsmq/v2": "iotoperationsmq",
"github.com/pulumi/pulumi-azure-native-sdk/v2/iotoperationsorchestrator/v2": "iotoperationsorchestrator",
"github.com/pulumi/pulumi-azure-native-sdk/v2/keyvault/v2": "keyvault",
"github.com/pulumi/pulumi-azure-native-sdk/v2/kubernetes/v2": "kubernetes",
"github.com/pulumi/pulumi-azure-native-sdk/v2/kubernetesconfiguration/v2": "kubernetesconfiguration",
"github.com/pulumi/pulumi-azure-native-sdk/v2/kubernetesruntime/v2": "kubernetesruntime",
"github.com/pulumi/pulumi-azure-native-sdk/v2/kusto/v2": "kusto",
"github.com/pulumi/pulumi-azure-native-sdk/v2/labservices/v2": "labservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/loadtestservice/v2": "loadtestservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/logic/v2": "logic",
"github.com/pulumi/pulumi-azure-native-sdk/v2/logz/v2": "logz",
"github.com/pulumi/pulumi-azure-native-sdk/v2/m365securityandcompliance/v2": "m365securityandcompliance",
"github.com/pulumi/pulumi-azure-native-sdk/v2/machinelearning/v2": "machinelearning",
"github.com/pulumi/pulumi-azure-native-sdk/v2/machinelearningcompute/v2": "machinelearningcompute",
"github.com/pulumi/pulumi-azure-native-sdk/v2/machinelearningexperimentation/v2": "machinelearningexperimentation",
"github.com/pulumi/pulumi-azure-native-sdk/v2/machinelearningservices/v2": "machinelearningservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/maintenance/v2": "maintenance",
"github.com/pulumi/pulumi-azure-native-sdk/v2/managedidentity/v2": "managedidentity",
"github.com/pulumi/pulumi-azure-native-sdk/v2/managednetwork/v2": "managednetwork",
"github.com/pulumi/pulumi-azure-native-sdk/v2/managednetworkfabric/v2": "managednetworkfabric",
"github.com/pulumi/pulumi-azure-native-sdk/v2/managedservices/v2": "managedservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/management/v2": "management",
"github.com/pulumi/pulumi-azure-native-sdk/v2/managementpartner/v2": "managementpartner",
"github.com/pulumi/pulumi-azure-native-sdk/v2/maps/v2": "maps",
"github.com/pulumi/pulumi-azure-native-sdk/v2/marketplace/v2": "marketplace",
"github.com/pulumi/pulumi-azure-native-sdk/v2/marketplacenotifications/v2": "marketplacenotifications",
"github.com/pulumi/pulumi-azure-native-sdk/v2/marketplaceordering/v2": "marketplaceordering",
"github.com/pulumi/pulumi-azure-native-sdk/v2/media/v2": "media",
"github.com/pulumi/pulumi-azure-native-sdk/v2/migrate/v2": "migrate",
"github.com/pulumi/pulumi-azure-native-sdk/v2/mixedreality/v2": "mixedreality",
"github.com/pulumi/pulumi-azure-native-sdk/v2/mobilenetwork/v2": "mobilenetwork",
"github.com/pulumi/pulumi-azure-native-sdk/v2/mobilepacketcore/v2": "mobilepacketcore",
"github.com/pulumi/pulumi-azure-native-sdk/v2/monitor/v2": "monitor",
"github.com/pulumi/pulumi-azure-native-sdk/v2/netapp/v2": "netapp",
"github.com/pulumi/pulumi-azure-native-sdk/v2/network/v2": "network",
"github.com/pulumi/pulumi-azure-native-sdk/v2/networkanalytics/v2": "networkanalytics",
"github.com/pulumi/pulumi-azure-native-sdk/v2/networkcloud/v2": "networkcloud",
"github.com/pulumi/pulumi-azure-native-sdk/v2/networkfunction/v2": "networkfunction",
"github.com/pulumi/pulumi-azure-native-sdk/v2/notificationhubs/v2": "notificationhubs",
"github.com/pulumi/pulumi-azure-native-sdk/v2/offazure/v2": "offazure",
"github.com/pulumi/pulumi-azure-native-sdk/v2/offazurespringboot/v2": "offazurespringboot",
"github.com/pulumi/pulumi-azure-native-sdk/v2/openenergyplatform/v2": "openenergyplatform",
"github.com/pulumi/pulumi-azure-native-sdk/v2/operationalinsights/v2": "operationalinsights",
"github.com/pulumi/pulumi-azure-native-sdk/v2/operationsmanagement/v2": "operationsmanagement",
"github.com/pulumi/pulumi-azure-native-sdk/v2/orbital/v2": "orbital",
"github.com/pulumi/pulumi-azure-native-sdk/v2/peering/v2": "peering",
"github.com/pulumi/pulumi-azure-native-sdk/v2/policyinsights/v2": "policyinsights",
"github.com/pulumi/pulumi-azure-native-sdk/v2/portal/v2": "portal",
"github.com/pulumi/pulumi-azure-native-sdk/v2/portalservices/v2": "portalservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/powerbi/v2": "powerbi",
"github.com/pulumi/pulumi-azure-native-sdk/v2/powerbidedicated/v2": "powerbidedicated",
"github.com/pulumi/pulumi-azure-native-sdk/v2/powerplatform/v2": "powerplatform",
"github.com/pulumi/pulumi-azure-native-sdk/v2/professionalservice/v2": "professionalservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/providerhub/v2": "providerhub",
"github.com/pulumi/pulumi-azure-native-sdk/v2/purview/v2": "purview",
"github.com/pulumi/pulumi-azure-native-sdk/v2/quantum/v2": "quantum",
"github.com/pulumi/pulumi-azure-native-sdk/v2/quota/v2": "quota",
"github.com/pulumi/pulumi-azure-native-sdk/v2/recommendationsservice/v2": "recommendationsservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/recoveryservices/v2": "recoveryservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/redhatopenshift/v2": "redhatopenshift",
"github.com/pulumi/pulumi-azure-native-sdk/v2/relay/v2": "relay",
"github.com/pulumi/pulumi-azure-native-sdk/v2/resourceconnector/v2": "resourceconnector",
"github.com/pulumi/pulumi-azure-native-sdk/v2/resourcegraph/v2": "resourcegraph",
"github.com/pulumi/pulumi-azure-native-sdk/v2/resourcehealth/v2": "resourcehealth",
"github.com/pulumi/pulumi-azure-native-sdk/v2/resources/v2": "resources",
"github.com/pulumi/pulumi-azure-native-sdk/v2/saas/v2": "saas",
"github.com/pulumi/pulumi-azure-native-sdk/v2/scheduler/v2": "scheduler",
"github.com/pulumi/pulumi-azure-native-sdk/v2/scom/v2": "scom",
"github.com/pulumi/pulumi-azure-native-sdk/v2/scvmm/v2": "scvmm",
"github.com/pulumi/pulumi-azure-native-sdk/v2/search/v2": "search",
"github.com/pulumi/pulumi-azure-native-sdk/v2/security/v2": "security",
"github.com/pulumi/pulumi-azure-native-sdk/v2/securityandcompliance/v2": "securityandcompliance",
"github.com/pulumi/pulumi-azure-native-sdk/v2/securitydevops/v2": "securitydevops",
"github.com/pulumi/pulumi-azure-native-sdk/v2/securityinsights/v2": "securityinsights",
"github.com/pulumi/pulumi-azure-native-sdk/v2/serialconsole/v2": "serialconsole",
"github.com/pulumi/pulumi-azure-native-sdk/v2/servicebus/v2": "servicebus",
"github.com/pulumi/pulumi-azure-native-sdk/v2/servicefabric/v2": "servicefabric",
"github.com/pulumi/pulumi-azure-native-sdk/v2/servicefabricmesh/v2": "servicefabricmesh",
"github.com/pulumi/pulumi-azure-native-sdk/v2/servicelinker/v2": "servicelinker",
"github.com/pulumi/pulumi-azure-native-sdk/v2/servicenetworking/v2": "servicenetworking",
"github.com/pulumi/pulumi-azure-native-sdk/v2/signalrservice/v2": "signalrservice",
"github.com/pulumi/pulumi-azure-native-sdk/v2/softwareplan/v2": "softwareplan",
"github.com/pulumi/pulumi-azure-native-sdk/v2/solutions/v2": "solutions",
"github.com/pulumi/pulumi-azure-native-sdk/v2/sql/v2": "sql",
"github.com/pulumi/pulumi-azure-native-sdk/v2/sqlvirtualmachine/v2": "sqlvirtualmachine",
"github.com/pulumi/pulumi-azure-native-sdk/v2/standbypool/v2": "standbypool",
"github.com/pulumi/pulumi-azure-native-sdk/v2/storage/v2": "storage",
"github.com/pulumi/pulumi-azure-native-sdk/v2/storageactions/v2": "storageactions",
"github.com/pulumi/pulumi-azure-native-sdk/v2/storagecache/v2": "storagecache",
"github.com/pulumi/pulumi-azure-native-sdk/v2/storagemover/v2": "storagemover",
"github.com/pulumi/pulumi-azure-native-sdk/v2/storagepool/v2": "storagepool",
"github.com/pulumi/pulumi-azure-native-sdk/v2/storagesync/v2": "storagesync",
"github.com/pulumi/pulumi-azure-native-sdk/v2/storsimple/v2": "storsimple",
"github.com/pulumi/pulumi-azure-native-sdk/v2/streamanalytics/v2": "streamanalytics",
"github.com/pulumi/pulumi-azure-native-sdk/v2/subscription/v2": "subscription",
"github.com/pulumi/pulumi-azure-native-sdk/v2/support/v2": "support",
"github.com/pulumi/pulumi-azure-native-sdk/v2/synapse/v2": "synapse",
"github.com/pulumi/pulumi-azure-native-sdk/v2/syntex/v2": "syntex",
"github.com/pulumi/pulumi-azure-native-sdk/v2/testbase/v2": "testbase",
"github.com/pulumi/pulumi-azure-native-sdk/v2/timeseriesinsights/v2": "timeseriesinsights",
"github.com/pulumi/pulumi-azure-native-sdk/v2/videoanalyzer/v2": "videoanalyzer",
"github.com/pulumi/pulumi-azure-native-sdk/v2/videoindexer/v2": "videoindexer",
"github.com/pulumi/pulumi-azure-native-sdk/v2/virtualmachineimages/v2": "virtualmachineimages",
"github.com/pulumi/pulumi-azure-native-sdk/v2/visualstudio/v2": "visualstudio",
"github.com/pulumi/pulumi-azure-native-sdk/v2/vmwarecloudsimple/v2": "vmwarecloudsimple",
"github.com/pulumi/pulumi-azure-native-sdk/v2/voiceservices/v2": "voiceservices",
"github.com/pulumi/pulumi-azure-native-sdk/v2/web/v2": "web",
"github.com/pulumi/pulumi-azure-native-sdk/v2/webpubsub/v2": "webpubsub",
"github.com/pulumi/pulumi-azure-native-sdk/v2/windowsesu/v2": "windowsesu",
"github.com/pulumi/pulumi-azure-native-sdk/v2/windowsiot/v2": "windowsiot",
"github.com/pulumi/pulumi-azure-native-sdk/v2/workloadmonitor/v2": "workloadmonitor",
"github.com/pulumi/pulumi-azure-native-sdk/v2/workloads/v2": "workloads"
},
"rootPackageName": "pulumiazurenativesdk"
},
"java": {
"packages": {
"aad": "aad",
"aadiam": "aadiam",
"addons": "addons",
"adhybridhealthservice": "adhybridhealthservice",
"advisor": "advisor",
"agfoodplatform": "agfoodplatform",
"alertsmanagement": "alertsmanagement",
"analysisservices": "analysisservices",
"apicenter": "apicenter",
"apimanagement": "apimanagement",
"app": "app",
"appcomplianceautomation": "appcomplianceautomation",
"appconfiguration": "appconfiguration",
"appplatform": "appplatform",
"attestation": "attestation",
"authorization": "authorization",
"automanage": "automanage",
"automation": "automation",
"autonomousdevelopmentplatform": "autonomousdevelopmentplatform",
"avs": "avs",
"azure-native": "azurenative",
"azureactivedirectory": "azureactivedirectory",
"azurearcdata": "azurearcdata",
"azuredata": "azuredata",
"azuredatatransfer": "azuredatatransfer",
"azurelargeinstance": "azurelargeinstance",
"azureplaywrightservice": "azureplaywrightservice",
"azuresphere": "azuresphere",
"azurestack": "azurestack",
"azurestackhci": "azurestackhci",
"baremetalinfrastructure": "baremetalinfrastructure",
"batch": "batch",
"billing": "billing",
"billingbenefits": "billingbenefits",
"blockchain": "blockchain",
"blueprint": "blueprint",
"botservice": "botservice",
"cache": "cache",
"capacity": "capacity",
"carbon": "carbon",
"cdn": "cdn",
"certificateregistration": "certificateregistration",
"changeanalysis": "changeanalysis",
"chaos": "chaos",
"cloudngfw": "cloudngfw",
"codesigning": "codesigning",
"cognitiveservices": "cognitiveservices",
"commerce": "commerce",
"communication": "communication",
"community": "community",
"compute": "compute",
"confidentialledger": "confidentialledger",
"confluent": "confluent",
"connectedvmwarevsphere": "connectedvmwarevsphere",
"consumption": "consumption",
"containerinstance": "containerinstance",
"containerregistry": "containerregistry",
"containerservice": "containerservice",
"containerstorage": "containerstorage",
"costmanagement": "costmanagement",
"customerinsights": "customerinsights",
"customerlockbox": "customerlockbox",
"customproviders": "customproviders",
"dashboard": "dashboard",
"databasewatcher": "databasewatcher",
"databox": "databox",
"databoxedge": "databoxedge",
"databricks": "databricks",
"datacatalog": "datacatalog",
"datadog": "datadog",
"datafactory": "datafactory",
"datalakeanalytics": "datalakeanalytics",
"datalakestore": "datalakestore",
"datamigration": "datamigration",
"dataprotection": "dataprotection",
"datareplication": "datareplication",
"datashare": "datashare",
"dbformariadb": "dbformariadb",
"dbformysql": "dbformysql",
"dbforpostgresql": "dbforpostgresql",
"delegatednetwork": "delegatednetwork",
"desktopvirtualization": "desktopvirtualization",
"devcenter": "devcenter",
"devhub": "devhub",
"deviceregistry": "deviceregistry",
"devices": "devices",
"deviceupdate": "deviceupdate",
"devops": "devops",
"devopsinfrastructure": "devopsinfrastructure",
"devspaces": "devspaces",
"devtestlab": "devtestlab",
"digitaltwins": "digitaltwins",
"documentdb": "documentdb",
"domainregistration": "domainregistration",
"dynamics365fraudprotection": "dynamics365fraudprotection",
"dynamicstelemetry": "dynamicstelemetry",
"easm": "easm",
"edgemarketplace": "edgemarketplace",
"edgeorder": "edgeorder",
"edgeorderpartner": "edgeorderpartner",
"edgezones": "edgezones",
"education": "education",
"elastic": "elastic",
"elasticsan": "elasticsan",
"engagementfabric": "engagementfabric",
"enterpriseknowledgegraph": "enterpriseknowledgegraph",
"eventgrid": "eventgrid",
"eventhub": "eventhub",
"extendedlocation": "extendedlocation",
"features": "features",
"fluidrelay": "fluidrelay",
"graphservices": "graphservices",
"guestconfiguration": "guestconfiguration",
"hanaonazure": "hanaonazure",
"hardwaresecuritymodules": "hardwaresecuritymodules",
"hdinsight": "hdinsight",
"healthbot": "healthbot",
"healthcareapis": "healthcareapis",
"help": "help",
"hybridcloud": "hybridcloud",
"hybridcompute": "hybridcompute",
"hybridconnectivity": "hybridconnectivity",
"hybridcontainerservice": "hybridcontainerservice",
"hybriddata": "hybriddata",
"hybridnetwork": "hybridnetwork",
"importexport": "importexport",
"insights": "insights",
"integrationspaces": "integrationspaces",
"intune": "intune",
"iotcentral": "iotcentral",
"iotfirmwaredefense": "iotfirmwaredefense",
"iotoperationsdataprocessor": "iotoperationsdataprocessor",
"iotoperationsmq": "iotoperationsmq",
"iotoperationsorchestrator": "iotoperationsorchestrator",
"keyvault": "keyvault",
"kubernetes": "kubernetes",
"kubernetesconfiguration": "kubernetesconfiguration",
"kubernetesruntime": "kubernetesruntime",
"kusto": "kusto",
"labservices": "labservices",
"loadtestservice": "loadtestservice",
"logic": "logic",
"logz": "logz",
"m365securityandcompliance": "m365securityandcompliance",
"machinelearning": "machinelearning",
"machinelearningcompute": "machinelearningcompute",
"machinelearningexperimentation": "machinelearningexperimentation",
"machinelearningservices": "machinelearningservices",
"maintenance": "maintenance",
"managedidentity": "managedidentity",
"managednetwork": "managednetwork",
"managednetworkfabric": "managednetworkfabric",
"managedservices": "managedservices",
"management": "management",
"managementpartner": "managementpartner",
"maps": "maps",
"marketplace": "marketplace",
"marketplacenotifications": "marketplacenotifications",
"marketplaceordering": "marketplaceordering",
"media": "media",
"migrate": "migrate",
"mixedreality": "mixedreality",
"mobilenetwork": "mobilenetwork",
"mobilepacketcore": "mobilepacketcore",
"monitor": "monitor",
"netapp": "netapp",
"network": "network",
"networkanalytics": "networkanalytics",
"networkcloud": "networkcloud",
"networkfunction": "networkfunction",
"notificationhubs": "notificationhubs",
"offazure": "offazure",
"offazurespringboot": "offazurespringboot",
"openenergyplatform": "openenergyplatform",
"operationalinsights": "operationalinsights",
"operationsmanagement": "operationsmanagement",
"orbital": "orbital",
"peering": "peering",
"policyinsights": "policyinsights",
"portal": "portal",
"portalservices": "portalservices",
"powerbi": "powerbi",
"powerbidedicated": "powerbidedicated",
"powerplatform": "powerplatform",
"professionalservice": "professionalservice",
"providerhub": "providerhub",
"purview": "purview",
"quantum": "quantum",
"quota": "quota",
"recommendationsservice": "recommendationsservice",
"recoveryservices": "recoveryservices",
"redhatopenshift": "redhatopenshift",
"relay": "relay",
"resourceconnector": "resourceconnector",
"resourcegraph": "resourcegraph",
"resourcehealth": "resourcehealth",
"resources": "resources",
"saas": "saas",
"scheduler": "scheduler",
"scom": "scom",
"scvmm": "scvmm",
"search": "search",
"security": "security",
"securityandcompliance": "securityandcompliance",
"securitydevops": "securitydevops",
"securityinsights": "securityinsights",
"serialconsole": "serialconsole",
"servicebus": "servicebus",
"servicefabric": "servicefabric",
"servicefabricmesh": "servicefabricmesh",
"servicelinker": "servicelinker",
"servicenetworking": "servicenetworking",
"signalrservice": "signalrservice",
"softwareplan": "softwareplan",
"solutions": "solutions",
"sql": "sql",
"sqlvirtualmachine": "sqlvirtualmachine",
"standbypool": "standbypool",
"storage": "storage",
"storageactions": "storageactions",
"storagecache": "storagecache",
"storagemover": "storagemover",
"storagepool": "storagepool",
"storagesync": "storagesync",
"storsimple": "storsimple",
"streamanalytics": "streamanalytics",
"subscription": "subscription",
"support": "support",
"synapse": "synapse",
"syntex": "syntex",
"testbase": "testbase",
"timeseriesinsights": "timeseriesinsights",
"videoanalyzer": "videoanalyzer",
"videoindexer": "videoindexer",
"virtualmachineimages": "virtualmachineimages",
"visualstudio": "visualstudio",
"vmwarecloudsimple": "vmwarecloudsimple",
"voiceservices": "voiceservices",
"web": "web",
"webpubsub": "webpubsub",
"windowsesu": "windowsesu",
"windowsiot": "windowsiot",
"workloadmonitor": "workloadmonitor",
"workloads": "workloads"
}
},
"nodejs": {
"dependencies": {
"@pulumi/pulumi": "^3.0.0"
},
"readme": "The native Azure provider package offers support for all Azure Resource Manager (ARM)\nresources and their properties. Resources are exposed as types from modules based on Azure Resource\nProviders such as 'compute', 'network', 'storage', and 'web', among many others. Using this package\nallows you to programmatically declare instances of any Azure resource and any supported resource\nversion using infrastructure as code, which Pulumi then uses to drive the ARM API."
},
"python": {
"moduleNameOverrides": {
"aad": "aad",
"aadiam": "aadiam",
"addons": "addons",
"adhybridhealthservice": "adhybridhealthservice",
"advisor": "advisor",
"agfoodplatform": "agfoodplatform",
"alertsmanagement": "alertsmanagement",
"analysisservices": "analysisservices",
"apicenter": "apicenter",
"apimanagement": "apimanagement",
"app": "app",
"appcomplianceautomation": "appcomplianceautomation",
"appconfiguration": "appconfiguration",
"appplatform": "appplatform",
"attestation": "attestation",
"authorization": "authorization",
"automanage": "automanage",
"automation": "automation",
"autonomousdevelopmentplatform": "autonomousdevelopmentplatform",
"avs": "avs",
"azureactivedirectory": "azureactivedirectory",
"azurearcdata": "azurearcdata",
"azuredata": "azuredata",
"azuredatatransfer": "azuredatatransfer",
"azurelargeinstance": "azurelargeinstance",
"azureplaywrightservice": "azureplaywrightservice",
"azuresphere": "azuresphere",
"azurestack": "azurestack",
"azurestackhci": "azurestackhci",
"baremetalinfrastructure": "baremetalinfrastructure",
"batch": "batch",
"billing": "billing",
"billingbenefits": "billingbenefits",
"blockchain": "blockchain",
"blueprint": "blueprint",
"botservice": "botservice",
"cache": "cache",
"capacity": "capacity",
"carbon": "carbon",
"cdn": "cdn",
"certificateregistration": "certificateregistration",
"changeanalysis": "changeanalysis",
"chaos": "chaos",
"cloudngfw": "cloudngfw",
"codesigning": "codesigning",
"cognitiveservices": "cognitiveservices",
"commerce": "commerce",
"communication": "communication",
"community": "community",
"compute": "compute",
"confidentialledger": "confidentialledger",
"confluent": "confluent",
"connectedvmwarevsphere": "connectedvmwarevsphere",
"consumption": "consumption",
"containerinstance": "containerinstance",
"containerregistry": "containerregistry",
"containerservice": "containerservice",
"containerstorage": "containerstorage",
"costmanagement": "costmanagement",
"customerinsights": "customerinsights",
"customerlockbox": "customerlockbox",
"customproviders": "customproviders",
"dashboard": "dashboard",
"databasewatcher": "databasewatcher",
"databox": "databox",
"databoxedge": "databoxedge",
"databricks": "databricks",
"datacatalog": "datacatalog",
"datadog": "datadog",
"datafactory": "datafactory",
"datalakeanalytics": "datalakeanalytics",
"datalakestore": "datalakestore",
"datamigration": "datamigration",
"dataprotection": "dataprotection",
"datareplication": "datareplication",
"datashare": "datashare",
"dbformariadb": "dbformariadb",
"dbformysql": "dbformysql",
"dbforpostgresql": "dbforpostgresql",
"delegatednetwork": "delegatednetwork",
"desktopvirtualization": "desktopvirtualization",
"devcenter": "devcenter",
"devhub": "devhub",
"deviceregistry": "deviceregistry",
"devices": "devices",
"deviceupdate": "deviceupdate",
"devops": "devops",
"devopsinfrastructure": "devopsinfrastructure",
"devspaces": "devspaces",
"devtestlab": "devtestlab",
"digitaltwins": "digitaltwins",
"documentdb": "documentdb",
"domainregistration": "domainregistration",
"dynamics365fraudprotection": "dynamics365fraudprotection",
"dynamicstelemetry": "dynamicstelemetry",
"easm": "easm",
"edgemarketplace": "edgemarketplace",
"edgeorder": "edgeorder",
"edgeorderpartner": "edgeorderpartner",
"edgezones": "edgezones",
"education": "education",
"elastic": "elastic",
"elasticsan": "elasticsan",
"engagementfabric": "engagementfabric",
"enterpriseknowledgegraph": "enterpriseknowledgegraph",
"eventgrid": "eventgrid",
"eventhub": "eventhub",
"extendedlocation": "extendedlocation",
"features": "features",
"fluidrelay": "fluidrelay",
"graphservices": "graphservices",
"guestconfiguration": "guestconfiguration",
"hanaonazure": "hanaonazure",
"hardwaresecuritymodules": "hardwaresecuritymodules",
"hdinsight": "hdinsight",
"healthbot": "healthbot",
"healthcareapis": "healthcareapis",
"help": "help",
"hybridcloud": "hybridcloud",
"hybridcompute": "hybridcompute",
"hybridconnectivity": "hybridconnectivity",
"hybridcontainerservice": "hybridcontainerservice",
"hybriddata": "hybriddata",
"hybridnetwork": "hybridnetwork",
"importexport": "importexport",
"insights": "insights",
"integrationspaces": "integrationspaces",
"intune": "intune",
"iotcentral": "iotcentral",
"iotfirmwaredefense": "iotfirmwaredefense",
"iotoperationsdataprocessor": "iotoperationsdataprocessor",
"iotoperationsmq": "iotoperationsmq",
"iotoperationsorchestrator": "iotoperationsorchestrator",
"keyvault": "keyvault",
"kubernetes": "kubernetes",
"kubernetesconfiguration": "kubernetesconfiguration",
"kubernetesruntime": "kubernetesruntime",
"kusto": "kusto",
"labservices": "labservices",
"loadtestservice": "loadtestservice",
"logic": "logic",
"logz": "logz",
"m365securityandcompliance": "m365securityandcompliance",
"machinelearning": "machinelearning",
"machinelearningcompute": "machinelearningcompute",
"machinelearningexperimentation": "machinelearningexperimentation",
"machinelearningservices": "machinelearningservices",
"maintenance": "maintenance",
"managedidentity": "managedidentity",
"managednetwork": "managednetwork",
"managednetworkfabric": "managednetworkfabric",
"managedservices": "managedservices",
"management": "management",
"managementpartner": "managementpartner",
"maps": "maps",
"marketplace": "marketplace",
"marketplacenotifications": "marketplacenotifications",
"marketplaceordering": "marketplaceordering",
"media": "media",
"migrate": "migrate",
"mixedreality": "mixedreality",
"mobilenetwork": "mobilenetwork",
"mobilepacketcore": "mobilepacketcore",
"monitor": "monitor",
"netapp": "netapp",
"network": "network",
"networkanalytics": "networkanalytics",
"networkcloud": "networkcloud",
"networkfunction": "networkfunction",
"notificationhubs": "notificationhubs",
"offazure": "offazure",
"offazurespringboot": "offazurespringboot",
"openenergyplatform": "openenergyplatform",
"operationalinsights": "operationalinsights",
"operationsmanagement": "operationsmanagement",
"orbital": "orbital",
"peering": "peering",
"policyinsights": "policyinsights",
"portal": "portal",
"portalservices": "portalservices",
"powerbi": "powerbi",
"powerbidedicated": "powerbidedicated",
"powerplatform": "powerplatform",
"professionalservice": "professionalservice",
"providerhub": "providerhub",
"purview": "purview",
"quantum": "quantum",
"quota": "quota",
"recommendationsservice": "recommendationsservice",
"recoveryservices": "recoveryservices",
"redhatopenshift": "redhatopenshift",
"relay": "relay",
"resourceconnector": "resourceconnector",
"resourcegraph": "resourcegraph",
"resourcehealth": "resourcehealth",
"resources": "resources",
"saas": "saas",
"scheduler": "scheduler",
"scom": "scom",
"scvmm": "scvmm",
"search": "search",
"security": "security",
"securityandcompliance": "securityandcompliance",
"securitydevops": "securitydevops",
"securityinsights": "securityinsights",
"serialconsole": "serialconsole",
"servicebus": "servicebus",
"servicefabric": "servicefabric",
"servicefabricmesh": "servicefabricmesh",
"servicelinker": "servicelinker",
"servicenetworking": "servicenetworking",
"signalrservice": "signalrservice",
"softwareplan": "softwareplan",
"solutions": "solutions",
"sql": "sql",
"sqlvirtualmachine": "sqlvirtualmachine",
"standbypool": "standbypool",
"storage": "storage",
"storageactions": "storageactions",
"storagecache": "storagecache",
"storagemover": "storagemover",
"storagepool": "storagepool",
"storagesync": "storagesync",
"storsimple": "storsimple",
"streamanalytics": "streamanalytics",
"subscription": "subscription",
"support": "support",
"synapse": "synapse",
"syntex": "syntex",
"testbase": "testbase",
"timeseriesinsights": "timeseriesinsights",
"videoanalyzer": "videoanalyzer",
"videoindexer": "videoindexer",
"virtualmachineimages": "virtualmachineimages",
"visualstudio": "visualstudio",
"vmwarecloudsimple": "vmwarecloudsimple",
"voiceservices": "voiceservices",
"web": "web",
"webpubsub": "webpubsub",
"windowsesu": "windowsesu",
"windowsiot": "windowsiot",
"workloadmonitor": "workloadmonitor",
"workloads": "workloads"
},
"pyproject": {
"enabled": true
},
"readme": "The native Azure provider package offers support for all Azure Resource Manager (ARM)\nresources and their properties. Resources are exposed as types from modules based on Azure Resource\nProviders such as 'compute', 'network', 'storage', and 'web', among many others. Using this package\nallows you to programmatically declare instances of any Azure resource and any supported resource\nversion using infrastructure as code, which Pulumi then uses to drive the ARM API.",
"requires": {
"pulumi": ">=3.35.0,<4.0.0"
},
"usesIOClasses": true
}
},
"provider": {
"description": "The provider type for the native Azure package.",
"type": "object",
"inputProperties": {
"auxiliaryTenantIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Any additional Tenant IDs which should be used for authentication."
},
"clientCertificatePassword": {
"type": "string",
"description": "The password associated with the Client Certificate. For use when authenticating as a Service Principal using a Client Certificate",
"secret": true
},
"clientCertificatePath": {
"type": "string",
"description": "The path to the Client Certificate associated with the Service Principal for use when authenticating as a Service Principal using a Client Certificate."
},
"clientId": {
"type": "string",
"description": "The Client ID which should be used.",
"secret": true
},
"clientSecret": {
"type": "string",
"description": "The Client Secret which should be used. For use When authenticating as a Service Principal using a Client Secret.",
"secret": true
},
"disablePulumiPartnerId": {
"type": "boolean",
"description": "This will disable the Pulumi Partner ID which is used if a custom `partnerId` isn't specified."
},
"environment": {
"type": "string",
"description": "The Cloud Environment which should be used. Possible values are public, usgovernment, and china. Defaults to public.",
"default": "public"
},
"location": {
"type": "string",
"description": "The location to use. ResourceGroups will consult this property for a default location, if one was not supplied explicitly when defining the resource."
},
"metadataHost": {
"type": "string",
"description": "The Hostname of the Azure Metadata Service."
},
"msiEndpoint": {
"type": "string",
"description": "The path to a custom endpoint for Managed Service Identity - in most circumstances this should be detected automatically."
},
"oidcRequestToken": {
"type": "string",
"description": "Your cloud service or provider’s bearer token to exchange for an OIDC ID token."
},
"oidcRequestUrl": {
"type": "string",
"description": "The URL to initiate the `oidcRequestToken` OIDC token exchange."
},
"oidcToken": {
"type": "string",
"description": "The OIDC token to exchange for an Azure token."
},
"partnerId": {
"type": "string",
"description": "A GUID/UUID that is registered with Microsoft to facilitate partner resource usage attribution."
},
"subscriptionId": {
"type": "string",
"description": "The Subscription ID which should be used."
},
"tenantId": {
"type": "string",
"description": "The Tenant ID which should be used."
},
"useMsi": {
"type": "boolean",
"description": "Allow Managed Service Identity to be used for Authentication.",
"default": false
},
"useOidc": {
"type": "boolean",
"description": "Allow OpenID Connect (OIDC) to be used for Authentication.",
"default": false
}
}
},
"types": {
"azure-native:compute:AdditionalCapabilities": {
"description": "Enables or disables a capability on the virtual machine or virtual machine scale set.",
"properties": {
"hibernationEnabled": {
"type": "boolean",
"description": "The flag that enables or disables hibernation capability on the VM."
},
"ultraSSDEnabled": {
"type": "boolean",
"description": "The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled."
}
},
"type": "object"
},
"azure-native:compute:AdditionalCapabilitiesResponse": {
"description": "Enables or disables a capability on the virtual machine or virtual machine scale set.",
"properties": {
"hibernationEnabled": {
"type": "boolean",
"description": "The flag that enables or disables hibernation capability on the VM."
},
"ultraSSDEnabled": {
"type": "boolean",
"description": "The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled."
}
},
"type": "object"
},
"azure-native:compute:AdditionalUnattendContent": {
"description": "Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.",
"properties": {
"componentName": {
"$ref": "#/types/azure-native:compute:ComponentNames",
"description": "The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup."
},
"content": {
"type": "string",
"description": "Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted."
},
"passName": {
"$ref": "#/types/azure-native:compute:PassNames",
"description": "The pass name. Currently, the only allowable value is OobeSystem."
},
"settingName": {
"$ref": "#/types/azure-native:compute:SettingNames",
"description": "Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon."
}
},
"type": "object"
},
"azure-native:compute:AdditionalUnattendContentResponse": {
"description": "Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.",
"properties": {
"componentName": {
"type": "string",
"description": "The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup."
},
"content": {
"type": "string",
"description": "Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted."
},
"passName": {
"type": "string",
"description": "The pass name. Currently, the only allowable value is OobeSystem."
},
"settingName": {
"type": "string",
"description": "Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon."
}
},
"type": "object"
},
"azure-native:compute:ApiErrorBaseResponse": {
"description": "Api error base.",
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"description": "The target of the particular error."
}
},
"type": "object"
},
"azure-native:compute:ApiErrorResponse": {
"description": "Api error.",
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:ApiErrorBaseResponse"
},
"description": "The Api error details"
},
"innererror": {
"type": "object",
"$ref": "#/types/azure-native:compute:InnerErrorResponse",
"description": "The Api inner error"
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"description": "The target of the particular error."
}
},
"type": "object"
},
"azure-native:compute:ApplicationProfile": {
"description": "Contains the list of gallery applications that should be made available to the VM/VMSS",
"properties": {
"galleryApplications": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VMGalleryApplication"
},
"description": "Specifies the gallery applications that should be made available to the VM/VMSS"
}
},
"type": "object"
},
"azure-native:compute:ApplicationProfileResponse": {
"description": "Contains the list of gallery applications that should be made available to the VM/VMSS",
"properties": {
"galleryApplications": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VMGalleryApplicationResponse"
},
"description": "Specifies the gallery applications that should be made available to the VM/VMSS"
}
},
"type": "object"
},
"azure-native:compute:AvailablePatchSummaryResponse": {
"description": "Describes the properties of an virtual machine instance view for available patch summary.",
"properties": {
"assessmentActivityId": {
"type": "string",
"description": "The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs."
},
"criticalAndSecurityPatchCount": {
"type": "integer",
"description": "The number of critical or security patches that have been detected as available and not yet installed."
},
"error": {
"type": "object",
"$ref": "#/types/azure-native:compute:ApiErrorResponse",
"description": "The errors that were encountered during execution of the operation. The details array contains the list of them."
},
"lastModifiedTime": {
"type": "string",
"description": "The UTC timestamp when the operation began."
},
"otherPatchCount": {
"type": "integer",
"description": "The number of all available patches excluding critical and security."
},
"rebootPending": {
"type": "boolean",
"description": "The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred."
},
"startTime": {
"type": "string",
"description": "The UTC timestamp when the operation began."
},
"status": {
"type": "string",
"description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\""
}
},
"type": "object",
"required": [
"assessmentActivityId",
"criticalAndSecurityPatchCount",
"error",
"lastModifiedTime",
"otherPatchCount",
"rebootPending",
"startTime",
"status"
]
},
"azure-native:compute:BillingProfile": {
"description": "Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.",
"properties": {
"maxPrice": {
"type": "number",
"description": "Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01."
}
},
"type": "object"
},
"azure-native:compute:BillingProfileResponse": {
"description": "Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.",
"properties": {
"maxPrice": {
"type": "number",
"description": "Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars. <br><br> This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price. <br><br> The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS. <br><br> Possible values are: <br><br> - Any decimal value greater than zero. Example: 0.01538 <br><br> -1 – indicates default price to be up-to on-demand. <br><br> You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you. <br><br>Minimum api-version: 2019-03-01."
}
},
"type": "object"
},
"azure-native:compute:BootDiagnostics": {
"description": "Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether boot diagnostics should be enabled on the Virtual Machine."
},
"storageUri": {
"type": "string",
"description": "Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used."
}
},
"type": "object"
},
"azure-native:compute:BootDiagnosticsInstanceViewResponse": {
"description": "The instance view of a virtual machine boot diagnostics.",
"properties": {
"consoleScreenshotBlobUri": {
"type": "string",
"description": "The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage."
},
"serialConsoleLogBlobUri": {
"type": "string",
"description": "The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage."
},
"status": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse",
"description": "The boot diagnostics status information for the VM. **Note:** It will be set only if there are errors encountered in enabling boot diagnostics."
}
},
"type": "object",
"required": [
"consoleScreenshotBlobUri",
"serialConsoleLogBlobUri",
"status"
]
},
"azure-native:compute:BootDiagnosticsResponse": {
"description": "Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether boot diagnostics should be enabled on the Virtual Machine."
},
"storageUri": {
"type": "string",
"description": "Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used."
}
},
"type": "object"
},
"azure-native:compute:CachingTypes": {
"description": "Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**",
"type": "string",
"enum": [
{
"value": "None"
},
{
"value": "ReadOnly"
},
{
"value": "ReadWrite"
}
]
},
"azure-native:compute:CapacityReservationProfile": {
"description": "The parameters of a capacity reservation Profile.",
"properties": {
"capacityReservationGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details."
}
},
"type": "object"
},
"azure-native:compute:CapacityReservationProfileResponse": {
"description": "The parameters of a capacity reservation Profile.",
"properties": {
"capacityReservationGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details."
}
},
"type": "object"
},
"azure-native:compute:ComponentNames": {
"description": "The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.",
"type": "string",
"enum": [
{
"value": "Microsoft-Windows-Shell-Setup"
}
]
},
"azure-native:compute:DataDisk": {
"description": "Describes a data disk.",
"properties": {
"caching": {
"$ref": "#/types/azure-native:compute:CachingTypes",
"description": "Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**"
},
"createOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiskCreateOptionTypes"
}
],
"description": "Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described."
},
"deleteOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiskDeleteOptionTypes"
}
],
"description": "Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**."
},
"detachOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiskDetachOptionTypes"
}
],
"description": "Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'."
},
"diskSizeGB": {
"type": "integer",
"description": "Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023."
},
"image": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDisk",
"description": "The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist."
},
"lun": {
"type": "integer",
"description": "Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM."
},
"managedDisk": {
"type": "object",
"$ref": "#/types/azure-native:compute:ManagedDiskParameters",
"description": "The managed disk parameters."
},
"name": {
"type": "string",
"description": "The disk name."
},
"toBeDetached": {
"type": "boolean",
"description": "Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset"
},
"vhd": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDisk",
"description": "The virtual hard disk."
},
"writeAcceleratorEnabled": {
"type": "boolean",
"description": "Specifies whether writeAccelerator should be enabled or disabled on the disk."
}
},
"type": "object",
"required": [
"createOption",
"lun"
]
},
"azure-native:compute:DataDiskResponse": {
"description": "Describes a data disk.",
"properties": {
"caching": {
"type": "string",
"description": "Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**"
},
"createOption": {
"type": "string",
"description": "Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described."
},
"deleteOption": {
"type": "string",
"description": "Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**."
},
"detachOption": {
"type": "string",
"description": "Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'."
},
"diskIOPSReadWrite": {
"type": "number",
"description": "Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set."
},
"diskMBpsReadWrite": {
"type": "number",
"description": "Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set."
},
"diskSizeGB": {
"type": "integer",
"description": "Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023."
},
"image": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDiskResponse",
"description": "The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist."
},
"lun": {
"type": "integer",
"description": "Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM."
},
"managedDisk": {
"type": "object",
"$ref": "#/types/azure-native:compute:ManagedDiskParametersResponse",
"description": "The managed disk parameters."
},
"name": {
"type": "string",
"description": "The disk name."
},
"toBeDetached": {
"type": "boolean",
"description": "Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset"
},
"vhd": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDiskResponse",
"description": "The virtual hard disk."
},
"writeAcceleratorEnabled": {
"type": "boolean",
"description": "Specifies whether writeAccelerator should be enabled or disabled on the disk."
}
},
"type": "object",
"required": [
"createOption",
"diskIOPSReadWrite",
"diskMBpsReadWrite",
"lun"
]
},
"azure-native:compute:DeleteOptions": {
"description": "Specify what happens to the public IP when the VM is deleted",
"type": "string",
"enum": [
{
"value": "Delete"
},
{
"value": "Detach"
}
]
},
"azure-native:compute:DiagnosticsProfile": {
"description": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.",
"properties": {
"bootDiagnostics": {
"type": "object",
"$ref": "#/types/azure-native:compute:BootDiagnostics",
"description": "Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor."
}
},
"type": "object"
},
"azure-native:compute:DiagnosticsProfileResponse": {
"description": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.",
"properties": {
"bootDiagnostics": {
"type": "object",
"$ref": "#/types/azure-native:compute:BootDiagnosticsResponse",
"description": "Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor."
}
},
"type": "object"
},
"azure-native:compute:DiffDiskOptions": {
"description": "Specifies the ephemeral disk settings for operating system disk.",
"type": "string",
"enum": [
{
"value": "Local"
}
]
},
"azure-native:compute:DiffDiskPlacement": {
"description": "Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk.",
"type": "string",
"enum": [
{
"value": "CacheDisk"
},
{
"value": "ResourceDisk"
}
]
},
"azure-native:compute:DiffDiskSettings": {
"description": "Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk.",
"properties": {
"option": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiffDiskOptions"
}
],
"description": "Specifies the ephemeral disk settings for operating system disk."
},
"placement": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiffDiskPlacement"
}
],
"description": "Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk."
}
},
"type": "object"
},
"azure-native:compute:DiffDiskSettingsResponse": {
"description": "Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk.",
"properties": {
"option": {
"type": "string",
"description": "Specifies the ephemeral disk settings for operating system disk."
},
"placement": {
"type": "string",
"description": "Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk."
}
},
"type": "object"
},
"azure-native:compute:DiskControllerTypes": {
"description": "Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.",
"type": "string",
"enum": [
{
"value": "SCSI"
},
{
"value": "NVMe"
}
]
},
"azure-native:compute:DiskCreateOptionTypes": {
"description": "Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described.",
"type": "string",
"enum": [
{
"value": "FromImage"
},
{
"value": "Empty"
},
{
"value": "Attach"
}
]
},
"azure-native:compute:DiskDeleteOptionTypes": {
"description": "Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk.",
"type": "string",
"enum": [
{
"value": "Delete"
},
{
"value": "Detach"
}
]
},
"azure-native:compute:DiskDetachOptionTypes": {
"description": "Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.",
"type": "string",
"enum": [
{
"value": "ForceDetach"
}
]
},
"azure-native:compute:DiskEncryptionSetParameters": {
"description": "Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.",
"properties": {
"id": {
"type": "string",
"description": "Resource Id"
}
},
"type": "object"
},
"azure-native:compute:DiskEncryptionSetParametersResponse": {
"description": "Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.",
"properties": {
"id": {
"type": "string",
"description": "Resource Id"
}
},
"type": "object"
},
"azure-native:compute:DiskEncryptionSettings": {
"description": "Describes a Encryption Settings for a Disk",
"properties": {
"diskEncryptionKey": {
"type": "object",
"$ref": "#/types/azure-native:compute:KeyVaultSecretReference",
"description": "Specifies the location of the disk encryption key, which is a Key Vault Secret."
},
"enabled": {
"type": "boolean",
"description": "Specifies whether disk encryption should be enabled on the virtual machine."
},
"keyEncryptionKey": {
"type": "object",
"$ref": "#/types/azure-native:compute:KeyVaultKeyReference",
"description": "Specifies the location of the key encryption key in Key Vault."
}
},
"type": "object"
},
"azure-native:compute:DiskEncryptionSettingsResponse": {
"description": "Describes a Encryption Settings for a Disk",
"properties": {
"diskEncryptionKey": {
"type": "object",
"$ref": "#/types/azure-native:compute:KeyVaultSecretReferenceResponse",
"description": "Specifies the location of the disk encryption key, which is a Key Vault Secret."
},
"enabled": {
"type": "boolean",
"description": "Specifies whether disk encryption should be enabled on the virtual machine."
},
"keyEncryptionKey": {
"type": "object",
"$ref": "#/types/azure-native:compute:KeyVaultKeyReferenceResponse",
"description": "Specifies the location of the key encryption key in Key Vault."
}
},
"type": "object"
},
"azure-native:compute:DiskInstanceViewResponse": {
"description": "The instance view of the disk.",
"properties": {
"encryptionSettings": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskEncryptionSettingsResponse"
},
"description": "Specifies the encryption settings for the OS Disk. <br><br> Minimum api-version: 2015-06-15"
},
"name": {
"type": "string",
"description": "The disk name."
},
"statuses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse"
},
"description": "The resource status information."
}
},
"type": "object"
},
"azure-native:compute:ExtendedLocation": {
"description": "The complex type of the extended location.",
"properties": {
"name": {
"type": "string",
"description": "The name of the extended location."
},
"type": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:ExtendedLocationTypes"
}
],
"description": "The type of the extended location."
}
},
"type": "object"
},
"azure-native:compute:ExtendedLocationResponse": {
"description": "The complex type of the extended location.",
"properties": {
"name": {
"type": "string",
"description": "The name of the extended location."
},
"type": {
"type": "string",
"description": "The type of the extended location."
}
},
"type": "object"
},
"azure-native:compute:ExtendedLocationTypes": {
"description": "The type of the extended location.",
"type": "string",
"enum": [
{
"value": "EdgeZone"
}
]
},
"azure-native:compute:HardwareProfile": {
"description": "Specifies the hardware settings for the virtual machine.",
"properties": {
"vmSize": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:VirtualMachineSizeTypes"
}
],
"description": "Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set."
},
"vmSizeProperties": {
"type": "object",
"$ref": "#/types/azure-native:compute:VMSizeProperties",
"description": "Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details."
}
},
"type": "object"
},
"azure-native:compute:HardwareProfileResponse": {
"description": "Specifies the hardware settings for the virtual machine.",
"properties": {
"vmSize": {
"type": "string",
"description": "Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set."
},
"vmSizeProperties": {
"type": "object",
"$ref": "#/types/azure-native:compute:VMSizePropertiesResponse",
"description": "Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details."
}
},
"type": "object"
},
"azure-native:compute:IPVersions": {
"description": "Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.",
"type": "string",
"enum": [
{
"value": "IPv4"
},
{
"value": "IPv6"
}
]
},
"azure-native:compute:ImageReference": {
"description": "Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.",
"properties": {
"communityGalleryImageId": {
"type": "string",
"description": "Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call."
},
"id": {
"type": "string",
"description": "Resource Id"
},
"offer": {
"type": "string",
"description": "Specifies the offer of the platform image or marketplace image used to create the virtual machine."
},
"publisher": {
"type": "string",
"description": "The image publisher."
},
"sharedGalleryImageId": {
"type": "string",
"description": "Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call."
},
"sku": {
"type": "string",
"description": "The image SKU."
},
"version": {
"type": "string",
"description": "Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input."
}
},
"type": "object"
},
"azure-native:compute:ImageReferenceResponse": {
"description": "Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.",
"properties": {
"communityGalleryImageId": {
"type": "string",
"description": "Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call."
},
"exactVersion": {
"type": "string",
"description": "Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'."
},
"id": {
"type": "string",
"description": "Resource Id"
},
"offer": {
"type": "string",
"description": "Specifies the offer of the platform image or marketplace image used to create the virtual machine."
},
"publisher": {
"type": "string",
"description": "The image publisher."
},
"sharedGalleryImageId": {
"type": "string",
"description": "Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call."
},
"sku": {
"type": "string",
"description": "The image SKU."
},
"version": {
"type": "string",
"description": "Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input."
}
},
"type": "object",
"required": [
"exactVersion"
]
},
"azure-native:compute:InnerErrorResponse": {
"description": "Inner error details.",
"properties": {
"errordetail": {
"type": "string",
"description": "The internal error message or exception dump."
},
"exceptiontype": {
"type": "string",
"description": "The exception type."
}
},
"type": "object"
},
"azure-native:compute:InstanceViewStatusResponse": {
"description": "Instance view status.",
"properties": {
"code": {
"type": "string",
"description": "The status code."
},
"displayStatus": {
"type": "string",
"description": "The short localizable label for the status."
},
"level": {
"type": "string",
"description": "The level code."
},
"message": {
"type": "string",
"description": "The detailed status message, including for alerts and error messages."
},
"time": {
"type": "string",
"description": "The time of the status."
}
},
"type": "object"
},
"azure-native:compute:KeyVaultKeyReference": {
"description": "Describes a reference to Key Vault Key",
"properties": {
"keyUrl": {
"type": "string",
"description": "The URL referencing a key encryption key in Key Vault."
},
"sourceVault": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "The relative URL of the Key Vault containing the key."
}
},
"type": "object",
"required": [
"keyUrl",
"sourceVault"
]
},
"azure-native:compute:KeyVaultKeyReferenceResponse": {
"description": "Describes a reference to Key Vault Key",
"properties": {
"keyUrl": {
"type": "string",
"description": "The URL referencing a key encryption key in Key Vault."
},
"sourceVault": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "The relative URL of the Key Vault containing the key."
}
},
"type": "object",
"required": [
"keyUrl",
"sourceVault"
]
},
"azure-native:compute:KeyVaultSecretReference": {
"description": "Describes a reference to Key Vault Secret",
"properties": {
"secretUrl": {
"type": "string",
"description": "The URL referencing a secret in a Key Vault."
},
"sourceVault": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "The relative URL of the Key Vault containing the secret."
}
},
"type": "object",
"required": [
"secretUrl",
"sourceVault"
]
},
"azure-native:compute:KeyVaultSecretReferenceResponse": {
"description": "Describes a reference to Key Vault Secret",
"properties": {
"secretUrl": {
"type": "string",
"description": "The URL referencing a secret in a Key Vault."
},
"sourceVault": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "The relative URL of the Key Vault containing the secret."
}
},
"type": "object",
"required": [
"secretUrl",
"sourceVault"
]
},
"azure-native:compute:LastPatchInstallationSummaryResponse": {
"description": "Describes the properties of the last installed patch summary.",
"properties": {
"error": {
"type": "object",
"$ref": "#/types/azure-native:compute:ApiErrorResponse",
"description": "The errors that were encountered during execution of the operation. The details array contains the list of them."
},
"excludedPatchCount": {
"type": "integer",
"description": "The number of all available patches but excluded explicitly by a customer-specified exclusion list match."
},
"failedPatchCount": {
"type": "integer",
"description": "The count of patches that failed installation."
},
"installationActivityId": {
"type": "string",
"description": "The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs."
},
"installedPatchCount": {
"type": "integer",
"description": "The count of patches that successfully installed."
},
"lastModifiedTime": {
"type": "string",
"description": "The UTC timestamp when the operation began."
},
"maintenanceWindowExceeded": {
"type": "boolean",
"description": "Describes whether the operation ran out of time before it completed all its intended actions"
},
"notSelectedPatchCount": {
"type": "integer",
"description": "The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry."
},
"pendingPatchCount": {
"type": "integer",
"description": "The number of all available patches expected to be installed over the course of the patch installation operation."
},
"startTime": {
"type": "string",
"description": "The UTC timestamp when the operation began."
},
"status": {
"type": "string",
"description": "The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\""
}
},
"type": "object",
"required": [
"error",
"excludedPatchCount",
"failedPatchCount",
"installationActivityId",
"installedPatchCount",
"lastModifiedTime",
"maintenanceWindowExceeded",
"notSelectedPatchCount",
"pendingPatchCount",
"startTime",
"status"
]
},
"azure-native:compute:LinuxConfiguration": {
"description": "Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).",
"properties": {
"disablePasswordAuthentication": {
"type": "boolean",
"description": "Specifies whether password authentication should be disabled."
},
"enableVMAgentPlatformUpdates": {
"type": "boolean",
"description": "Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false."
},
"patchSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:LinuxPatchSettings",
"description": "[Preview Feature] Specifies settings related to VM Guest Patching on Linux."
},
"provisionVMAgent": {
"type": "boolean",
"description": "Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later."
},
"ssh": {
"type": "object",
"$ref": "#/types/azure-native:compute:SshConfiguration",
"description": "Specifies the ssh key configuration for a Linux OS."
}
},
"type": "object"
},
"azure-native:compute:LinuxConfigurationResponse": {
"description": "Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).",
"properties": {
"disablePasswordAuthentication": {
"type": "boolean",
"description": "Specifies whether password authentication should be disabled."
},
"enableVMAgentPlatformUpdates": {
"type": "boolean",
"description": "Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false."
},
"patchSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:LinuxPatchSettingsResponse",
"description": "[Preview Feature] Specifies settings related to VM Guest Patching on Linux."
},
"provisionVMAgent": {
"type": "boolean",
"description": "Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later."
},
"ssh": {
"type": "object",
"$ref": "#/types/azure-native:compute:SshConfigurationResponse",
"description": "Specifies the ssh key configuration for a Linux OS."
}
},
"type": "object"
},
"azure-native:compute:LinuxPatchAssessmentMode": {
"description": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.",
"type": "string",
"enum": [
{
"value": "ImageDefault"
},
{
"value": "AutomaticByPlatform"
}
]
},
"azure-native:compute:LinuxPatchSettings": {
"description": "Specifies settings related to VM Guest Patching on Linux.",
"properties": {
"assessmentMode": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:LinuxPatchAssessmentMode"
}
],
"description": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true."
},
"automaticByPlatformSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:LinuxVMGuestPatchAutomaticByPlatformSettings",
"description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux."
},
"patchMode": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:LinuxVMGuestPatchMode"
}
],
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true"
}
},
"type": "object"
},
"azure-native:compute:LinuxPatchSettingsResponse": {
"description": "Specifies settings related to VM Guest Patching on Linux.",
"properties": {
"assessmentMode": {
"type": "string",
"description": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine. <br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true."
},
"automaticByPlatformSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:LinuxVMGuestPatchAutomaticByPlatformSettingsResponse",
"description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux."
},
"patchMode": {
"type": "string",
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true"
}
},
"type": "object"
},
"azure-native:compute:LinuxVMGuestPatchAutomaticByPlatformRebootSetting": {
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.",
"type": "string",
"enum": [
{
"value": "Unknown"
},
{
"value": "IfRequired"
},
{
"value": "Never"
},
{
"value": "Always"
}
]
},
"azure-native:compute:LinuxVMGuestPatchAutomaticByPlatformSettings": {
"description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings.",
"properties": {
"bypassPlatformSafetyChecksOnUserSchedule": {
"type": "boolean",
"description": "Enables customer to schedule patching without accidental upgrades"
},
"rebootSetting": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:LinuxVMGuestPatchAutomaticByPlatformRebootSetting"
}
],
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations."
}
},
"type": "object"
},
"azure-native:compute:LinuxVMGuestPatchAutomaticByPlatformSettingsResponse": {
"description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings.",
"properties": {
"bypassPlatformSafetyChecksOnUserSchedule": {
"type": "boolean",
"description": "Enables customer to schedule patching without accidental upgrades"
},
"rebootSetting": {
"type": "string",
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations."
}
},
"type": "object"
},
"azure-native:compute:LinuxVMGuestPatchMode": {
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true",
"type": "string",
"enum": [
{
"value": "ImageDefault"
},
{
"value": "AutomaticByPlatform"
}
]
},
"azure-native:compute:MaintenanceRedeployStatusResponse": {
"description": "Maintenance Operation Status.",
"properties": {
"isCustomerInitiatedMaintenanceAllowed": {
"type": "boolean",
"description": "True, if customer is allowed to perform Maintenance."
},
"lastOperationMessage": {
"type": "string",
"description": "Message returned for the last Maintenance Operation."
},
"lastOperationResultCode": {
"type": "string",
"description": "The Last Maintenance Operation Result Code."
},
"maintenanceWindowEndTime": {
"type": "string",
"description": "End Time for the Maintenance Window."
},
"maintenanceWindowStartTime": {
"type": "string",
"description": "Start Time for the Maintenance Window."
},
"preMaintenanceWindowEndTime": {
"type": "string",
"description": "End Time for the Pre Maintenance Window."
},
"preMaintenanceWindowStartTime": {
"type": "string",
"description": "Start Time for the Pre Maintenance Window."
}
},
"type": "object"
},
"azure-native:compute:ManagedDiskParameters": {
"description": "The parameters of a managed disk.",
"properties": {
"diskEncryptionSet": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskEncryptionSetParameters",
"description": "Specifies the customer managed disk encryption set resource id for the managed disk."
},
"id": {
"type": "string",
"description": "Resource Id"
},
"securityProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:VMDiskSecurityProfile",
"description": "Specifies the security profile for the managed disk."
},
"storageAccountType": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:StorageAccountTypes"
}
],
"description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk."
}
},
"type": "object"
},
"azure-native:compute:ManagedDiskParametersResponse": {
"description": "The parameters of a managed disk.",
"properties": {
"diskEncryptionSet": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskEncryptionSetParametersResponse",
"description": "Specifies the customer managed disk encryption set resource id for the managed disk."
},
"id": {
"type": "string",
"description": "Resource Id"
},
"securityProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:VMDiskSecurityProfileResponse",
"description": "Specifies the security profile for the managed disk."
},
"storageAccountType": {
"type": "string",
"description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk."
}
},
"type": "object"
},
"azure-native:compute:NetworkApiVersion": {
"description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations",
"type": "string",
"enum": [
{
"value": "2020-11-01"
}
]
},
"azure-native:compute:NetworkInterfaceReference": {
"description": "Describes a network interface reference.",
"properties": {
"deleteOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DeleteOptions"
}
],
"description": "Specify what happens to the network interface when the VM is deleted"
},
"id": {
"type": "string",
"description": "Resource Id"
},
"primary": {
"type": "boolean",
"description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface."
}
},
"type": "object"
},
"azure-native:compute:NetworkInterfaceReferenceResponse": {
"description": "Describes a network interface reference.",
"properties": {
"deleteOption": {
"type": "string",
"description": "Specify what happens to the network interface when the VM is deleted"
},
"id": {
"type": "string",
"description": "Resource Id"
},
"primary": {
"type": "boolean",
"description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface."
}
},
"type": "object"
},
"azure-native:compute:NetworkProfile": {
"description": "Specifies the network interfaces or the networking configuration of the virtual machine.",
"properties": {
"networkApiVersion": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:NetworkApiVersion"
}
],
"description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations"
},
"networkInterfaceConfigurations": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineNetworkInterfaceConfiguration"
},
"description": "Specifies the networking configurations that will be used to create the virtual machine networking resources."
},
"networkInterfaces": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:NetworkInterfaceReference"
},
"description": "Specifies the list of resource Ids for the network interfaces associated with the virtual machine."
}
},
"type": "object"
},
"azure-native:compute:NetworkProfileResponse": {
"description": "Specifies the network interfaces or the networking configuration of the virtual machine.",
"properties": {
"networkApiVersion": {
"type": "string",
"description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations"
},
"networkInterfaceConfigurations": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineNetworkInterfaceConfigurationResponse"
},
"description": "Specifies the networking configurations that will be used to create the virtual machine networking resources."
},
"networkInterfaces": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:NetworkInterfaceReferenceResponse"
},
"description": "Specifies the list of resource Ids for the network interfaces associated with the virtual machine."
}
},
"type": "object"
},
"azure-native:compute:OSDisk": {
"description": "Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).",
"properties": {
"caching": {
"$ref": "#/types/azure-native:compute:CachingTypes",
"description": "Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**"
},
"createOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiskCreateOptionTypes"
}
],
"description": "Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described."
},
"deleteOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiskDeleteOptionTypes"
}
],
"description": "Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk."
},
"diffDiskSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiffDiskSettings",
"description": "Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine."
},
"diskSizeGB": {
"type": "integer",
"description": "Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023."
},
"encryptionSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskEncryptionSettings",
"description": "Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15."
},
"image": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDisk",
"description": "The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist."
},
"managedDisk": {
"type": "object",
"$ref": "#/types/azure-native:compute:ManagedDiskParameters",
"description": "The managed disk parameters."
},
"name": {
"type": "string",
"description": "The disk name."
},
"osType": {
"$ref": "#/types/azure-native:compute:OperatingSystemTypes",
"description": "This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**"
},
"vhd": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDisk",
"description": "The virtual hard disk."
},
"writeAcceleratorEnabled": {
"type": "boolean",
"description": "Specifies whether writeAccelerator should be enabled or disabled on the disk."
}
},
"type": "object",
"required": [
"createOption"
]
},
"azure-native:compute:OSDiskResponse": {
"description": "Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).",
"properties": {
"caching": {
"type": "string",
"description": "Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**"
},
"createOption": {
"type": "string",
"description": "Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described."
},
"deleteOption": {
"type": "string",
"description": "Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk."
},
"diffDiskSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiffDiskSettingsResponse",
"description": "Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine."
},
"diskSizeGB": {
"type": "integer",
"description": "Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023."
},
"encryptionSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskEncryptionSettingsResponse",
"description": "Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15."
},
"image": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDiskResponse",
"description": "The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist."
},
"managedDisk": {
"type": "object",
"$ref": "#/types/azure-native:compute:ManagedDiskParametersResponse",
"description": "The managed disk parameters."
},
"name": {
"type": "string",
"description": "The disk name."
},
"osType": {
"type": "string",
"description": "This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**"
},
"vhd": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualHardDiskResponse",
"description": "The virtual hard disk."
},
"writeAcceleratorEnabled": {
"type": "boolean",
"description": "Specifies whether writeAccelerator should be enabled or disabled on the disk."
}
},
"type": "object",
"required": [
"createOption"
]
},
"azure-native:compute:OSImageNotificationProfile": {
"properties": {
"enable": {
"type": "boolean",
"description": "Specifies whether the OS Image Scheduled event is enabled or disabled."
},
"notBeforeTimeout": {
"type": "string",
"description": "Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M)"
}
},
"type": "object"
},
"azure-native:compute:OSImageNotificationProfileResponse": {
"properties": {
"enable": {
"type": "boolean",
"description": "Specifies whether the OS Image Scheduled event is enabled or disabled."
},
"notBeforeTimeout": {
"type": "string",
"description": "Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M)"
}
},
"type": "object"
},
"azure-native:compute:OSProfile": {
"description": "Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned.",
"properties": {
"adminPassword": {
"type": "string",
"description": "Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_]) <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)"
},
"adminUsername": {
"type": "string",
"description": "Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in \".\" <br><br> **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters."
},
"allowExtensionOperations": {
"type": "boolean",
"description": "Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine."
},
"computerName": {
"type": "string",
"description": "Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules)."
},
"customData": {
"type": "string",
"description": "Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)."
},
"linuxConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:LinuxConfiguration",
"description": "Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros)."
},
"requireGuestProvisionSignal": {
"type": "boolean",
"description": "Optional property which must either be set to True or omitted."
},
"secrets": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VaultSecretGroup"
},
"description": "Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows)."
},
"windowsConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:WindowsConfiguration",
"description": "Specifies Windows operating system settings on the virtual machine."
}
},
"type": "object"
},
"azure-native:compute:OSProfileResponse": {
"description": "Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned.",
"properties": {
"adminPassword": {
"type": "string",
"description": "Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\\W_]) <br><br> **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)"
},
"adminUsername": {
"type": "string",
"description": "Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in \".\" <br><br> **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters."
},
"allowExtensionOperations": {
"type": "boolean",
"description": "Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine."
},
"computerName": {
"type": "string",
"description": "Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules)."
},
"customData": {
"type": "string",
"description": "Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)."
},
"linuxConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:LinuxConfigurationResponse",
"description": "Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros)."
},
"requireGuestProvisionSignal": {
"type": "boolean",
"description": "Optional property which must either be set to True or omitted."
},
"secrets": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VaultSecretGroupResponse"
},
"description": "Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows)."
},
"windowsConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:WindowsConfigurationResponse",
"description": "Specifies Windows operating system settings on the virtual machine."
}
},
"type": "object"
},
"azure-native:compute:OperatingSystemTypes": {
"description": "This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**",
"type": "string",
"enum": [
{
"value": "Windows"
},
{
"value": "Linux"
}
]
},
"azure-native:compute:PassNames": {
"description": "The pass name. Currently, the only allowable value is OobeSystem.",
"type": "string",
"enum": [
{
"value": "OobeSystem"
}
]
},
"azure-native:compute:PatchSettings": {
"description": "Specifies settings related to VM Guest Patching on Windows.",
"properties": {
"assessmentMode": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:WindowsPatchAssessmentMode"
}
],
"description": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. "
},
"automaticByPlatformSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:WindowsVMGuestPatchAutomaticByPlatformSettings",
"description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows."
},
"enableHotpatching": {
"type": "boolean",
"description": "Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'."
},
"patchMode": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:WindowsVMGuestPatchMode"
}
],
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true "
}
},
"type": "object"
},
"azure-native:compute:PatchSettingsResponse": {
"description": "Specifies settings related to VM Guest Patching on Windows.",
"properties": {
"assessmentMode": {
"type": "string",
"description": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. "
},
"automaticByPlatformSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:WindowsVMGuestPatchAutomaticByPlatformSettingsResponse",
"description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows."
},
"enableHotpatching": {
"type": "boolean",
"description": "Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'."
},
"patchMode": {
"type": "string",
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true "
}
},
"type": "object"
},
"azure-native:compute:Plan": {
"description": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.",
"properties": {
"name": {
"type": "string",
"description": "The plan ID."
},
"product": {
"type": "string",
"description": "Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element."
},
"promotionCode": {
"type": "string",
"description": "The promotion code."
},
"publisher": {
"type": "string",
"description": "The publisher ID."
}
},
"type": "object"
},
"azure-native:compute:PlanResponse": {
"description": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.",
"properties": {
"name": {
"type": "string",
"description": "The plan ID."
},
"product": {
"type": "string",
"description": "Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element."
},
"promotionCode": {
"type": "string",
"description": "The promotion code."
},
"publisher": {
"type": "string",
"description": "The publisher ID."
}
},
"type": "object"
},
"azure-native:compute:ProtocolTypes": {
"description": "Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**",
"type": "string",
"enum": [
{
"value": "Http"
},
{
"value": "Https"
}
]
},
"azure-native:compute:PublicIPAddressSku": {
"description": "Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.",
"properties": {
"name": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:PublicIPAddressSkuName"
}
],
"description": "Specify public IP sku name"
},
"tier": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:PublicIPAddressSkuTier"
}
],
"description": "Specify public IP sku tier"
}
},
"type": "object"
},
"azure-native:compute:PublicIPAddressSkuName": {
"description": "Specify public IP sku name",
"type": "string",
"enum": [
{
"value": "Basic"
},
{
"value": "Standard"
}
]
},
"azure-native:compute:PublicIPAddressSkuResponse": {
"description": "Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.",
"properties": {
"name": {
"type": "string",
"description": "Specify public IP sku name"
},
"tier": {
"type": "string",
"description": "Specify public IP sku tier"
}
},
"type": "object"
},
"azure-native:compute:PublicIPAddressSkuTier": {
"description": "Specify public IP sku tier",
"type": "string",
"enum": [
{
"value": "Regional"
},
{
"value": "Global"
}
]
},
"azure-native:compute:PublicIPAllocationMethod": {
"description": "Specify the public IP allocation type",
"type": "string",
"enum": [
{
"value": "Dynamic"
},
{
"value": "Static"
}
]
},
"azure-native:compute:ResourceIdentityType": {
"description": "The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine.",
"type": "string",
"enum": [
{
"value": "SystemAssigned"
},
{
"value": "UserAssigned"
},
{
"value": "SystemAssigned, UserAssigned"
},
{
"value": "None"
}
]
},
"azure-native:compute:ScheduledEventsProfile": {
"properties": {
"osImageNotificationProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:OSImageNotificationProfile",
"description": "Specifies OS Image Scheduled Event related configurations."
},
"terminateNotificationProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:TerminateNotificationProfile",
"description": "Specifies Terminate Scheduled Event related configurations."
}
},
"type": "object"
},
"azure-native:compute:ScheduledEventsProfileResponse": {
"properties": {
"osImageNotificationProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:OSImageNotificationProfileResponse",
"description": "Specifies OS Image Scheduled Event related configurations."
},
"terminateNotificationProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:TerminateNotificationProfileResponse",
"description": "Specifies Terminate Scheduled Event related configurations."
}
},
"type": "object"
},
"azure-native:compute:SecurityEncryptionTypes": {
"description": "Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs.",
"type": "string",
"enum": [
{
"value": "VMGuestStateOnly"
},
{
"value": "DiskWithVMGuestState"
}
]
},
"azure-native:compute:SecurityProfile": {
"description": "Specifies the Security profile settings for the virtual machine or virtual machine scale set.",
"properties": {
"encryptionAtHost": {
"type": "boolean",
"description": "This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource."
},
"securityType": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:SecurityTypes"
}
],
"description": "Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set."
},
"uefiSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:UefiSettings",
"description": "Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01."
}
},
"type": "object"
},
"azure-native:compute:SecurityProfileResponse": {
"description": "Specifies the Security profile settings for the virtual machine or virtual machine scale set.",
"properties": {
"encryptionAtHost": {
"type": "boolean",
"description": "This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource."
},
"securityType": {
"type": "string",
"description": "Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set."
},
"uefiSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:UefiSettingsResponse",
"description": "Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01."
}
},
"type": "object"
},
"azure-native:compute:SecurityTypes": {
"description": "Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set.",
"type": "string",
"enum": [
{
"value": "TrustedLaunch"
},
{
"value": "ConfidentialVM"
}
]
},
"azure-native:compute:SettingNames": {
"description": "Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.",
"type": "string",
"enum": [
{
"value": "AutoLogon"
},
{
"value": "FirstLogonCommands"
}
]
},
"azure-native:compute:SshConfiguration": {
"description": "SSH configuration for Linux based VMs running on Azure",
"properties": {
"publicKeys": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SshPublicKey"
},
"description": "The list of SSH public keys used to authenticate with linux based VMs."
}
},
"type": "object"
},
"azure-native:compute:SshConfigurationResponse": {
"description": "SSH configuration for Linux based VMs running on Azure",
"properties": {
"publicKeys": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SshPublicKeyResponse"
},
"description": "The list of SSH public keys used to authenticate with linux based VMs."
}
},
"type": "object"
},
"azure-native:compute:SshPublicKey": {
"description": "Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.",
"properties": {
"keyData": {
"type": "string",
"description": "SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed)."
},
"path": {
"type": "string",
"description": "Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys"
}
},
"type": "object"
},
"azure-native:compute:SshPublicKeyResponse": {
"description": "Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.",
"properties": {
"keyData": {
"type": "string",
"description": "SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed)."
},
"path": {
"type": "string",
"description": "Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys"
}
},
"type": "object"
},
"azure-native:compute:StorageAccountTypes": {
"description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.",
"type": "string",
"enum": [
{
"value": "Standard_LRS"
},
{
"value": "Premium_LRS"
},
{
"value": "StandardSSD_LRS"
},
{
"value": "UltraSSD_LRS"
},
{
"value": "Premium_ZRS"
},
{
"value": "StandardSSD_ZRS"
},
{
"value": "PremiumV2_LRS"
}
]
},
"azure-native:compute:StorageProfile": {
"description": "Specifies the storage settings for the virtual machine disks.",
"properties": {
"dataDisks": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:DataDisk"
},
"description": "Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
},
"diskControllerType": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DiskControllerTypes"
}
],
"description": "Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01."
},
"imageReference": {
"type": "object",
"$ref": "#/types/azure-native:compute:ImageReference",
"description": "Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations."
},
"osDisk": {
"type": "object",
"$ref": "#/types/azure-native:compute:OSDisk",
"description": "Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
}
},
"type": "object"
},
"azure-native:compute:StorageProfileResponse": {
"description": "Specifies the storage settings for the virtual machine disks.",
"properties": {
"dataDisks": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:DataDiskResponse"
},
"description": "Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
},
"diskControllerType": {
"type": "string",
"description": "Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01."
},
"imageReference": {
"type": "object",
"$ref": "#/types/azure-native:compute:ImageReferenceResponse",
"description": "Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations."
},
"osDisk": {
"type": "object",
"$ref": "#/types/azure-native:compute:OSDiskResponse",
"description": "Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
}
},
"type": "object"
},
"azure-native:compute:SubResource": {
"properties": {
"id": {
"type": "string",
"description": "Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted.\nAn absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end.\nA relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself.\nExample of a relative ID: $self/frontEndConfigurations/my-frontend."
}
},
"type": "object"
},
"azure-native:compute:SubResourceResponse": {
"properties": {
"id": {
"type": "string",
"description": "Resource Id"
}
},
"type": "object"
},
"azure-native:compute:TerminateNotificationProfile": {
"properties": {
"enable": {
"type": "boolean",
"description": "Specifies whether the Terminate Scheduled event is enabled or disabled."
},
"notBeforeTimeout": {
"type": "string",
"description": "Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)"
}
},
"type": "object"
},
"azure-native:compute:TerminateNotificationProfileResponse": {
"properties": {
"enable": {
"type": "boolean",
"description": "Specifies whether the Terminate Scheduled event is enabled or disabled."
},
"notBeforeTimeout": {
"type": "string",
"description": "Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)"
}
},
"type": "object"
},
"azure-native:compute:UefiSettings": {
"description": "Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01.",
"properties": {
"secureBootEnabled": {
"type": "boolean",
"description": "Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01."
},
"vTpmEnabled": {
"type": "boolean",
"description": "Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01."
}
},
"type": "object"
},
"azure-native:compute:UefiSettingsResponse": {
"description": "Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01.",
"properties": {
"secureBootEnabled": {
"type": "boolean",
"description": "Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01."
},
"vTpmEnabled": {
"type": "boolean",
"description": "Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01."
}
},
"type": "object"
},
"azure-native:compute:UserAssignedIdentitiesResponseUserAssignedIdentities": {
"properties": {
"clientId": {
"type": "string",
"description": "The client id of user assigned identity."
},
"principalId": {
"type": "string",
"description": "The principal id of user assigned identity."
}
},
"type": "object",
"required": [
"clientId",
"principalId"
]
},
"azure-native:compute:VMDiskSecurityProfile": {
"description": "Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs.",
"properties": {
"diskEncryptionSet": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskEncryptionSetParameters",
"description": "Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob."
},
"securityEncryptionType": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:SecurityEncryptionTypes"
}
],
"description": "Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs."
}
},
"type": "object"
},
"azure-native:compute:VMDiskSecurityProfileResponse": {
"description": "Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs.",
"properties": {
"diskEncryptionSet": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskEncryptionSetParametersResponse",
"description": "Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob."
},
"securityEncryptionType": {
"type": "string",
"description": "Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs."
}
},
"type": "object"
},
"azure-native:compute:VMGalleryApplication": {
"description": "Specifies the required information to reference a compute gallery application version",
"properties": {
"configurationReference": {
"type": "string",
"description": "Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided"
},
"enableAutomaticUpgrade": {
"type": "boolean",
"description": "If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the VM/VMSS"
},
"order": {
"type": "integer",
"description": "Optional, Specifies the order in which the packages have to be installed"
},
"packageReferenceId": {
"type": "string",
"description": "Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}"
},
"tags": {
"type": "string",
"description": "Optional, Specifies a passthrough value for more generic context."
},
"treatFailureAsDeploymentFailure": {
"type": "boolean",
"description": "Optional, If true, any failure for any operation in the VmApplication will fail the deployment"
}
},
"type": "object",
"required": [
"packageReferenceId"
]
},
"azure-native:compute:VMGalleryApplicationResponse": {
"description": "Specifies the required information to reference a compute gallery application version",
"properties": {
"configurationReference": {
"type": "string",
"description": "Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided"
},
"enableAutomaticUpgrade": {
"type": "boolean",
"description": "If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the VM/VMSS"
},
"order": {
"type": "integer",
"description": "Optional, Specifies the order in which the packages have to be installed"
},
"packageReferenceId": {
"type": "string",
"description": "Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}"
},
"tags": {
"type": "string",
"description": "Optional, Specifies a passthrough value for more generic context."
},
"treatFailureAsDeploymentFailure": {
"type": "boolean",
"description": "Optional, If true, any failure for any operation in the VmApplication will fail the deployment"
}
},
"type": "object",
"required": [
"packageReferenceId"
]
},
"azure-native:compute:VMSizeProperties": {
"description": "Specifies VM Size Property settings on the virtual machine.",
"properties": {
"vCPUsAvailable": {
"type": "integer",
"description": "Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list)."
},
"vCPUsPerCore": {
"type": "integer",
"description": "Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**"
}
},
"type": "object"
},
"azure-native:compute:VMSizePropertiesResponse": {
"description": "Specifies VM Size Property settings on the virtual machine.",
"properties": {
"vCPUsAvailable": {
"type": "integer",
"description": "Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list)."
},
"vCPUsPerCore": {
"type": "integer",
"description": "Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**"
}
},
"type": "object"
},
"azure-native:compute:VaultCertificate": {
"description": "Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.",
"properties": {
"certificateStore": {
"type": "string",
"description": "For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted."
},
"certificateUrl": {
"type": "string",
"description": "This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> \"data\":\"<Base64-encoded-certificate>\",<br> \"dataType\":\"pfx\",<br> \"password\":\"<pfx-file-password>\"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows)."
}
},
"type": "object"
},
"azure-native:compute:VaultCertificateResponse": {
"description": "Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.",
"properties": {
"certificateStore": {
"type": "string",
"description": "For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted."
},
"certificateUrl": {
"type": "string",
"description": "This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> \"data\":\"<Base64-encoded-certificate>\",<br> \"dataType\":\"pfx\",<br> \"password\":\"<pfx-file-password>\"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows)."
}
},
"type": "object"
},
"azure-native:compute:VaultSecretGroup": {
"description": "Describes a set of certificates which are all in the same Key Vault.",
"properties": {
"sourceVault": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "The relative URL of the Key Vault containing all of the certificates in VaultCertificates."
},
"vaultCertificates": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VaultCertificate"
},
"description": "The list of key vault references in SourceVault which contain certificates."
}
},
"type": "object"
},
"azure-native:compute:VaultSecretGroupResponse": {
"description": "Describes a set of certificates which are all in the same Key Vault.",
"properties": {
"sourceVault": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "The relative URL of the Key Vault containing all of the certificates in VaultCertificates."
},
"vaultCertificates": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VaultCertificateResponse"
},
"description": "The list of key vault references in SourceVault which contain certificates."
}
},
"type": "object"
},
"azure-native:compute:VirtualHardDisk": {
"description": "Describes the uri of a disk.",
"properties": {
"uri": {
"type": "string",
"description": "Specifies the virtual hard disk's uri."
}
},
"type": "object"
},
"azure-native:compute:VirtualHardDiskResponse": {
"description": "Describes the uri of a disk.",
"properties": {
"uri": {
"type": "string",
"description": "Specifies the virtual hard disk's uri."
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineAgentInstanceViewResponse": {
"description": "The instance view of the VM Agent running on the virtual machine.",
"properties": {
"extensionHandlers": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineExtensionHandlerInstanceViewResponse"
},
"description": "The virtual machine extension handler instance view."
},
"statuses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse"
},
"description": "The resource status information."
},
"vmAgentVersion": {
"type": "string",
"description": "The VM Agent full version."
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineEvictionPolicyTypes": {
"description": "Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.",
"type": "string",
"enum": [
{
"value": "Deallocate"
},
{
"value": "Delete"
}
]
},
"azure-native:compute:VirtualMachineExtensionHandlerInstanceViewResponse": {
"description": "The instance view of a virtual machine extension handler.",
"properties": {
"status": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse",
"description": "The extension handler status."
},
"type": {
"type": "string",
"description": "Specifies the type of the extension; an example is \"CustomScriptExtension\"."
},
"typeHandlerVersion": {
"type": "string",
"description": "Specifies the version of the script handler."
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineExtensionInstanceViewResponse": {
"description": "The instance view of a virtual machine extension.",
"properties": {
"name": {
"type": "string",
"description": "The virtual machine extension name."
},
"statuses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse"
},
"description": "The resource status information."
},
"substatuses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse"
},
"description": "The resource status information."
},
"type": {
"type": "string",
"description": "Specifies the type of the extension; an example is \"CustomScriptExtension\"."
},
"typeHandlerVersion": {
"type": "string",
"description": "Specifies the version of the script handler."
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineExtensionResponse": {
"description": "Describes a Virtual Machine Extension.",
"properties": {
"autoUpgradeMinorVersion": {
"type": "boolean",
"description": "Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true."
},
"enableAutomaticUpgrade": {
"type": "boolean",
"description": "Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available."
},
"forceUpdateTag": {
"type": "string",
"description": "How the extension handler should be forced to update even if the extension configuration has not changed."
},
"id": {
"type": "string",
"description": "Resource Id"
},
"instanceView": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineExtensionInstanceViewResponse",
"description": "The virtual machine extension instance view."
},
"location": {
"type": "string",
"description": "Resource location"
},
"name": {
"type": "string",
"description": "Resource name"
},
"protectedSettings": {
"$ref": "pulumi.json#/Any",
"description": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all."
},
"protectedSettingsFromKeyVault": {
"type": "object",
"$ref": "#/types/azure-native:compute:KeyVaultSecretReferenceResponse",
"description": "The extensions protected settings that are passed by reference, and consumed from key vault"
},
"provisionAfterExtensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Collection of extension names after which this extension needs to be provisioned."
},
"provisioningState": {
"type": "string",
"description": "The provisioning state, which only appears in the response."
},
"publisher": {
"type": "string",
"description": "The name of the extension handler publisher."
},
"settings": {
"$ref": "pulumi.json#/Any",
"description": "Json formatted public settings for the extension."
},
"suppressFailures": {
"type": "boolean",
"description": "Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
},
"type": {
"type": "string",
"description": "Resource type"
},
"typeHandlerVersion": {
"type": "string",
"description": "Specifies the version of the script handler."
}
},
"type": "object",
"required": [
"id",
"name",
"provisioningState",
"type"
]
},
"azure-native:compute:VirtualMachineHealthStatusResponse": {
"description": "The health status of the VM.",
"properties": {
"status": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse",
"description": "The health status information for the VM."
}
},
"type": "object",
"required": [
"status"
]
},
"azure-native:compute:VirtualMachineIdentity": {
"description": "Identity for the virtual machine.",
"properties": {
"type": {
"$ref": "#/types/azure-native:compute:ResourceIdentityType",
"description": "The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine."
},
"userAssignedIdentities": {
"type": "array",
"items": {
"type": "string"
},
"description": "The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineIdentityResponse": {
"description": "Identity for the virtual machine.",
"properties": {
"principalId": {
"type": "string",
"description": "The principal id of virtual machine identity. This property will only be provided for a system assigned identity."
},
"tenantId": {
"type": "string",
"description": "The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity."
},
"type": {
"type": "string",
"description": "The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine."
},
"userAssignedIdentities": {
"type": "object",
"additionalProperties": {
"type": "object",
"$ref": "#/types/azure-native:compute:UserAssignedIdentitiesResponseUserAssignedIdentities"
},
"description": "The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'."
}
},
"type": "object",
"required": [
"principalId",
"tenantId"
]
},
"azure-native:compute:VirtualMachineInstanceViewResponse": {
"description": "The instance view of a virtual machine.",
"properties": {
"assignedHost": {
"type": "string",
"description": "Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01."
},
"bootDiagnostics": {
"type": "object",
"$ref": "#/types/azure-native:compute:BootDiagnosticsInstanceViewResponse",
"description": "Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor."
},
"computerName": {
"type": "string",
"description": "The computer name assigned to the virtual machine."
},
"disks": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiskInstanceViewResponse"
},
"description": "The virtual machine disk information."
},
"extensions": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineExtensionInstanceViewResponse"
},
"description": "The extensions information."
},
"hyperVGeneration": {
"type": "string",
"description": "Specifies the HyperVGeneration Type associated with a resource"
},
"maintenanceRedeployStatus": {
"type": "object",
"$ref": "#/types/azure-native:compute:MaintenanceRedeployStatusResponse",
"description": "The Maintenance Operation status on the virtual machine."
},
"osName": {
"type": "string",
"description": "The Operating System running on the virtual machine."
},
"osVersion": {
"type": "string",
"description": "The version of Operating System running on the virtual machine."
},
"patchStatus": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachinePatchStatusResponse",
"description": "[Preview Feature] The status of virtual machine patch operations."
},
"platformFaultDomain": {
"type": "integer",
"description": "Specifies the fault domain of the virtual machine."
},
"platformUpdateDomain": {
"type": "integer",
"description": "Specifies the update domain of the virtual machine."
},
"rdpThumbPrint": {
"type": "string",
"description": "The Remote desktop certificate thumbprint."
},
"statuses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse"
},
"description": "The resource status information."
},
"vmAgent": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineAgentInstanceViewResponse",
"description": "The VM Agent running on the virtual machine."
},
"vmHealth": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineHealthStatusResponse",
"description": "The health status for the VM."
}
},
"type": "object",
"required": [
"assignedHost",
"vmHealth"
]
},
"azure-native:compute:VirtualMachineIpTag": {
"description": "Contains the IP tag associated with the public IP address.",
"properties": {
"ipTagType": {
"type": "string",
"description": "IP tag type. Example: FirstPartyUsage."
},
"tag": {
"type": "string",
"description": "IP tag associated with the public IP. Example: SQL, Storage etc."
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineIpTagResponse": {
"description": "Contains the IP tag associated with the public IP address.",
"properties": {
"ipTagType": {
"type": "string",
"description": "IP tag type. Example: FirstPartyUsage."
},
"tag": {
"type": "string",
"description": "IP tag associated with the public IP. Example: SQL, Storage etc."
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineNetworkInterfaceConfiguration": {
"description": "Describes a virtual machine network interface configurations.",
"properties": {
"deleteOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DeleteOptions"
}
],
"description": "Specify what happens to the network interface when the VM is deleted"
},
"disableTcpStateTracking": {
"type": "boolean",
"description": "Specifies whether the network interface is disabled for tcp state tracking."
},
"dnsSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineNetworkInterfaceDnsSettingsConfiguration",
"description": "The dns settings to be applied on the network interfaces."
},
"dscpConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource"
},
"enableAcceleratedNetworking": {
"type": "boolean",
"description": "Specifies whether the network interface is accelerated networking-enabled."
},
"enableFpga": {
"type": "boolean",
"description": "Specifies whether the network interface is FPGA networking-enabled."
},
"enableIPForwarding": {
"type": "boolean",
"description": "Whether IP forwarding enabled on this NIC."
},
"ipConfigurations": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineNetworkInterfaceIPConfiguration"
},
"description": "Specifies the IP configurations of the network interface."
},
"name": {
"type": "string",
"description": "The network interface configuration name."
},
"networkSecurityGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "The network security group."
},
"primary": {
"type": "boolean",
"description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface."
}
},
"type": "object",
"required": [
"ipConfigurations",
"name"
]
},
"azure-native:compute:VirtualMachineNetworkInterfaceConfigurationResponse": {
"description": "Describes a virtual machine network interface configurations.",
"properties": {
"deleteOption": {
"type": "string",
"description": "Specify what happens to the network interface when the VM is deleted"
},
"disableTcpStateTracking": {
"type": "boolean",
"description": "Specifies whether the network interface is disabled for tcp state tracking."
},
"dnsSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineNetworkInterfaceDnsSettingsConfigurationResponse",
"description": "The dns settings to be applied on the network interfaces."
},
"dscpConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse"
},
"enableAcceleratedNetworking": {
"type": "boolean",
"description": "Specifies whether the network interface is accelerated networking-enabled."
},
"enableFpga": {
"type": "boolean",
"description": "Specifies whether the network interface is FPGA networking-enabled."
},
"enableIPForwarding": {
"type": "boolean",
"description": "Whether IP forwarding enabled on this NIC."
},
"ipConfigurations": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineNetworkInterfaceIPConfigurationResponse"
},
"description": "Specifies the IP configurations of the network interface."
},
"name": {
"type": "string",
"description": "The network interface configuration name."
},
"networkSecurityGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "The network security group."
},
"primary": {
"type": "boolean",
"description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface."
}
},
"type": "object",
"required": [
"ipConfigurations",
"name"
]
},
"azure-native:compute:VirtualMachineNetworkInterfaceDnsSettingsConfiguration": {
"description": "Describes a virtual machines network configuration's DNS settings.",
"properties": {
"dnsServers": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of DNS servers IP addresses"
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineNetworkInterfaceDnsSettingsConfigurationResponse": {
"description": "Describes a virtual machines network configuration's DNS settings.",
"properties": {
"dnsServers": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of DNS servers IP addresses"
}
},
"type": "object"
},
"azure-native:compute:VirtualMachineNetworkInterfaceIPConfiguration": {
"description": "Describes a virtual machine network profile's IP configuration.",
"properties": {
"applicationGatewayBackendAddressPools": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource"
},
"description": "Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway."
},
"applicationSecurityGroups": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource"
},
"description": "Specifies an array of references to application security group."
},
"loadBalancerBackendAddressPools": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource"
},
"description": "Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer]."
},
"name": {
"type": "string",
"description": "The IP configuration name."
},
"primary": {
"type": "boolean",
"description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface."
},
"privateIPAddressVersion": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:IPVersions"
}
],
"description": "Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'."
},
"publicIPAddressConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachinePublicIPAddressConfiguration",
"description": "The publicIPAddressConfiguration."
},
"subnet": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "Specifies the identifier of the subnet."
}
},
"type": "object",
"required": [
"name"
]
},
"azure-native:compute:VirtualMachineNetworkInterfaceIPConfigurationResponse": {
"description": "Describes a virtual machine network profile's IP configuration.",
"properties": {
"applicationGatewayBackendAddressPools": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse"
},
"description": "Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway."
},
"applicationSecurityGroups": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse"
},
"description": "Specifies an array of references to application security group."
},
"loadBalancerBackendAddressPools": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse"
},
"description": "Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer]."
},
"name": {
"type": "string",
"description": "The IP configuration name."
},
"primary": {
"type": "boolean",
"description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface."
},
"privateIPAddressVersion": {
"type": "string",
"description": "Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'."
},
"publicIPAddressConfiguration": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachinePublicIPAddressConfigurationResponse",
"description": "The publicIPAddressConfiguration."
},
"subnet": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "Specifies the identifier of the subnet."
}
},
"type": "object",
"required": [
"name"
]
},
"azure-native:compute:VirtualMachinePatchStatusResponse": {
"description": "The status of virtual machine patch operations.",
"properties": {
"availablePatchSummary": {
"type": "object",
"$ref": "#/types/azure-native:compute:AvailablePatchSummaryResponse",
"description": "The available patch summary of the latest assessment operation for the virtual machine."
},
"configurationStatuses": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:InstanceViewStatusResponse"
},
"description": "The enablement status of the specified patchMode"
},
"lastPatchInstallationSummary": {
"type": "object",
"$ref": "#/types/azure-native:compute:LastPatchInstallationSummaryResponse",
"description": "The installation summary of the latest installation operation for the virtual machine."
}
},
"type": "object",
"required": [
"configurationStatuses"
]
},
"azure-native:compute:VirtualMachinePriorityTypes": {
"description": "Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview.",
"type": "string",
"enum": [
{
"value": "Regular"
},
{
"value": "Low"
},
{
"value": "Spot"
}
]
},
"azure-native:compute:VirtualMachinePublicIPAddressConfiguration": {
"description": "Describes a virtual machines IP Configuration's PublicIPAddress configuration",
"properties": {
"deleteOption": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:DeleteOptions"
}
],
"description": "Specify what happens to the public IP address when the VM is deleted"
},
"dnsSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachinePublicIPAddressDnsSettingsConfiguration",
"description": "The dns settings to be applied on the publicIP addresses ."
},
"idleTimeoutInMinutes": {
"type": "integer",
"description": "The idle timeout of the public IP address."
},
"ipTags": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineIpTag"
},
"description": "The list of IP tags associated with the public IP address."
},
"name": {
"type": "string",
"description": "The publicIP address configuration name."
},
"publicIPAddressVersion": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:IPVersions"
}
],
"description": "Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'."
},
"publicIPAllocationMethod": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:PublicIPAllocationMethod"
}
],
"description": "Specify the public IP allocation type"
},
"publicIPPrefix": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "The PublicIPPrefix from which to allocate publicIP addresses."
},
"sku": {
"type": "object",
"$ref": "#/types/azure-native:compute:PublicIPAddressSku",
"description": "Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible."
}
},
"type": "object",
"required": [
"name"
]
},
"azure-native:compute:VirtualMachinePublicIPAddressConfigurationResponse": {
"description": "Describes a virtual machines IP Configuration's PublicIPAddress configuration",
"properties": {
"deleteOption": {
"type": "string",
"description": "Specify what happens to the public IP address when the VM is deleted"
},
"dnsSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachinePublicIPAddressDnsSettingsConfigurationResponse",
"description": "The dns settings to be applied on the publicIP addresses ."
},
"idleTimeoutInMinutes": {
"type": "integer",
"description": "The idle timeout of the public IP address."
},
"ipTags": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineIpTagResponse"
},
"description": "The list of IP tags associated with the public IP address."
},
"name": {
"type": "string",
"description": "The publicIP address configuration name."
},
"publicIPAddressVersion": {
"type": "string",
"description": "Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'."
},
"publicIPAllocationMethod": {
"type": "string",
"description": "Specify the public IP allocation type"
},
"publicIPPrefix": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "The PublicIPPrefix from which to allocate publicIP addresses."
},
"sku": {
"type": "object",
"$ref": "#/types/azure-native:compute:PublicIPAddressSkuResponse",
"description": "Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible."
}
},
"type": "object",
"required": [
"name"
]
},
"azure-native:compute:VirtualMachinePublicIPAddressDnsSettingsConfiguration": {
"description": "Describes a virtual machines network configuration's DNS settings.",
"properties": {
"domainNameLabel": {
"type": "string",
"description": "The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID."
}
},
"type": "object",
"required": [
"domainNameLabel"
]
},
"azure-native:compute:VirtualMachinePublicIPAddressDnsSettingsConfigurationResponse": {
"description": "Describes a virtual machines network configuration's DNS settings.",
"properties": {
"domainNameLabel": {
"type": "string",
"description": "The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID."
}
},
"type": "object",
"required": [
"domainNameLabel"
]
},
"azure-native:compute:VirtualMachineSizeTypes": {
"description": "Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.",
"type": "string",
"enum": [
{
"value": "Basic_A0"
},
{
"value": "Basic_A1"
},
{
"value": "Basic_A2"
},
{
"value": "Basic_A3"
},
{
"value": "Basic_A4"
},
{
"value": "Standard_A0"
},
{
"value": "Standard_A1"
},
{
"value": "Standard_A2"
},
{
"value": "Standard_A3"
},
{
"value": "Standard_A4"
},
{
"value": "Standard_A5"
},
{
"value": "Standard_A6"
},
{
"value": "Standard_A7"
},
{
"value": "Standard_A8"
},
{
"value": "Standard_A9"
},
{
"value": "Standard_A10"
},
{
"value": "Standard_A11"
},
{
"value": "Standard_A1_v2"
},
{
"value": "Standard_A2_v2"
},
{
"value": "Standard_A4_v2"
},
{
"value": "Standard_A8_v2"
},
{
"value": "Standard_A2m_v2"
},
{
"value": "Standard_A4m_v2"
},
{
"value": "Standard_A8m_v2"
},
{
"value": "Standard_B1s"
},
{
"value": "Standard_B1ms"
},
{
"value": "Standard_B2s"
},
{
"value": "Standard_B2ms"
},
{
"value": "Standard_B4ms"
},
{
"value": "Standard_B8ms"
},
{
"value": "Standard_D1"
},
{
"value": "Standard_D2"
},
{
"value": "Standard_D3"
},
{
"value": "Standard_D4"
},
{
"value": "Standard_D11"
},
{
"value": "Standard_D12"
},
{
"value": "Standard_D13"
},
{
"value": "Standard_D14"
},
{
"value": "Standard_D1_v2"
},
{
"value": "Standard_D2_v2"
},
{
"value": "Standard_D3_v2"
},
{
"value": "Standard_D4_v2"
},
{
"value": "Standard_D5_v2"
},
{
"value": "Standard_D2_v3"
},
{
"value": "Standard_D4_v3"
},
{
"value": "Standard_D8_v3"
},
{
"value": "Standard_D16_v3"
},
{
"value": "Standard_D32_v3"
},
{
"value": "Standard_D64_v3"
},
{
"value": "Standard_D2s_v3"
},
{
"value": "Standard_D4s_v3"
},
{
"value": "Standard_D8s_v3"
},
{
"value": "Standard_D16s_v3"
},
{
"value": "Standard_D32s_v3"
},
{
"value": "Standard_D64s_v3"
},
{
"value": "Standard_D11_v2"
},
{
"value": "Standard_D12_v2"
},
{
"value": "Standard_D13_v2"
},
{
"value": "Standard_D14_v2"
},
{
"value": "Standard_D15_v2"
},
{
"value": "Standard_DS1"
},
{
"value": "Standard_DS2"
},
{
"value": "Standard_DS3"
},
{
"value": "Standard_DS4"
},
{
"value": "Standard_DS11"
},
{
"value": "Standard_DS12"
},
{
"value": "Standard_DS13"
},
{
"value": "Standard_DS14"
},
{
"value": "Standard_DS1_v2"
},
{
"value": "Standard_DS2_v2"
},
{
"value": "Standard_DS3_v2"
},
{
"value": "Standard_DS4_v2"
},
{
"value": "Standard_DS5_v2"
},
{
"value": "Standard_DS11_v2"
},
{
"value": "Standard_DS12_v2"
},
{
"value": "Standard_DS13_v2"
},
{
"value": "Standard_DS14_v2"
},
{
"value": "Standard_DS15_v2"
},
{
"value": "Standard_DS13-4_v2"
},
{
"value": "Standard_DS13-2_v2"
},
{
"value": "Standard_DS14-8_v2"
},
{
"value": "Standard_DS14-4_v2"
},
{
"value": "Standard_E2_v3"
},
{
"value": "Standard_E4_v3"
},
{
"value": "Standard_E8_v3"
},
{
"value": "Standard_E16_v3"
},
{
"value": "Standard_E32_v3"
},
{
"value": "Standard_E64_v3"
},
{
"value": "Standard_E2s_v3"
},
{
"value": "Standard_E4s_v3"
},
{
"value": "Standard_E8s_v3"
},
{
"value": "Standard_E16s_v3"
},
{
"value": "Standard_E32s_v3"
},
{
"value": "Standard_E64s_v3"
},
{
"value": "Standard_E32-16_v3"
},
{
"value": "Standard_E32-8s_v3"
},
{
"value": "Standard_E64-32s_v3"
},
{
"value": "Standard_E64-16s_v3"
},
{
"value": "Standard_F1"
},
{
"value": "Standard_F2"
},
{
"value": "Standard_F4"
},
{
"value": "Standard_F8"
},
{
"value": "Standard_F16"
},
{
"value": "Standard_F1s"
},
{
"value": "Standard_F2s"
},
{
"value": "Standard_F4s"
},
{
"value": "Standard_F8s"
},
{
"value": "Standard_F16s"
},
{
"value": "Standard_F2s_v2"
},
{
"value": "Standard_F4s_v2"
},
{
"value": "Standard_F8s_v2"
},
{
"value": "Standard_F16s_v2"
},
{
"value": "Standard_F32s_v2"
},
{
"value": "Standard_F64s_v2"
},
{
"value": "Standard_F72s_v2"
},
{
"value": "Standard_G1"
},
{
"value": "Standard_G2"
},
{
"value": "Standard_G3"
},
{
"value": "Standard_G4"
},
{
"value": "Standard_G5"
},
{
"value": "Standard_GS1"
},
{
"value": "Standard_GS2"
},
{
"value": "Standard_GS3"
},
{
"value": "Standard_GS4"
},
{
"value": "Standard_GS5"
},
{
"value": "Standard_GS4-8"
},
{
"value": "Standard_GS4-4"
},
{
"value": "Standard_GS5-16"
},
{
"value": "Standard_GS5-8"
},
{
"value": "Standard_H8"
},
{
"value": "Standard_H16"
},
{
"value": "Standard_H8m"
},
{
"value": "Standard_H16m"
},
{
"value": "Standard_H16r"
},
{
"value": "Standard_H16mr"
},
{
"value": "Standard_L4s"
},
{
"value": "Standard_L8s"
},
{
"value": "Standard_L16s"
},
{
"value": "Standard_L32s"
},
{
"value": "Standard_M64s"
},
{
"value": "Standard_M64ms"
},
{
"value": "Standard_M128s"
},
{
"value": "Standard_M128ms"
},
{
"value": "Standard_M64-32ms"
},
{
"value": "Standard_M64-16ms"
},
{
"value": "Standard_M128-64ms"
},
{
"value": "Standard_M128-32ms"
},
{
"value": "Standard_NC6"
},
{
"value": "Standard_NC12"
},
{
"value": "Standard_NC24"
},
{
"value": "Standard_NC24r"
},
{
"value": "Standard_NC6s_v2"
},
{
"value": "Standard_NC12s_v2"
},
{
"value": "Standard_NC24s_v2"
},
{
"value": "Standard_NC24rs_v2"
},
{
"value": "Standard_NC6s_v3"
},
{
"value": "Standard_NC12s_v3"
},
{
"value": "Standard_NC24s_v3"
},
{
"value": "Standard_NC24rs_v3"
},
{
"value": "Standard_ND6s"
},
{
"value": "Standard_ND12s"
},
{
"value": "Standard_ND24s"
},
{
"value": "Standard_ND24rs"
},
{
"value": "Standard_NV6"
},
{
"value": "Standard_NV12"
},
{
"value": "Standard_NV24"
}
]
},
"azure-native:compute:WinRMConfiguration": {
"description": "Describes Windows Remote Management configuration of the VM",
"properties": {
"listeners": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:WinRMListener"
},
"description": "The list of Windows Remote Management listeners"
}
},
"type": "object"
},
"azure-native:compute:WinRMConfigurationResponse": {
"description": "Describes Windows Remote Management configuration of the VM",
"properties": {
"listeners": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:WinRMListenerResponse"
},
"description": "The list of Windows Remote Management listeners"
}
},
"type": "object"
},
"azure-native:compute:WinRMListener": {
"description": "Describes Protocol and thumbprint of Windows Remote Management listener",
"properties": {
"certificateUrl": {
"type": "string",
"description": "This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> \"data\":\"<Base64-encoded-certificate>\",<br> \"dataType\":\"pfx\",<br> \"password\":\"<pfx-file-password>\"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows)."
},
"protocol": {
"$ref": "#/types/azure-native:compute:ProtocolTypes",
"description": "Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**"
}
},
"type": "object"
},
"azure-native:compute:WinRMListenerResponse": {
"description": "Describes Protocol and thumbprint of Windows Remote Management listener",
"properties": {
"certificateUrl": {
"type": "string",
"description": "This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> \"data\":\"<Base64-encoded-certificate>\",<br> \"dataType\":\"pfx\",<br> \"password\":\"<pfx-file-password>\"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows)."
},
"protocol": {
"type": "string",
"description": "Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**"
}
},
"type": "object"
},
"azure-native:compute:WindowsConfiguration": {
"description": "Specifies Windows operating system settings on the virtual machine.",
"properties": {
"additionalUnattendContent": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:AdditionalUnattendContent"
},
"description": "Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup."
},
"enableAutomaticUpdates": {
"type": "boolean",
"description": "Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning."
},
"enableVMAgentPlatformUpdates": {
"type": "boolean",
"description": "Indicates whether VMAgent Platform Updates is enabled for the Windows virtual machine. Default value is false."
},
"patchSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:PatchSettings",
"description": "[Preview Feature] Specifies settings related to VM Guest Patching on Windows."
},
"provisionVMAgent": {
"type": "boolean",
"description": "Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later."
},
"timeZone": {
"type": "string",
"description": "Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones)."
},
"winRM": {
"type": "object",
"$ref": "#/types/azure-native:compute:WinRMConfiguration",
"description": "Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell."
}
},
"type": "object"
},
"azure-native:compute:WindowsConfigurationResponse": {
"description": "Specifies Windows operating system settings on the virtual machine.",
"properties": {
"additionalUnattendContent": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:AdditionalUnattendContentResponse"
},
"description": "Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup."
},
"enableAutomaticUpdates": {
"type": "boolean",
"description": "Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning."
},
"enableVMAgentPlatformUpdates": {
"type": "boolean",
"description": "Indicates whether VMAgent Platform Updates is enabled for the Windows virtual machine. Default value is false."
},
"patchSettings": {
"type": "object",
"$ref": "#/types/azure-native:compute:PatchSettingsResponse",
"description": "[Preview Feature] Specifies settings related to VM Guest Patching on Windows."
},
"provisionVMAgent": {
"type": "boolean",
"description": "Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later."
},
"timeZone": {
"type": "string",
"description": "Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones)."
},
"winRM": {
"type": "object",
"$ref": "#/types/azure-native:compute:WinRMConfigurationResponse",
"description": "Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell."
}
},
"type": "object"
},
"azure-native:compute:WindowsPatchAssessmentMode": {
"description": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - You control the timing of patch assessments on a virtual machine.<br /><br /> **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. ",
"type": "string",
"enum": [
{
"value": "ImageDefault"
},
{
"value": "AutomaticByPlatform"
}
]
},
"azure-native:compute:WindowsVMGuestPatchAutomaticByPlatformRebootSetting": {
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.",
"type": "string",
"enum": [
{
"value": "Unknown"
},
{
"value": "IfRequired"
},
{
"value": "Never"
},
{
"value": "Always"
}
]
},
"azure-native:compute:WindowsVMGuestPatchAutomaticByPlatformSettings": {
"description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings.",
"properties": {
"bypassPlatformSafetyChecksOnUserSchedule": {
"type": "boolean",
"description": "Enables customer to schedule patching without accidental upgrades"
},
"rebootSetting": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:WindowsVMGuestPatchAutomaticByPlatformRebootSetting"
}
],
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations."
}
},
"type": "object"
},
"azure-native:compute:WindowsVMGuestPatchAutomaticByPlatformSettingsResponse": {
"description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings.",
"properties": {
"bypassPlatformSafetyChecksOnUserSchedule": {
"type": "boolean",
"description": "Enables customer to schedule patching without accidental upgrades"
},
"rebootSetting": {
"type": "string",
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations."
}
},
"type": "object"
},
"azure-native:compute:WindowsVMGuestPatchMode": {
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ",
"type": "string",
"enum": [
{
"value": "Manual"
},
{
"value": "AutomaticByOS"
},
{
"value": "AutomaticByPlatform"
}
]
}
},
"resources": {
"azure-native:compute:VirtualMachine": {
"description": "Describes a Virtual Machine.\nAzure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 2021-03-01.\n\nOther available API versions: 2023-07-01, 2023-09-01, 2024-03-01.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Create a Linux vm with a patch setting assessmentMode of ImageDefault.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n LinuxConfiguration = new AzureNative.Compute.Inputs.LinuxConfigurationArgs\n {\n PatchSettings = new AzureNative.Compute.Inputs.LinuxPatchSettingsArgs\n {\n AssessmentMode = AzureNative.Compute.LinuxPatchAssessmentMode.ImageDefault,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"UbuntuServer\",\n Publisher = \"Canonical\",\n Sku = \"16.04-LTS\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2s_v3),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tLinuxConfiguration: &compute.LinuxConfigurationArgs{\n\t\t\t\t\tPatchSettings: &compute.LinuxPatchSettingsArgs{\n\t\t\t\t\t\tAssessmentMode: pulumi.String(compute.LinuxPatchAssessmentModeImageDefault),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"UbuntuServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"Canonical\"),\n\t\t\t\t\tSku: pulumi.String(\"16.04-LTS\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxPatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2s_v3\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .linuxConfiguration(LinuxConfigurationArgs.builder()\n .patchSettings(LinuxPatchSettingsArgs.builder()\n .assessmentMode(\"ImageDefault\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"UbuntuServer\")\n .publisher(\"Canonical\")\n .sku(\"16.04-LTS\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n linuxConfiguration: {\n patchSettings: {\n assessmentMode: azure_native.compute.LinuxPatchAssessmentMode.ImageDefault,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"UbuntuServer\",\n publisher: \"Canonical\",\n sku: \"16.04-LTS\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2S_V3,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n linux_configuration=azure_native.compute.LinuxConfigurationArgs(\n patch_settings=azure_native.compute.LinuxPatchSettingsArgs(\n assessment_mode=azure_native.compute.LinuxPatchAssessmentMode.IMAGE_DEFAULT,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"UbuntuServer\",\n publisher=\"Canonical\",\n sku=\"16.04-LTS\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D2s_v3\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n linuxConfiguration:\n patchSettings:\n assessmentMode: ImageDefault\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: UbuntuServer\n publisher: Canonical\n sku: 16.04-LTS\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Linux vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n LinuxConfiguration = new AzureNative.Compute.Inputs.LinuxConfigurationArgs\n {\n PatchSettings = new AzureNative.Compute.Inputs.LinuxPatchSettingsArgs\n {\n AssessmentMode = AzureNative.Compute.LinuxPatchAssessmentMode.AutomaticByPlatform,\n AutomaticByPlatformSettings = new AzureNative.Compute.Inputs.LinuxVMGuestPatchAutomaticByPlatformSettingsArgs\n {\n BypassPlatformSafetyChecksOnUserSchedule = true,\n RebootSetting = AzureNative.Compute.LinuxVMGuestPatchAutomaticByPlatformRebootSetting.Never,\n },\n PatchMode = AzureNative.Compute.LinuxVMGuestPatchMode.AutomaticByPlatform,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"UbuntuServer\",\n Publisher = \"Canonical\",\n Sku = \"16.04-LTS\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2s_v3),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tLinuxConfiguration: &compute.LinuxConfigurationArgs{\n\t\t\t\t\tPatchSettings: &compute.LinuxPatchSettingsArgs{\n\t\t\t\t\t\tAssessmentMode: pulumi.String(compute.LinuxPatchAssessmentModeAutomaticByPlatform),\n\t\t\t\t\t\tAutomaticByPlatformSettings: &compute.LinuxVMGuestPatchAutomaticByPlatformSettingsArgs{\n\t\t\t\t\t\t\tBypassPlatformSafetyChecksOnUserSchedule: pulumi.Bool(true),\n\t\t\t\t\t\t\tRebootSetting: pulumi.String(compute.LinuxVMGuestPatchAutomaticByPlatformRebootSettingNever),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.LinuxVMGuestPatchModeAutomaticByPlatform),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"UbuntuServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"Canonical\"),\n\t\t\t\t\tSku: pulumi.String(\"16.04-LTS\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxPatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxVMGuestPatchAutomaticByPlatformSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2s_v3\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .linuxConfiguration(LinuxConfigurationArgs.builder()\n .patchSettings(LinuxPatchSettingsArgs.builder()\n .assessmentMode(\"AutomaticByPlatform\")\n .automaticByPlatformSettings(LinuxVMGuestPatchAutomaticByPlatformSettingsArgs.builder()\n .bypassPlatformSafetyChecksOnUserSchedule(true)\n .rebootSetting(\"Never\")\n .build())\n .patchMode(\"AutomaticByPlatform\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"UbuntuServer\")\n .publisher(\"Canonical\")\n .sku(\"16.04-LTS\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n linuxConfiguration: {\n patchSettings: {\n assessmentMode: azure_native.compute.LinuxPatchAssessmentMode.AutomaticByPlatform,\n automaticByPlatformSettings: {\n bypassPlatformSafetyChecksOnUserSchedule: true,\n rebootSetting: azure_native.compute.LinuxVMGuestPatchAutomaticByPlatformRebootSetting.Never,\n },\n patchMode: azure_native.compute.LinuxVMGuestPatchMode.AutomaticByPlatform,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"UbuntuServer\",\n publisher: \"Canonical\",\n sku: \"16.04-LTS\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2S_V3,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n linux_configuration=azure_native.compute.LinuxConfigurationArgs(\n patch_settings=azure_native.compute.LinuxPatchSettingsArgs(\n assessment_mode=azure_native.compute.LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM,\n automatic_by_platform_settings=azure_native.compute.LinuxVMGuestPatchAutomaticByPlatformSettingsArgs(\n bypass_platform_safety_checks_on_user_schedule=True,\n reboot_setting=azure_native.compute.LinuxVMGuestPatchAutomaticByPlatformRebootSetting.NEVER,\n ),\n patch_mode=azure_native.compute.LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"UbuntuServer\",\n publisher=\"Canonical\",\n sku=\"16.04-LTS\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D2s_v3\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n linuxConfiguration:\n patchSettings:\n assessmentMode: AutomaticByPlatform\n automaticByPlatformSettings:\n bypassPlatformSafetyChecksOnUserSchedule: true\n rebootSetting: Never\n patchMode: AutomaticByPlatform\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: UbuntuServer\n publisher: Canonical\n sku: 16.04-LTS\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Linux vm with a patch setting patchMode of ImageDefault.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n LinuxConfiguration = new AzureNative.Compute.Inputs.LinuxConfigurationArgs\n {\n PatchSettings = new AzureNative.Compute.Inputs.LinuxPatchSettingsArgs\n {\n PatchMode = AzureNative.Compute.LinuxVMGuestPatchMode.ImageDefault,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"UbuntuServer\",\n Publisher = \"Canonical\",\n Sku = \"16.04-LTS\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2s_v3),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tLinuxConfiguration: &compute.LinuxConfigurationArgs{\n\t\t\t\t\tPatchSettings: &compute.LinuxPatchSettingsArgs{\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.LinuxVMGuestPatchModeImageDefault),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"UbuntuServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"Canonical\"),\n\t\t\t\t\tSku: pulumi.String(\"16.04-LTS\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxPatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2s_v3\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .linuxConfiguration(LinuxConfigurationArgs.builder()\n .patchSettings(LinuxPatchSettingsArgs.builder()\n .patchMode(\"ImageDefault\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"UbuntuServer\")\n .publisher(\"Canonical\")\n .sku(\"16.04-LTS\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n linuxConfiguration: {\n patchSettings: {\n patchMode: azure_native.compute.LinuxVMGuestPatchMode.ImageDefault,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"UbuntuServer\",\n publisher: \"Canonical\",\n sku: \"16.04-LTS\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2S_V3,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n linux_configuration=azure_native.compute.LinuxConfigurationArgs(\n patch_settings=azure_native.compute.LinuxPatchSettingsArgs(\n patch_mode=azure_native.compute.LinuxVMGuestPatchMode.IMAGE_DEFAULT,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"UbuntuServer\",\n publisher=\"Canonical\",\n sku=\"16.04-LTS\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D2s_v3\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n linuxConfiguration:\n patchSettings:\n patchMode: ImageDefault\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: UbuntuServer\n publisher: Canonical\n sku: 16.04-LTS\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Linux vm with a patch settings patchMode and assessmentMode set to AutomaticByPlatform.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n LinuxConfiguration = new AzureNative.Compute.Inputs.LinuxConfigurationArgs\n {\n PatchSettings = new AzureNative.Compute.Inputs.LinuxPatchSettingsArgs\n {\n AssessmentMode = AzureNative.Compute.LinuxPatchAssessmentMode.AutomaticByPlatform,\n PatchMode = AzureNative.Compute.LinuxVMGuestPatchMode.AutomaticByPlatform,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"UbuntuServer\",\n Publisher = \"Canonical\",\n Sku = \"16.04-LTS\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2s_v3),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tLinuxConfiguration: &compute.LinuxConfigurationArgs{\n\t\t\t\t\tPatchSettings: &compute.LinuxPatchSettingsArgs{\n\t\t\t\t\t\tAssessmentMode: pulumi.String(compute.LinuxPatchAssessmentModeAutomaticByPlatform),\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.LinuxVMGuestPatchModeAutomaticByPlatform),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"UbuntuServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"Canonical\"),\n\t\t\t\t\tSku: pulumi.String(\"16.04-LTS\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxPatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2s_v3\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .linuxConfiguration(LinuxConfigurationArgs.builder()\n .patchSettings(LinuxPatchSettingsArgs.builder()\n .assessmentMode(\"AutomaticByPlatform\")\n .patchMode(\"AutomaticByPlatform\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"UbuntuServer\")\n .publisher(\"Canonical\")\n .sku(\"16.04-LTS\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n linuxConfiguration: {\n patchSettings: {\n assessmentMode: azure_native.compute.LinuxPatchAssessmentMode.AutomaticByPlatform,\n patchMode: azure_native.compute.LinuxVMGuestPatchMode.AutomaticByPlatform,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"UbuntuServer\",\n publisher: \"Canonical\",\n sku: \"16.04-LTS\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2S_V3,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n linux_configuration=azure_native.compute.LinuxConfigurationArgs(\n patch_settings=azure_native.compute.LinuxPatchSettingsArgs(\n assessment_mode=azure_native.compute.LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM,\n patch_mode=azure_native.compute.LinuxVMGuestPatchMode.AUTOMATIC_BY_PLATFORM,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"UbuntuServer\",\n publisher=\"Canonical\",\n sku=\"16.04-LTS\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D2s_v3\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n linuxConfiguration:\n patchSettings:\n assessmentMode: AutomaticByPlatform\n patchMode: AutomaticByPlatform\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: UbuntuServer\n publisher: Canonical\n sku: 16.04-LTS\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM from a community gallery image\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n CommunityGalleryImageId = \"/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tCommunityGalleryImageId: pulumi.String(\"/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .communityGalleryImageId(\"/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n communityGalleryImageId: \"/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n community_gallery_image_id=\"/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n communityGalleryImageId: /CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM from a shared gallery image\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n SharedGalleryImageId = \"/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tSharedGalleryImageId: pulumi.String(\"/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .sharedGalleryImageId(\"/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n sharedGalleryImageId: \"/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n shared_gallery_image_id=\"/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n sharedGalleryImageId: /SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with Disk Controller Type\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n StorageUri = \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D4_v3,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n DiskControllerType = AzureNative.Compute.DiskControllerTypes.NVMe,\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n UserData = \"U29tZSBDdXN0b20gRGF0YQ==\",\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D4_v3),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tDiskControllerType: pulumi.String(compute.DiskControllerTypesNVMe),\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tUserData: pulumi.String(\"U29tZSBDdXN0b20gRGF0YQ==\"),\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .storageUri(\"http://{existing-storage-account-name}.blob.core.windows.net\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D4_v3\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .diskControllerType(\"NVMe\")\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .userData(\"U29tZSBDdXN0b20gRGF0YQ==\")\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n storageUri: \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D4_v3,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n diskControllerType: azure_native.compute.DiskControllerTypes.NVMe,\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n userData: \"U29tZSBDdXN0b20gRGF0YQ==\",\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n storage_uri=\"http://{existing-storage-account-name}.blob.core.windows.net\",\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D4_V3,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n disk_controller_type=azure_native.compute.DiskControllerTypes.NV_ME,\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n user_data=\"U29tZSBDdXN0b20gRGF0YQ==\",\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n storageUri: http://{existing-storage-account-name}.blob.core.windows.net\n hardwareProfile:\n vmSize: Standard_D4_v3\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n diskControllerType: NVMe\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n userData: U29tZSBDdXN0b20gRGF0YQ==\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with HibernationEnabled\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n AdditionalCapabilities = new AzureNative.Compute.Inputs.AdditionalCapabilitiesArgs\n {\n HibernationEnabled = true,\n },\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n StorageUri = \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n Location = \"eastus2euap\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"{vm-name}\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2019-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"vmOSdisk\",\n },\n },\n VmName = \"{vm-name}\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tAdditionalCapabilities: &compute.AdditionalCapabilitiesArgs{\n\t\t\t\tHibernationEnabled: pulumi.Bool(true),\n\t\t\t},\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2s_v3),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"eastus2euap\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"{vm-name}\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2019-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"vmOSdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"{vm-name}\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.AdditionalCapabilitiesArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .additionalCapabilities(AdditionalCapabilitiesArgs.builder()\n .hibernationEnabled(true)\n .build())\n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .storageUri(\"http://{existing-storage-account-name}.blob.core.windows.net\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2s_v3\")\n .build())\n .location(\"eastus2euap\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"{vm-name}\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2019-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"vmOSdisk\")\n .build())\n .build())\n .vmName(\"{vm-name}\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n additionalCapabilities: {\n hibernationEnabled: true,\n },\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n storageUri: \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n location: \"eastus2euap\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"{vm-name}\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2019-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"vmOSdisk\",\n },\n },\n vmName: \"{vm-name}\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n additional_capabilities=azure_native.compute.AdditionalCapabilitiesArgs(\n hibernation_enabled=True,\n ),\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n storage_uri=\"http://{existing-storage-account-name}.blob.core.windows.net\",\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2S_V3,\n ),\n location=\"eastus2euap\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"{vm-name}\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2019-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"vmOSdisk\",\n ),\n ),\n vm_name=\"{vm-name}\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n additionalCapabilities:\n hibernationEnabled: true\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n storageUri: http://{existing-storage-account-name}.blob.core.windows.net\n hardwareProfile:\n vmSize: Standard_D2s_v3\n location: eastus2euap\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: '{vm-name}'\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2019-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: vmOSdisk\n vmName: '{vm-name}'\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with Uefi Settings of secureBoot and vTPM.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs\n {\n SecurityType = AzureNative.Compute.SecurityTypes.TrustedLaunch,\n UefiSettings = new AzureNative.Compute.Inputs.UefiSettingsArgs\n {\n SecureBootEnabled = true,\n VTpmEnabled = true,\n },\n },\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"windowsserver-gen2preview-preview\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"windows10-tvm\",\n Version = \"18363.592.2001092016\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.StandardSSD_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2s_v3),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tSecurityProfile: &compute.SecurityProfileArgs{\n\t\t\t\tSecurityType: pulumi.String(compute.SecurityTypesTrustedLaunch),\n\t\t\t\tUefiSettings: &compute.UefiSettingsArgs{\n\t\t\t\t\tSecureBootEnabled: pulumi.Bool(true),\n\t\t\t\t\tVTpmEnabled: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"windowsserver-gen2preview-preview\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"windows10-tvm\"),\n\t\t\t\t\tVersion: pulumi.String(\"18363.592.2001092016\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_StandardSSD_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.UefiSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2s_v3\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .securityProfile(SecurityProfileArgs.builder()\n .securityType(\"TrustedLaunch\")\n .uefiSettings(UefiSettingsArgs.builder()\n .secureBootEnabled(true)\n .vTpmEnabled(true)\n .build())\n .build())\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"windowsserver-gen2preview-preview\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"windows10-tvm\")\n .version(\"18363.592.2001092016\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"StandardSSD_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2s_v3,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n securityProfile: {\n securityType: azure_native.compute.SecurityTypes.TrustedLaunch,\n uefiSettings: {\n secureBootEnabled: true,\n vTpmEnabled: true,\n },\n },\n storageProfile: {\n imageReference: {\n offer: \"windowsserver-gen2preview-preview\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"windows10-tvm\",\n version: \"18363.592.2001092016\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.StandardSSD_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2S_V3,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n security_profile=azure_native.compute.SecurityProfileArgs(\n security_type=azure_native.compute.SecurityTypes.TRUSTED_LAUNCH,\n uefi_settings=azure_native.compute.UefiSettingsArgs(\n secure_boot_enabled=True,\n v_tpm_enabled=True,\n ),\n ),\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"windowsserver-gen2preview-preview\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"windows10-tvm\",\n version=\"18363.592.2001092016\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_SS_D_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D2s_v3\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n securityProfile:\n securityType: TrustedLaunch\n uefiSettings:\n secureBootEnabled: true\n vTpmEnabled: true\n storageProfile:\n imageReference:\n offer: windowsserver-gen2preview-preview\n publisher: MicrosoftWindowsServer\n sku: windows10-tvm\n version: 18363.592.2001092016\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n managedDisk:\n storageAccountType: StandardSSD_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with UserData\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n StorageUri = \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"{vm-name}\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"vmOSdisk\",\n },\n },\n UserData = \"RXhhbXBsZSBVc2VyRGF0YQ==\",\n VmName = \"{vm-name}\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"{vm-name}\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"vmOSdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tUserData: pulumi.String(\"RXhhbXBsZSBVc2VyRGF0YQ==\"),\n\t\t\tVmName: pulumi.String(\"{vm-name}\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .storageUri(\"http://{existing-storage-account-name}.blob.core.windows.net\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"{vm-name}\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"vmOSdisk\")\n .build())\n .build())\n .userData(\"RXhhbXBsZSBVc2VyRGF0YQ==\")\n .vmName(\"{vm-name}\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n storageUri: \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"{vm-name}\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"vmOSdisk\",\n },\n },\n userData: \"RXhhbXBsZSBVc2VyRGF0YQ==\",\n vmName: \"{vm-name}\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n storage_uri=\"http://{existing-storage-account-name}.blob.core.windows.net\",\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"{vm-name}\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"vmOSdisk\",\n ),\n ),\n user_data=\"RXhhbXBsZSBVc2VyRGF0YQ==\",\n vm_name=\"{vm-name}\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n storageUri: http://{existing-storage-account-name}.blob.core.windows.net\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: '{vm-name}'\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: vmOSdisk\n userData: RXhhbXBsZSBVc2VyRGF0YQ==\n vmName: '{vm-name}'\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with VM Size Properties\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n StorageUri = \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D4_v3,\n VmSizeProperties = new AzureNative.Compute.Inputs.VMSizePropertiesArgs\n {\n VCPUsAvailable = 1,\n VCPUsPerCore = 1,\n },\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n UserData = \"U29tZSBDdXN0b20gRGF0YQ==\",\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D4_v3),\n\t\t\t\tVmSizeProperties: &compute.VMSizePropertiesArgs{\n\t\t\t\t\tVCPUsAvailable: pulumi.Int(1),\n\t\t\t\t\tVCPUsPerCore: pulumi.Int(1),\n\t\t\t\t},\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tUserData: pulumi.String(\"U29tZSBDdXN0b20gRGF0YQ==\"),\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.VMSizePropertiesArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .storageUri(\"http://{existing-storage-account-name}.blob.core.windows.net\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D4_v3\")\n .vmSizeProperties(VMSizePropertiesArgs.builder()\n .vCPUsAvailable(1)\n .vCPUsPerCore(1)\n .build())\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .userData(\"U29tZSBDdXN0b20gRGF0YQ==\")\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n storageUri: \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D4_v3,\n vmSizeProperties: {\n vCPUsAvailable: 1,\n vCPUsPerCore: 1,\n },\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n userData: \"U29tZSBDdXN0b20gRGF0YQ==\",\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n storage_uri=\"http://{existing-storage-account-name}.blob.core.windows.net\",\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D4_V3,\n vm_size_properties=azure_native.compute.VMSizePropertiesArgs(\n v_cpus_available=1,\n v_cpus_per_core=1,\n ),\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n user_data=\"U29tZSBDdXN0b20gRGF0YQ==\",\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n storageUri: http://{existing-storage-account-name}.blob.core.windows.net\n hardwareProfile:\n vmSize: Standard_D4_v3\n vmSizeProperties:\n vCPUsAvailable: 1\n vCPUsPerCore: 1\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n userData: U29tZSBDdXN0b20gRGF0YQ==\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with network interface configuration\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkApiVersion = AzureNative.Compute.NetworkApiVersion.NetworkApiVersion_2020_11_01,\n NetworkInterfaceConfigurations = new[]\n {\n new AzureNative.Compute.Inputs.VirtualMachineNetworkInterfaceConfigurationArgs\n {\n DeleteOption = AzureNative.Compute.DeleteOptions.Delete,\n IpConfigurations = new[]\n {\n new AzureNative.Compute.Inputs.VirtualMachineNetworkInterfaceIPConfigurationArgs\n {\n Name = \"{ip-config-name}\",\n Primary = true,\n PublicIPAddressConfiguration = new AzureNative.Compute.Inputs.VirtualMachinePublicIPAddressConfigurationArgs\n {\n DeleteOption = AzureNative.Compute.DeleteOptions.Detach,\n Name = \"{publicIP-config-name}\",\n PublicIPAllocationMethod = AzureNative.Compute.PublicIPAllocationMethod.Static,\n Sku = new AzureNative.Compute.Inputs.PublicIPAddressSkuArgs\n {\n Name = AzureNative.Compute.PublicIPAddressSkuName.Basic,\n Tier = AzureNative.Compute.PublicIPAddressSkuTier.Global,\n },\n },\n },\n },\n Name = \"{nic-config-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkApiVersion: pulumi.String(compute.NetworkApiVersion_2020_11_01),\n\t\t\t\tNetworkInterfaceConfigurations: compute.VirtualMachineNetworkInterfaceConfigurationArray{\n\t\t\t\t\t&compute.VirtualMachineNetworkInterfaceConfigurationArgs{\n\t\t\t\t\t\tDeleteOption: pulumi.String(compute.DeleteOptionsDelete),\n\t\t\t\t\t\tIpConfigurations: compute.VirtualMachineNetworkInterfaceIPConfigurationArray{\n\t\t\t\t\t\t\t&compute.VirtualMachineNetworkInterfaceIPConfigurationArgs{\n\t\t\t\t\t\t\t\tName: pulumi.String(\"{ip-config-name}\"),\n\t\t\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t\t\t\tPublicIPAddressConfiguration: &compute.VirtualMachinePublicIPAddressConfigurationArgs{\n\t\t\t\t\t\t\t\t\tDeleteOption: pulumi.String(compute.DeleteOptionsDetach),\n\t\t\t\t\t\t\t\t\tName: pulumi.String(\"{publicIP-config-name}\"),\n\t\t\t\t\t\t\t\t\tPublicIPAllocationMethod: pulumi.String(compute.PublicIPAllocationMethodStatic),\n\t\t\t\t\t\t\t\t\tSku: &compute.PublicIPAddressSkuArgs{\n\t\t\t\t\t\t\t\t\t\tName: pulumi.String(compute.PublicIPAddressSkuNameBasic),\n\t\t\t\t\t\t\t\t\t\tTier: pulumi.String(compute.PublicIPAddressSkuTierGlobal),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tName: pulumi.String(\"{nic-config-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkApiVersion(\"2020-11-01\")\n .networkInterfaceConfigurations(VirtualMachineNetworkInterfaceConfigurationArgs.builder()\n .deleteOption(\"Delete\")\n .ipConfigurations(VirtualMachineNetworkInterfaceIPConfigurationArgs.builder()\n .name(\"{ip-config-name}\")\n .primary(true)\n .publicIPAddressConfiguration(VirtualMachinePublicIPAddressConfigurationArgs.builder()\n .deleteOption(\"Detach\")\n .name(\"{publicIP-config-name}\")\n .publicIPAllocationMethod(\"Static\")\n .sku(PublicIPAddressSkuArgs.builder()\n .name(\"Basic\")\n .tier(\"Global\")\n .build())\n .build())\n .build())\n .name(\"{nic-config-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkApiVersion: azure_native.compute.NetworkApiVersion.NetworkApiVersion_2020_11_01,\n networkInterfaceConfigurations: [{\n deleteOption: azure_native.compute.DeleteOptions.Delete,\n ipConfigurations: [{\n name: \"{ip-config-name}\",\n primary: true,\n publicIPAddressConfiguration: {\n deleteOption: azure_native.compute.DeleteOptions.Detach,\n name: \"{publicIP-config-name}\",\n publicIPAllocationMethod: azure_native.compute.PublicIPAllocationMethod.Static,\n sku: {\n name: azure_native.compute.PublicIPAddressSkuName.Basic,\n tier: azure_native.compute.PublicIPAddressSkuTier.Global,\n },\n },\n }],\n name: \"{nic-config-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_api_version=azure_native.compute.NetworkApiVersion.NETWORK_API_VERSION_2020_11_01,\n network_interface_configurations=[azure_native.compute.VirtualMachineNetworkInterfaceConfigurationArgs(\n delete_option=azure_native.compute.DeleteOptions.DELETE,\n ip_configurations=[azure_native.compute.VirtualMachineNetworkInterfaceIPConfigurationArgs(\n name=\"{ip-config-name}\",\n primary=True,\n public_ip_address_configuration=azure_native.compute.VirtualMachinePublicIPAddressConfigurationArgs(\n delete_option=azure_native.compute.DeleteOptions.DETACH,\n name=\"{publicIP-config-name}\",\n public_ip_allocation_method=azure_native.compute.PublicIPAllocationMethod.STATIC,\n sku=azure_native.compute.PublicIPAddressSkuArgs(\n name=azure_native.compute.PublicIPAddressSkuName.BASIC,\n tier=azure_native.compute.PublicIPAddressSkuTier.GLOBAL_,\n ),\n ),\n )],\n name=\"{nic-config-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkApiVersion: 2020-11-01\n networkInterfaceConfigurations:\n - deleteOption: Delete\n ipConfigurations:\n - name: '{ip-config-name}'\n primary: true\n publicIPAddressConfiguration:\n deleteOption: Detach\n name: '{publicIP-config-name}'\n publicIPAllocationMethod: Static\n sku:\n name: Basic\n tier: Global\n name: '{nic-config-name}'\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with securityType ConfidentialVM with Customer Managed Keys\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = \"Standard_DC2as_v5\",\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs\n {\n SecurityType = AzureNative.Compute.SecurityTypes.ConfidentialVM,\n UefiSettings = new AzureNative.Compute.Inputs.UefiSettingsArgs\n {\n SecureBootEnabled = true,\n VTpmEnabled = true,\n },\n },\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"2019-datacenter-cvm\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"windows-cvm\",\n Version = \"17763.2183.2109130127\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n SecurityProfile = new AzureNative.Compute.Inputs.VMDiskSecurityProfileArgs\n {\n DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n SecurityEncryptionType = AzureNative.Compute.SecurityEncryptionTypes.DiskWithVMGuestState,\n },\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.StandardSSD_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(\"Standard_DC2as_v5\"),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tSecurityProfile: &compute.SecurityProfileArgs{\n\t\t\t\tSecurityType: pulumi.String(compute.SecurityTypesConfidentialVM),\n\t\t\t\tUefiSettings: &compute.UefiSettingsArgs{\n\t\t\t\t\tSecureBootEnabled: pulumi.Bool(true),\n\t\t\t\t\tVTpmEnabled: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"2019-datacenter-cvm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"windows-cvm\"),\n\t\t\t\t\tVersion: pulumi.String(\"17763.2183.2109130127\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tSecurityProfile: &compute.VMDiskSecurityProfileArgs{\n\t\t\t\t\t\t\tDiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{\n\t\t\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tSecurityEncryptionType: pulumi.String(compute.SecurityEncryptionTypesDiskWithVMGuestState),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_StandardSSD_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.UefiSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport com.pulumi.azurenative.compute.inputs.VMDiskSecurityProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_DC2as_v5\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .securityProfile(SecurityProfileArgs.builder()\n .securityType(\"ConfidentialVM\")\n .uefiSettings(UefiSettingsArgs.builder()\n .secureBootEnabled(true)\n .vTpmEnabled(true)\n .build())\n .build())\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"2019-datacenter-cvm\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"windows-cvm\")\n .version(\"17763.2183.2109130127\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .securityProfile(VMDiskSecurityProfileArgs.builder()\n .diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\")\n .build())\n .securityEncryptionType(\"DiskWithVMGuestState\")\n .build())\n .storageAccountType(\"StandardSSD_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: \"Standard_DC2as_v5\",\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n securityProfile: {\n securityType: azure_native.compute.SecurityTypes.ConfidentialVM,\n uefiSettings: {\n secureBootEnabled: true,\n vTpmEnabled: true,\n },\n },\n storageProfile: {\n imageReference: {\n offer: \"2019-datacenter-cvm\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"windows-cvm\",\n version: \"17763.2183.2109130127\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n securityProfile: {\n diskEncryptionSet: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n securityEncryptionType: azure_native.compute.SecurityEncryptionTypes.DiskWithVMGuestState,\n },\n storageAccountType: azure_native.compute.StorageAccountTypes.StandardSSD_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=\"Standard_DC2as_v5\",\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n security_profile=azure_native.compute.SecurityProfileArgs(\n security_type=azure_native.compute.SecurityTypes.CONFIDENTIAL_VM,\n uefi_settings=azure_native.compute.UefiSettingsArgs(\n secure_boot_enabled=True,\n v_tpm_enabled=True,\n ),\n ),\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"2019-datacenter-cvm\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"windows-cvm\",\n version=\"17763.2183.2109130127\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n security_profile=azure_native.compute.VMDiskSecurityProfileArgs(\n disk_encryption_set=azure_native.compute.DiskEncryptionSetParametersArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n ),\n security_encryption_type=azure_native.compute.SecurityEncryptionTypes.DISK_WITH_VM_GUEST_STATE,\n ),\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_SS_D_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_DC2as_v5\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n securityProfile:\n securityType: ConfidentialVM\n uefiSettings:\n secureBootEnabled: true\n vTpmEnabled: true\n storageProfile:\n imageReference:\n offer: 2019-datacenter-cvm\n publisher: MicrosoftWindowsServer\n sku: windows-cvm\n version: 17763.2183.2109130127\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n managedDisk:\n securityProfile:\n diskEncryptionSet:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\n securityEncryptionType: DiskWithVMGuestState\n storageAccountType: StandardSSD_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a VM with securityType ConfidentialVM with Platform Managed Keys\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = \"Standard_DC2as_v5\",\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs\n {\n SecurityType = AzureNative.Compute.SecurityTypes.ConfidentialVM,\n UefiSettings = new AzureNative.Compute.Inputs.UefiSettingsArgs\n {\n SecureBootEnabled = true,\n VTpmEnabled = true,\n },\n },\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"2019-datacenter-cvm\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"windows-cvm\",\n Version = \"17763.2183.2109130127\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n SecurityProfile = new AzureNative.Compute.Inputs.VMDiskSecurityProfileArgs\n {\n SecurityEncryptionType = AzureNative.Compute.SecurityEncryptionTypes.DiskWithVMGuestState,\n },\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.StandardSSD_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(\"Standard_DC2as_v5\"),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tSecurityProfile: &compute.SecurityProfileArgs{\n\t\t\t\tSecurityType: pulumi.String(compute.SecurityTypesConfidentialVM),\n\t\t\t\tUefiSettings: &compute.UefiSettingsArgs{\n\t\t\t\t\tSecureBootEnabled: pulumi.Bool(true),\n\t\t\t\t\tVTpmEnabled: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"2019-datacenter-cvm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"windows-cvm\"),\n\t\t\t\t\tVersion: pulumi.String(\"17763.2183.2109130127\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tSecurityProfile: &compute.VMDiskSecurityProfileArgs{\n\t\t\t\t\t\t\tSecurityEncryptionType: pulumi.String(compute.SecurityEncryptionTypesDiskWithVMGuestState),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_StandardSSD_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.UefiSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport com.pulumi.azurenative.compute.inputs.VMDiskSecurityProfileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_DC2as_v5\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .securityProfile(SecurityProfileArgs.builder()\n .securityType(\"ConfidentialVM\")\n .uefiSettings(UefiSettingsArgs.builder()\n .secureBootEnabled(true)\n .vTpmEnabled(true)\n .build())\n .build())\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"2019-datacenter-cvm\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"windows-cvm\")\n .version(\"17763.2183.2109130127\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .securityProfile(VMDiskSecurityProfileArgs.builder()\n .securityEncryptionType(\"DiskWithVMGuestState\")\n .build())\n .storageAccountType(\"StandardSSD_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: \"Standard_DC2as_v5\",\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n securityProfile: {\n securityType: azure_native.compute.SecurityTypes.ConfidentialVM,\n uefiSettings: {\n secureBootEnabled: true,\n vTpmEnabled: true,\n },\n },\n storageProfile: {\n imageReference: {\n offer: \"2019-datacenter-cvm\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"windows-cvm\",\n version: \"17763.2183.2109130127\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n securityProfile: {\n securityEncryptionType: azure_native.compute.SecurityEncryptionTypes.DiskWithVMGuestState,\n },\n storageAccountType: azure_native.compute.StorageAccountTypes.StandardSSD_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=\"Standard_DC2as_v5\",\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n security_profile=azure_native.compute.SecurityProfileArgs(\n security_type=azure_native.compute.SecurityTypes.CONFIDENTIAL_VM,\n uefi_settings=azure_native.compute.UefiSettingsArgs(\n secure_boot_enabled=True,\n v_tpm_enabled=True,\n ),\n ),\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"2019-datacenter-cvm\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"windows-cvm\",\n version=\"17763.2183.2109130127\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n security_profile=azure_native.compute.VMDiskSecurityProfileArgs(\n security_encryption_type=azure_native.compute.SecurityEncryptionTypes.DISK_WITH_VM_GUEST_STATE,\n ),\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_SS_D_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_DC2as_v5\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n securityProfile:\n securityType: ConfidentialVM\n uefiSettings:\n secureBootEnabled: true\n vTpmEnabled: true\n storageProfile:\n imageReference:\n offer: 2019-datacenter-cvm\n publisher: MicrosoftWindowsServer\n sku: windows-cvm\n version: 17763.2183.2109130127\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n managedDisk:\n securityProfile:\n securityEncryptionType: DiskWithVMGuestState\n storageAccountType: StandardSSD_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Windows vm with a patch setting assessmentMode of ImageDefault.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n WindowsConfiguration = new AzureNative.Compute.Inputs.WindowsConfigurationArgs\n {\n EnableAutomaticUpdates = true,\n PatchSettings = new AzureNative.Compute.Inputs.PatchSettingsArgs\n {\n AssessmentMode = AzureNative.Compute.WindowsPatchAssessmentMode.ImageDefault,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tWindowsConfiguration: &compute.WindowsConfigurationArgs{\n\t\t\t\t\tEnableAutomaticUpdates: pulumi.Bool(true),\n\t\t\t\t\tPatchSettings: &compute.PatchSettingsArgs{\n\t\t\t\t\t\tAssessmentMode: pulumi.String(compute.WindowsPatchAssessmentModeImageDefault),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.WindowsConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.PatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .windowsConfiguration(WindowsConfigurationArgs.builder()\n .enableAutomaticUpdates(true)\n .patchSettings(PatchSettingsArgs.builder()\n .assessmentMode(\"ImageDefault\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n windowsConfiguration: {\n enableAutomaticUpdates: true,\n patchSettings: {\n assessmentMode: azure_native.compute.WindowsPatchAssessmentMode.ImageDefault,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n windows_configuration=azure_native.compute.WindowsConfigurationArgs(\n enable_automatic_updates=True,\n patch_settings=azure_native.compute.PatchSettingsArgs(\n assessment_mode=azure_native.compute.WindowsPatchAssessmentMode.IMAGE_DEFAULT,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n windowsConfiguration:\n enableAutomaticUpdates: true\n patchSettings:\n assessmentMode: ImageDefault\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Windows vm with a patch setting patchMode of AutomaticByOS.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n WindowsConfiguration = new AzureNative.Compute.Inputs.WindowsConfigurationArgs\n {\n EnableAutomaticUpdates = true,\n PatchSettings = new AzureNative.Compute.Inputs.PatchSettingsArgs\n {\n PatchMode = AzureNative.Compute.WindowsVMGuestPatchMode.AutomaticByOS,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tWindowsConfiguration: &compute.WindowsConfigurationArgs{\n\t\t\t\t\tEnableAutomaticUpdates: pulumi.Bool(true),\n\t\t\t\t\tPatchSettings: &compute.PatchSettingsArgs{\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.WindowsVMGuestPatchModeAutomaticByOS),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.WindowsConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.PatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .windowsConfiguration(WindowsConfigurationArgs.builder()\n .enableAutomaticUpdates(true)\n .patchSettings(PatchSettingsArgs.builder()\n .patchMode(\"AutomaticByOS\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n windowsConfiguration: {\n enableAutomaticUpdates: true,\n patchSettings: {\n patchMode: azure_native.compute.WindowsVMGuestPatchMode.AutomaticByOS,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n windows_configuration=azure_native.compute.WindowsConfigurationArgs(\n enable_automatic_updates=True,\n patch_settings=azure_native.compute.PatchSettingsArgs(\n patch_mode=azure_native.compute.WindowsVMGuestPatchMode.AUTOMATIC_BY_OS,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n windowsConfiguration:\n enableAutomaticUpdates: true\n patchSettings:\n patchMode: AutomaticByOS\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n WindowsConfiguration = new AzureNative.Compute.Inputs.WindowsConfigurationArgs\n {\n EnableAutomaticUpdates = true,\n PatchSettings = new AzureNative.Compute.Inputs.PatchSettingsArgs\n {\n AssessmentMode = AzureNative.Compute.WindowsPatchAssessmentMode.AutomaticByPlatform,\n AutomaticByPlatformSettings = new AzureNative.Compute.Inputs.WindowsVMGuestPatchAutomaticByPlatformSettingsArgs\n {\n BypassPlatformSafetyChecksOnUserSchedule = false,\n RebootSetting = AzureNative.Compute.WindowsVMGuestPatchAutomaticByPlatformRebootSetting.Never,\n },\n PatchMode = AzureNative.Compute.WindowsVMGuestPatchMode.AutomaticByPlatform,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tWindowsConfiguration: &compute.WindowsConfigurationArgs{\n\t\t\t\t\tEnableAutomaticUpdates: pulumi.Bool(true),\n\t\t\t\t\tPatchSettings: &compute.PatchSettingsArgs{\n\t\t\t\t\t\tAssessmentMode: pulumi.String(compute.WindowsPatchAssessmentModeAutomaticByPlatform),\n\t\t\t\t\t\tAutomaticByPlatformSettings: &compute.WindowsVMGuestPatchAutomaticByPlatformSettingsArgs{\n\t\t\t\t\t\t\tBypassPlatformSafetyChecksOnUserSchedule: pulumi.Bool(false),\n\t\t\t\t\t\t\tRebootSetting: pulumi.String(compute.WindowsVMGuestPatchAutomaticByPlatformRebootSettingNever),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.WindowsVMGuestPatchModeAutomaticByPlatform),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.WindowsConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.PatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.WindowsVMGuestPatchAutomaticByPlatformSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .windowsConfiguration(WindowsConfigurationArgs.builder()\n .enableAutomaticUpdates(true)\n .patchSettings(PatchSettingsArgs.builder()\n .assessmentMode(\"AutomaticByPlatform\")\n .automaticByPlatformSettings(WindowsVMGuestPatchAutomaticByPlatformSettingsArgs.builder()\n .bypassPlatformSafetyChecksOnUserSchedule(false)\n .rebootSetting(\"Never\")\n .build())\n .patchMode(\"AutomaticByPlatform\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n windowsConfiguration: {\n enableAutomaticUpdates: true,\n patchSettings: {\n assessmentMode: azure_native.compute.WindowsPatchAssessmentMode.AutomaticByPlatform,\n automaticByPlatformSettings: {\n bypassPlatformSafetyChecksOnUserSchedule: false,\n rebootSetting: azure_native.compute.WindowsVMGuestPatchAutomaticByPlatformRebootSetting.Never,\n },\n patchMode: azure_native.compute.WindowsVMGuestPatchMode.AutomaticByPlatform,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n windows_configuration=azure_native.compute.WindowsConfigurationArgs(\n enable_automatic_updates=True,\n patch_settings=azure_native.compute.PatchSettingsArgs(\n assessment_mode=azure_native.compute.WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM,\n automatic_by_platform_settings=azure_native.compute.WindowsVMGuestPatchAutomaticByPlatformSettingsArgs(\n bypass_platform_safety_checks_on_user_schedule=False,\n reboot_setting=azure_native.compute.WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER,\n ),\n patch_mode=azure_native.compute.WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n windowsConfiguration:\n enableAutomaticUpdates: true\n patchSettings:\n assessmentMode: AutomaticByPlatform\n automaticByPlatformSettings:\n bypassPlatformSafetyChecksOnUserSchedule: false\n rebootSetting: Never\n patchMode: AutomaticByPlatform\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and enableHotpatching set to true.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n WindowsConfiguration = new AzureNative.Compute.Inputs.WindowsConfigurationArgs\n {\n EnableAutomaticUpdates = true,\n PatchSettings = new AzureNative.Compute.Inputs.PatchSettingsArgs\n {\n EnableHotpatching = true,\n PatchMode = AzureNative.Compute.WindowsVMGuestPatchMode.AutomaticByPlatform,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tWindowsConfiguration: &compute.WindowsConfigurationArgs{\n\t\t\t\t\tEnableAutomaticUpdates: pulumi.Bool(true),\n\t\t\t\t\tPatchSettings: &compute.PatchSettingsArgs{\n\t\t\t\t\t\tEnableHotpatching: pulumi.Bool(true),\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.WindowsVMGuestPatchModeAutomaticByPlatform),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.WindowsConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.PatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .windowsConfiguration(WindowsConfigurationArgs.builder()\n .enableAutomaticUpdates(true)\n .patchSettings(PatchSettingsArgs.builder()\n .enableHotpatching(true)\n .patchMode(\"AutomaticByPlatform\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n windowsConfiguration: {\n enableAutomaticUpdates: true,\n patchSettings: {\n enableHotpatching: true,\n patchMode: azure_native.compute.WindowsVMGuestPatchMode.AutomaticByPlatform,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n windows_configuration=azure_native.compute.WindowsConfigurationArgs(\n enable_automatic_updates=True,\n patch_settings=azure_native.compute.PatchSettingsArgs(\n enable_hotpatching=True,\n patch_mode=azure_native.compute.WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n windowsConfiguration:\n enableAutomaticUpdates: true\n patchSettings:\n enableHotpatching: true\n patchMode: AutomaticByPlatform\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Windows vm with a patch setting patchMode of Manual.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n WindowsConfiguration = new AzureNative.Compute.Inputs.WindowsConfigurationArgs\n {\n EnableAutomaticUpdates = true,\n PatchSettings = new AzureNative.Compute.Inputs.PatchSettingsArgs\n {\n PatchMode = AzureNative.Compute.WindowsVMGuestPatchMode.Manual,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tWindowsConfiguration: &compute.WindowsConfigurationArgs{\n\t\t\t\t\tEnableAutomaticUpdates: pulumi.Bool(true),\n\t\t\t\t\tPatchSettings: &compute.PatchSettingsArgs{\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.WindowsVMGuestPatchModeManual),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.WindowsConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.PatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .windowsConfiguration(WindowsConfigurationArgs.builder()\n .enableAutomaticUpdates(true)\n .patchSettings(PatchSettingsArgs.builder()\n .patchMode(\"Manual\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n windowsConfiguration: {\n enableAutomaticUpdates: true,\n patchSettings: {\n patchMode: azure_native.compute.WindowsVMGuestPatchMode.Manual,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n windows_configuration=azure_native.compute.WindowsConfigurationArgs(\n enable_automatic_updates=True,\n patch_settings=azure_native.compute.PatchSettingsArgs(\n patch_mode=azure_native.compute.WindowsVMGuestPatchMode.MANUAL,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n windowsConfiguration:\n enableAutomaticUpdates: true\n patchSettings:\n patchMode: Manual\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a Windows vm with patch settings patchMode and assessmentMode set to AutomaticByPlatform.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n WindowsConfiguration = new AzureNative.Compute.Inputs.WindowsConfigurationArgs\n {\n EnableAutomaticUpdates = true,\n PatchSettings = new AzureNative.Compute.Inputs.PatchSettingsArgs\n {\n AssessmentMode = AzureNative.Compute.WindowsPatchAssessmentMode.AutomaticByPlatform,\n PatchMode = AzureNative.Compute.WindowsVMGuestPatchMode.AutomaticByPlatform,\n },\n ProvisionVMAgent = true,\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tWindowsConfiguration: &compute.WindowsConfigurationArgs{\n\t\t\t\t\tEnableAutomaticUpdates: pulumi.Bool(true),\n\t\t\t\t\tPatchSettings: &compute.PatchSettingsArgs{\n\t\t\t\t\t\tAssessmentMode: pulumi.String(compute.WindowsPatchAssessmentModeAutomaticByPlatform),\n\t\t\t\t\t\tPatchMode: pulumi.String(compute.WindowsVMGuestPatchModeAutomaticByPlatform),\n\t\t\t\t\t},\n\t\t\t\t\tProvisionVMAgent: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.WindowsConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.PatchSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .windowsConfiguration(WindowsConfigurationArgs.builder()\n .enableAutomaticUpdates(true)\n .patchSettings(PatchSettingsArgs.builder()\n .assessmentMode(\"AutomaticByPlatform\")\n .patchMode(\"AutomaticByPlatform\")\n .build())\n .provisionVMAgent(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n windowsConfiguration: {\n enableAutomaticUpdates: true,\n patchSettings: {\n assessmentMode: azure_native.compute.WindowsPatchAssessmentMode.AutomaticByPlatform,\n patchMode: azure_native.compute.WindowsVMGuestPatchMode.AutomaticByPlatform,\n },\n provisionVMAgent: true,\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n windows_configuration=azure_native.compute.WindowsConfigurationArgs(\n enable_automatic_updates=True,\n patch_settings=azure_native.compute.PatchSettingsArgs(\n assessment_mode=azure_native.compute.WindowsPatchAssessmentMode.AUTOMATIC_BY_PLATFORM,\n patch_mode=azure_native.compute.WindowsVMGuestPatchMode.AUTOMATIC_BY_PLATFORM,\n ),\n provision_vm_agent=True,\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n windowsConfiguration:\n enableAutomaticUpdates: true\n patchSettings:\n assessmentMode: AutomaticByPlatform\n patchMode: AutomaticByPlatform\n provisionVMAgent: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a custom-image vm from an unmanaged generalized os image.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n Image = new AzureNative.Compute.Inputs.VirtualHardDiskArgs\n {\n Uri = \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd\",\n },\n Name = \"myVMosdisk\",\n OsType = AzureNative.Compute.OperatingSystemTypes.Windows,\n Vhd = new AzureNative.Compute.Inputs.VirtualHardDiskArgs\n {\n Uri = \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\",\n },\n },\n },\n VmName = \"{vm-name}\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tImage: &compute.VirtualHardDiskArgs{\n\t\t\t\t\t\tUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd\"),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t\tOsType: compute.OperatingSystemTypesWindows,\n\t\t\t\t\tVhd: &compute.VirtualHardDiskArgs{\n\t\t\t\t\t\tUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"{vm-name}\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.VirtualHardDiskArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .image(VirtualHardDiskArgs.builder()\n .uri(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd\")\n .build())\n .name(\"myVMosdisk\")\n .osType(\"Windows\")\n .vhd(VirtualHardDiskArgs.builder()\n .uri(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\")\n .build())\n .build())\n .build())\n .vmName(\"{vm-name}\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n image: {\n uri: \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd\",\n },\n name: \"myVMosdisk\",\n osType: azure_native.compute.OperatingSystemTypes.Windows,\n vhd: {\n uri: \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\",\n },\n },\n },\n vmName: \"{vm-name}\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n image=azure_native.compute.VirtualHardDiskArgs(\n uri=\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd\",\n ),\n name=\"myVMosdisk\",\n os_type=azure_native.compute.OperatingSystemTypes.WINDOWS,\n vhd=azure_native.compute.VirtualHardDiskArgs(\n uri=\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\",\n ),\n ),\n ),\n vm_name=\"{vm-name}\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n image:\n uri: http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd\n name: myVMosdisk\n osType: Windows\n vhd:\n uri: http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\n vmName: '{vm-name}'\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a platform-image vm with unmanaged os and data disks.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n DataDisks = new[]\n {\n new AzureNative.Compute.Inputs.DataDiskArgs\n {\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,\n DiskSizeGB = 1023,\n Lun = 0,\n Vhd = new AzureNative.Compute.Inputs.VirtualHardDiskArgs\n {\n Uri = \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd\",\n },\n },\n new AzureNative.Compute.Inputs.DataDiskArgs\n {\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,\n DiskSizeGB = 1023,\n Lun = 1,\n Vhd = new AzureNative.Compute.Inputs.VirtualHardDiskArgs\n {\n Uri = \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd\",\n },\n },\n },\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n Name = \"myVMosdisk\",\n Vhd = new AzureNative.Compute.Inputs.VirtualHardDiskArgs\n {\n Uri = \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\",\n },\n },\n },\n VmName = \"{vm-name}\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tDataDisks: compute.DataDiskArray{\n\t\t\t\t\t&compute.DataDiskArgs{\n\t\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),\n\t\t\t\t\t\tDiskSizeGB: pulumi.Int(1023),\n\t\t\t\t\t\tLun: pulumi.Int(0),\n\t\t\t\t\t\tVhd: &compute.VirtualHardDiskArgs{\n\t\t\t\t\t\t\tUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t&compute.DataDiskArgs{\n\t\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),\n\t\t\t\t\t\tDiskSizeGB: pulumi.Int(1023),\n\t\t\t\t\t\tLun: pulumi.Int(1),\n\t\t\t\t\t\tVhd: &compute.VirtualHardDiskArgs{\n\t\t\t\t\t\t\tUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t\tVhd: &compute.VirtualHardDiskArgs{\n\t\t\t\t\t\tUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"{vm-name}\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.VirtualHardDiskArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .dataDisks( \n DataDiskArgs.builder()\n .createOption(\"Empty\")\n .diskSizeGB(1023)\n .lun(0)\n .vhd(VirtualHardDiskArgs.builder()\n .uri(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd\")\n .build())\n .build(),\n DataDiskArgs.builder()\n .createOption(\"Empty\")\n .diskSizeGB(1023)\n .lun(1)\n .vhd(VirtualHardDiskArgs.builder()\n .uri(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd\")\n .build())\n .build())\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .name(\"myVMosdisk\")\n .vhd(VirtualHardDiskArgs.builder()\n .uri(\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\")\n .build())\n .build())\n .build())\n .vmName(\"{vm-name}\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n dataDisks: [\n {\n createOption: azure_native.compute.DiskCreateOptionTypes.Empty,\n diskSizeGB: 1023,\n lun: 0,\n vhd: {\n uri: \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd\",\n },\n },\n {\n createOption: azure_native.compute.DiskCreateOptionTypes.Empty,\n diskSizeGB: 1023,\n lun: 1,\n vhd: {\n uri: \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd\",\n },\n },\n ],\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n name: \"myVMosdisk\",\n vhd: {\n uri: \"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\",\n },\n },\n },\n vmName: \"{vm-name}\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n data_disks=[\n azure_native.compute.DataDiskArgs(\n create_option=azure_native.compute.DiskCreateOptionTypes.EMPTY,\n disk_size_gb=1023,\n lun=0,\n vhd=azure_native.compute.VirtualHardDiskArgs(\n uri=\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd\",\n ),\n ),\n azure_native.compute.DataDiskArgs(\n create_option=azure_native.compute.DiskCreateOptionTypes.EMPTY,\n disk_size_gb=1023,\n lun=1,\n vhd=azure_native.compute.VirtualHardDiskArgs(\n uri=\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd\",\n ),\n ),\n ],\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n name=\"myVMosdisk\",\n vhd=azure_native.compute.VirtualHardDiskArgs(\n uri=\"http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\",\n ),\n ),\n ),\n vm_name=\"{vm-name}\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D2_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n dataDisks:\n - createOption: Empty\n diskSizeGB: 1023\n lun: 0\n vhd:\n uri: http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd\n - createOption: Empty\n diskSizeGB: 1023\n lun: 1\n vhd:\n uri: http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n name: myVMosdisk\n vhd:\n uri: http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd\n vmName: '{vm-name}'\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm from a custom image.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm from a generalized shared image.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm from a specialized shared image.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm in a Virtual Machine Scale Set with customer assigned platformFaultDomain.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n PlatformFaultDomain = 1,\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VirtualMachineScaleSet = new AzureNative.Compute.Inputs.SubResourceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}\",\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tPlatformFaultDomain: pulumi.Int(1),\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVirtualMachineScaleSet: &compute.SubResourceArgs{\n\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}\"),\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport com.pulumi.azurenative.compute.inputs.SubResourceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .platformFaultDomain(1)\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .virtualMachineScaleSet(SubResourceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}\")\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n platformFaultDomain: 1,\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n virtualMachineScaleSet: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}\",\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n platform_fault_domain=1,\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n virtual_machine_scale_set=azure_native.compute.SubResourceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}\",\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n platformFaultDomain: 1\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n virtualMachineScaleSet:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm in an availability set.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n AvailabilitySet = new AzureNative.Compute.Inputs.SubResourceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}\",\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tAvailabilitySet: &compute.SubResourceArgs{\n\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}\"),\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.SubResourceArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .availabilitySet(SubResourceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}\")\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n availabilitySet: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}\",\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n availability_set=azure_native.compute.SubResourceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}\",\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n availabilitySet:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with Application Profile.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n ApplicationProfile = new AzureNative.Compute.Inputs.ApplicationProfileArgs\n {\n GalleryApplications = new[]\n {\n new AzureNative.Compute.Inputs.VMGalleryApplicationArgs\n {\n ConfigurationReference = \"https://mystorageaccount.blob.core.windows.net/configurations/settings.config\",\n EnableAutomaticUpgrade = false,\n Order = 1,\n PackageReferenceId = \"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0\",\n Tags = \"myTag1\",\n TreatFailureAsDeploymentFailure = false,\n },\n new AzureNative.Compute.Inputs.VMGalleryApplicationArgs\n {\n PackageReferenceId = \"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1\",\n },\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"{image_offer}\",\n Publisher = \"{image_publisher}\",\n Sku = \"{image_sku}\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tApplicationProfile: &compute.ApplicationProfileArgs{\n\t\t\t\tGalleryApplications: compute.VMGalleryApplicationArray{\n\t\t\t\t\t&compute.VMGalleryApplicationArgs{\n\t\t\t\t\t\tConfigurationReference: pulumi.String(\"https://mystorageaccount.blob.core.windows.net/configurations/settings.config\"),\n\t\t\t\t\t\tEnableAutomaticUpgrade: pulumi.Bool(false),\n\t\t\t\t\t\tOrder: pulumi.Int(1),\n\t\t\t\t\t\tPackageReferenceId: pulumi.String(\"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0\"),\n\t\t\t\t\t\tTags: pulumi.String(\"myTag1\"),\n\t\t\t\t\t\tTreatFailureAsDeploymentFailure: pulumi.Bool(false),\n\t\t\t\t\t},\n\t\t\t\t\t&compute.VMGalleryApplicationArgs{\n\t\t\t\t\t\tPackageReferenceId: pulumi.String(\"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"{image_offer}\"),\n\t\t\t\t\tPublisher: pulumi.String(\"{image_publisher}\"),\n\t\t\t\t\tSku: pulumi.String(\"{image_sku}\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.ApplicationProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .applicationProfile(ApplicationProfileArgs.builder()\n .galleryApplications( \n VMGalleryApplicationArgs.builder()\n .configurationReference(\"https://mystorageaccount.blob.core.windows.net/configurations/settings.config\")\n .enableAutomaticUpgrade(false)\n .order(1)\n .packageReferenceId(\"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0\")\n .tags(\"myTag1\")\n .treatFailureAsDeploymentFailure(false)\n .build(),\n VMGalleryApplicationArgs.builder()\n .packageReferenceId(\"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"{image_offer}\")\n .publisher(\"{image_publisher}\")\n .sku(\"{image_sku}\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n applicationProfile: {\n galleryApplications: [\n {\n configurationReference: \"https://mystorageaccount.blob.core.windows.net/configurations/settings.config\",\n enableAutomaticUpgrade: false,\n order: 1,\n packageReferenceId: \"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0\",\n tags: \"myTag1\",\n treatFailureAsDeploymentFailure: false,\n },\n {\n packageReferenceId: \"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1\",\n },\n ],\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"{image_offer}\",\n publisher: \"{image_publisher}\",\n sku: \"{image_sku}\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n application_profile=azure_native.compute.ApplicationProfileArgs(\n gallery_applications=[\n azure_native.compute.VMGalleryApplicationArgs(\n configuration_reference=\"https://mystorageaccount.blob.core.windows.net/configurations/settings.config\",\n enable_automatic_upgrade=False,\n order=1,\n package_reference_id=\"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0\",\n tags=\"myTag1\",\n treat_failure_as_deployment_failure=False,\n ),\n azure_native.compute.VMGalleryApplicationArgs(\n package_reference_id=\"/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1\",\n ),\n ],\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"{image_offer}\",\n publisher=\"{image_publisher}\",\n sku=\"{image_sku}\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n applicationProfile:\n galleryApplications:\n - configurationReference: https://mystorageaccount.blob.core.windows.net/configurations/settings.config\n enableAutomaticUpgrade: false\n order: 1\n packageReferenceId: /subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0\n tags: myTag1\n treatFailureAsDeploymentFailure: false\n - packageReferenceId: /subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: '{image_offer}'\n publisher: '{image_publisher}'\n sku: '{image_sku}'\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with DiskEncryptionSet resource id in the os disk and data disk.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n DataDisks = new[]\n {\n new AzureNative.Compute.Inputs.DataDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,\n DiskSizeGB = 1023,\n Lun = 0,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n },\n new AzureNative.Compute.Inputs.DataDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Attach,\n DiskSizeGB = 1023,\n Lun = 1,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}\",\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n },\n },\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n DiskEncryptionSet = new AzureNative.Compute.Inputs.DiskEncryptionSetParametersArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tDataDisks: compute.DataDiskArray{\n\t\t\t\t\t&compute.DataDiskArgs{\n\t\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),\n\t\t\t\t\t\tDiskSizeGB: pulumi.Int(1023),\n\t\t\t\t\t\tLun: pulumi.Int(0),\n\t\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\t\tDiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{\n\t\t\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t&compute.DataDiskArgs{\n\t\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesAttach),\n\t\t\t\t\t\tDiskSizeGB: pulumi.Int(1023),\n\t\t\t\t\t\tLun: pulumi.Int(1),\n\t\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\t\tDiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{\n\t\t\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}\"),\n\t\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tDiskEncryptionSet: &compute.DiskEncryptionSetParametersArgs{\n\t\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\"),\n\t\t\t\t\t\t},\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport com.pulumi.azurenative.compute.inputs.DiskEncryptionSetParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .dataDisks( \n DataDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"Empty\")\n .diskSizeGB(1023)\n .lun(0)\n .managedDisk(ManagedDiskParametersArgs.builder()\n .diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\")\n .build())\n .storageAccountType(\"Standard_LRS\")\n .build())\n .build(),\n DataDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"Attach\")\n .diskSizeGB(1023)\n .lun(1)\n .managedDisk(ManagedDiskParametersArgs.builder()\n .diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\")\n .build())\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}\")\n .storageAccountType(\"Standard_LRS\")\n .build())\n .build())\n .imageReference(ImageReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .diskEncryptionSet(DiskEncryptionSetParametersArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\")\n .build())\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n dataDisks: [\n {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.Empty,\n diskSizeGB: 1023,\n lun: 0,\n managedDisk: {\n diskEncryptionSet: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n },\n {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.Attach,\n diskSizeGB: 1023,\n lun: 1,\n managedDisk: {\n diskEncryptionSet: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}\",\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n },\n ],\n imageReference: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n diskEncryptionSet: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n },\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n data_disks=[\n azure_native.compute.DataDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.EMPTY,\n disk_size_gb=1023,\n lun=0,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n disk_encryption_set=azure_native.compute.DiskEncryptionSetParametersArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n ),\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n ),\n azure_native.compute.DataDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.ATTACH,\n disk_size_gb=1023,\n lun=1,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n disk_encryption_set=azure_native.compute.DiskEncryptionSetParametersArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n ),\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}\",\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n ),\n ],\n image_reference=azure_native.compute.ImageReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n disk_encryption_set=azure_native.compute.DiskEncryptionSetParametersArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\",\n ),\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n dataDisks:\n - caching: ReadWrite\n createOption: Empty\n diskSizeGB: 1023\n lun: 0\n managedDisk:\n diskEncryptionSet:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\n storageAccountType: Standard_LRS\n - caching: ReadWrite\n createOption: Attach\n diskSizeGB: 1023\n lun: 1\n managedDisk:\n diskEncryptionSet:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}\n storageAccountType: Standard_LRS\n imageReference:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n diskEncryptionSet:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with Host Encryption using encryptionAtHost property.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n Plan = new AzureNative.Compute.Inputs.PlanArgs\n {\n Name = \"windows2016\",\n Product = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n },\n ResourceGroupName = \"myResourceGroup\",\n SecurityProfile = new AzureNative.Compute.Inputs.SecurityProfileArgs\n {\n EncryptionAtHost = true,\n },\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n Sku = \"windows2016\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_DS1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tPlan: &compute.PlanArgs{\n\t\t\t\tName: pulumi.String(\"windows2016\"),\n\t\t\t\tProduct: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tSecurityProfile: &compute.SecurityProfileArgs{\n\t\t\t\tEncryptionAtHost: pulumi.Bool(true),\n\t\t\t},\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t\t\tSku: pulumi.String(\"windows2016\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.PlanArgs;\nimport com.pulumi.azurenative.compute.inputs.SecurityProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_DS1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .plan(PlanArgs.builder()\n .name(\"windows2016\")\n .product(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .securityProfile(SecurityProfileArgs.builder()\n .encryptionAtHost(true)\n .build())\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .sku(\"windows2016\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n plan: {\n name: \"windows2016\",\n product: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n },\n resourceGroupName: \"myResourceGroup\",\n securityProfile: {\n encryptionAtHost: true,\n },\n storageProfile: {\n imageReference: {\n offer: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n sku: \"windows2016\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_DS1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n plan=azure_native.compute.PlanArgs(\n name=\"windows2016\",\n product=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n ),\n resource_group_name=\"myResourceGroup\",\n security_profile=azure_native.compute.SecurityProfileArgs(\n encryption_at_host=True,\n ),\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n sku=\"windows2016\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_DS1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n plan:\n name: windows2016\n product: windows-data-science-vm\n publisher: microsoft-ads\n resourceGroupName: myResourceGroup\n securityProfile:\n encryptionAtHost: true\n storageProfile:\n imageReference:\n offer: windows-data-science-vm\n publisher: microsoft-ads\n sku: windows2016\n version: latest\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with Scheduled Events Profile\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n StorageUri = \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n ScheduledEventsProfile = new AzureNative.Compute.Inputs.ScheduledEventsProfileArgs\n {\n OsImageNotificationProfile = new AzureNative.Compute.Inputs.OSImageNotificationProfileArgs\n {\n Enable = true,\n NotBeforeTimeout = \"PT15M\",\n },\n TerminateNotificationProfile = new AzureNative.Compute.Inputs.TerminateNotificationProfileArgs\n {\n Enable = true,\n NotBeforeTimeout = \"PT10M\",\n },\n },\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tScheduledEventsProfile: &compute.ScheduledEventsProfileArgs{\n\t\t\t\tOsImageNotificationProfile: &compute.OSImageNotificationProfileArgs{\n\t\t\t\t\tEnable: pulumi.Bool(true),\n\t\t\t\t\tNotBeforeTimeout: pulumi.String(\"PT15M\"),\n\t\t\t\t},\n\t\t\t\tTerminateNotificationProfile: &compute.TerminateNotificationProfileArgs{\n\t\t\t\t\tEnable: pulumi.Bool(true),\n\t\t\t\t\tNotBeforeTimeout: pulumi.String(\"PT10M\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ScheduledEventsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSImageNotificationProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.TerminateNotificationProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .storageUri(\"http://{existing-storage-account-name}.blob.core.windows.net\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .scheduledEventsProfile(ScheduledEventsProfileArgs.builder()\n .osImageNotificationProfile(OSImageNotificationProfileArgs.builder()\n .enable(true)\n .notBeforeTimeout(\"PT15M\")\n .build())\n .terminateNotificationProfile(TerminateNotificationProfileArgs.builder()\n .enable(true)\n .notBeforeTimeout(\"PT10M\")\n .build())\n .build())\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n storageUri: \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n scheduledEventsProfile: {\n osImageNotificationProfile: {\n enable: true,\n notBeforeTimeout: \"PT15M\",\n },\n terminateNotificationProfile: {\n enable: true,\n notBeforeTimeout: \"PT10M\",\n },\n },\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n storage_uri=\"http://{existing-storage-account-name}.blob.core.windows.net\",\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n scheduled_events_profile=azure_native.compute.ScheduledEventsProfileArgs(\n os_image_notification_profile=azure_native.compute.OSImageNotificationProfileArgs(\n enable=True,\n not_before_timeout=\"PT15M\",\n ),\n terminate_notification_profile=azure_native.compute.TerminateNotificationProfileArgs(\n enable=True,\n not_before_timeout=\"PT10M\",\n ),\n ),\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n storageUri: http://{existing-storage-account-name}.blob.core.windows.net\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n scheduledEventsProfile:\n osImageNotificationProfile:\n enable: true\n notBeforeTimeout: PT15M\n terminateNotificationProfile:\n enable: true\n notBeforeTimeout: PT10M\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with a marketplace image plan.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n Plan = new AzureNative.Compute.Inputs.PlanArgs\n {\n Name = \"windows2016\",\n Product = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n Sku = \"windows2016\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tPlan: &compute.PlanArgs{\n\t\t\t\tName: pulumi.String(\"windows2016\"),\n\t\t\t\tProduct: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t\t\tSku: pulumi.String(\"windows2016\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.PlanArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .plan(PlanArgs.builder()\n .name(\"windows2016\")\n .product(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .sku(\"windows2016\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n plan: {\n name: \"windows2016\",\n product: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n sku: \"windows2016\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n plan=azure_native.compute.PlanArgs(\n name=\"windows2016\",\n product=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n sku=\"windows2016\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n plan:\n name: windows2016\n product: windows-data-science-vm\n publisher: microsoft-ads\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: windows-data-science-vm\n publisher: microsoft-ads\n sku: windows2016\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with an extensions time budget.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n StorageUri = \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n ExtensionsTimeBudget = \"PT30M\",\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tExtensionsTimeBudget: pulumi.String(\"PT30M\"),\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .storageUri(\"http://{existing-storage-account-name}.blob.core.windows.net\")\n .build())\n .build())\n .extensionsTimeBudget(\"PT30M\")\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n storageUri: \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n extensionsTimeBudget: \"PT30M\",\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n storage_uri=\"http://{existing-storage-account-name}.blob.core.windows.net\",\n ),\n ),\n extensions_time_budget=\"PT30M\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n storageUri: http://{existing-storage-account-name}.blob.core.windows.net\n extensionsTimeBudget: PT30M\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with boot diagnostics.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n StorageUri = \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t\tStorageUri: pulumi.String(\"http://{existing-storage-account-name}.blob.core.windows.net\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .storageUri(\"http://{existing-storage-account-name}.blob.core.windows.net\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n storageUri: \"http://{existing-storage-account-name}.blob.core.windows.net\",\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n storage_uri=\"http://{existing-storage-account-name}.blob.core.windows.net\",\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n storageUri: http://{existing-storage-account-name}.blob.core.windows.net\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with empty data disks.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D2_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n DataDisks = new[]\n {\n new AzureNative.Compute.Inputs.DataDiskArgs\n {\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,\n DiskSizeGB = 1023,\n Lun = 0,\n },\n new AzureNative.Compute.Inputs.DataDiskArgs\n {\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.Empty,\n DiskSizeGB = 1023,\n Lun = 1,\n },\n },\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D2_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tDataDisks: compute.DataDiskArray{\n\t\t\t\t\t&compute.DataDiskArgs{\n\t\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),\n\t\t\t\t\t\tDiskSizeGB: pulumi.Int(1023),\n\t\t\t\t\t\tLun: pulumi.Int(0),\n\t\t\t\t\t},\n\t\t\t\t\t&compute.DataDiskArgs{\n\t\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesEmpty),\n\t\t\t\t\t\tDiskSizeGB: pulumi.Int(1023),\n\t\t\t\t\t\tLun: pulumi.Int(1),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D2_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .dataDisks( \n DataDiskArgs.builder()\n .createOption(\"Empty\")\n .diskSizeGB(1023)\n .lun(0)\n .build(),\n DataDiskArgs.builder()\n .createOption(\"Empty\")\n .diskSizeGB(1023)\n .lun(1)\n .build())\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D2_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n dataDisks: [\n {\n createOption: azure_native.compute.DiskCreateOptionTypes.Empty,\n diskSizeGB: 1023,\n lun: 0,\n },\n {\n createOption: azure_native.compute.DiskCreateOptionTypes.Empty,\n diskSizeGB: 1023,\n lun: 1,\n },\n ],\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D2_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n data_disks=[\n azure_native.compute.DataDiskArgs(\n create_option=azure_native.compute.DiskCreateOptionTypes.EMPTY,\n disk_size_gb=1023,\n lun=0,\n ),\n azure_native.compute.DataDiskArgs(\n create_option=azure_native.compute.DiskCreateOptionTypes.EMPTY,\n disk_size_gb=1023,\n lun=1,\n ),\n ],\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D2_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n dataDisks:\n - createOption: Empty\n diskSizeGB: 1023\n lun: 0\n - createOption: Empty\n diskSizeGB: 1023\n lun: 1\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with ephemeral os disk provisioning in Cache disk using placement property.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n Plan = new AzureNative.Compute.Inputs.PlanArgs\n {\n Name = \"windows2016\",\n Product = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n Sku = \"windows2016\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n DiffDiskSettings = new AzureNative.Compute.Inputs.DiffDiskSettingsArgs\n {\n Option = AzureNative.Compute.DiffDiskOptions.Local,\n Placement = AzureNative.Compute.DiffDiskPlacement.CacheDisk,\n },\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_DS1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tPlan: &compute.PlanArgs{\n\t\t\t\tName: pulumi.String(\"windows2016\"),\n\t\t\t\tProduct: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t\t\tSku: pulumi.String(\"windows2016\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tDiffDiskSettings: &compute.DiffDiskSettingsArgs{\n\t\t\t\t\t\tOption: pulumi.String(compute.DiffDiskOptionsLocal),\n\t\t\t\t\t\tPlacement: pulumi.String(compute.DiffDiskPlacementCacheDisk),\n\t\t\t\t\t},\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.PlanArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.DiffDiskSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_DS1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .plan(PlanArgs.builder()\n .name(\"windows2016\")\n .product(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .sku(\"windows2016\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .diffDiskSettings(DiffDiskSettingsArgs.builder()\n .option(\"Local\")\n .placement(\"CacheDisk\")\n .build())\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n plan: {\n name: \"windows2016\",\n product: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n sku: \"windows2016\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n diffDiskSettings: {\n option: azure_native.compute.DiffDiskOptions.Local,\n placement: azure_native.compute.DiffDiskPlacement.CacheDisk,\n },\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_DS1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n plan=azure_native.compute.PlanArgs(\n name=\"windows2016\",\n product=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n sku=\"windows2016\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n diff_disk_settings=azure_native.compute.DiffDiskSettingsArgs(\n option=azure_native.compute.DiffDiskOptions.LOCAL,\n placement=azure_native.compute.DiffDiskPlacement.CACHE_DISK,\n ),\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_DS1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n plan:\n name: windows2016\n product: windows-data-science-vm\n publisher: microsoft-ads\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: windows-data-science-vm\n publisher: microsoft-ads\n sku: windows2016\n version: latest\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n diffDiskSettings:\n option: Local\n placement: CacheDisk\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with ephemeral os disk provisioning in Resource disk using placement property.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n Plan = new AzureNative.Compute.Inputs.PlanArgs\n {\n Name = \"windows2016\",\n Product = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n Sku = \"windows2016\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n DiffDiskSettings = new AzureNative.Compute.Inputs.DiffDiskSettingsArgs\n {\n Option = AzureNative.Compute.DiffDiskOptions.Local,\n Placement = AzureNative.Compute.DiffDiskPlacement.ResourceDisk,\n },\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_DS1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tPlan: &compute.PlanArgs{\n\t\t\t\tName: pulumi.String(\"windows2016\"),\n\t\t\t\tProduct: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t\t\tSku: pulumi.String(\"windows2016\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tDiffDiskSettings: &compute.DiffDiskSettingsArgs{\n\t\t\t\t\t\tOption: pulumi.String(compute.DiffDiskOptionsLocal),\n\t\t\t\t\t\tPlacement: pulumi.String(compute.DiffDiskPlacementResourceDisk),\n\t\t\t\t\t},\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.PlanArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.DiffDiskSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_DS1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .plan(PlanArgs.builder()\n .name(\"windows2016\")\n .product(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .sku(\"windows2016\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .diffDiskSettings(DiffDiskSettingsArgs.builder()\n .option(\"Local\")\n .placement(\"ResourceDisk\")\n .build())\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n plan: {\n name: \"windows2016\",\n product: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n sku: \"windows2016\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n diffDiskSettings: {\n option: azure_native.compute.DiffDiskOptions.Local,\n placement: azure_native.compute.DiffDiskPlacement.ResourceDisk,\n },\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_DS1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n plan=azure_native.compute.PlanArgs(\n name=\"windows2016\",\n product=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n sku=\"windows2016\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n diff_disk_settings=azure_native.compute.DiffDiskSettingsArgs(\n option=azure_native.compute.DiffDiskOptions.LOCAL,\n placement=azure_native.compute.DiffDiskPlacement.RESOURCE_DISK,\n ),\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_DS1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n plan:\n name: windows2016\n product: windows-data-science-vm\n publisher: microsoft-ads\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: windows-data-science-vm\n publisher: microsoft-ads\n sku: windows2016\n version: latest\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n diffDiskSettings:\n option: Local\n placement: ResourceDisk\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with ephemeral os disk.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n Plan = new AzureNative.Compute.Inputs.PlanArgs\n {\n Name = \"windows2016\",\n Product = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n Sku = \"windows2016\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n DiffDiskSettings = new AzureNative.Compute.Inputs.DiffDiskSettingsArgs\n {\n Option = AzureNative.Compute.DiffDiskOptions.Local,\n },\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_DS1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tPlan: &compute.PlanArgs{\n\t\t\t\tName: pulumi.String(\"windows2016\"),\n\t\t\t\tProduct: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t\t\tSku: pulumi.String(\"windows2016\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tDiffDiskSettings: &compute.DiffDiskSettingsArgs{\n\t\t\t\t\t\tOption: pulumi.String(compute.DiffDiskOptionsLocal),\n\t\t\t\t\t},\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.PlanArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.DiffDiskSettingsArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_DS1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .plan(PlanArgs.builder()\n .name(\"windows2016\")\n .product(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .sku(\"windows2016\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .diffDiskSettings(DiffDiskSettingsArgs.builder()\n .option(\"Local\")\n .build())\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n plan: {\n name: \"windows2016\",\n product: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n sku: \"windows2016\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n diffDiskSettings: {\n option: azure_native.compute.DiffDiskOptions.Local,\n },\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_DS1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n plan=azure_native.compute.PlanArgs(\n name=\"windows2016\",\n product=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n sku=\"windows2016\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n diff_disk_settings=azure_native.compute.DiffDiskSettingsArgs(\n option=azure_native.compute.DiffDiskOptions.LOCAL,\n ),\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_DS1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n plan:\n name: windows2016\n product: windows-data-science-vm\n publisher: microsoft-ads\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: windows-data-science-vm\n publisher: microsoft-ads\n sku: windows2016\n version: latest\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n diffDiskSettings:\n option: Local\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with managed boot diagnostics.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n DiagnosticsProfile = new AzureNative.Compute.Inputs.DiagnosticsProfileArgs\n {\n BootDiagnostics = new AzureNative.Compute.Inputs.BootDiagnosticsArgs\n {\n Enabled = true,\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tDiagnosticsProfile: &compute.DiagnosticsProfileArgs{\n\t\t\t\tBootDiagnostics: &compute.BootDiagnosticsArgs{\n\t\t\t\t\tEnabled: pulumi.Bool(true),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.DiagnosticsProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.BootDiagnosticsArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .diagnosticsProfile(DiagnosticsProfileArgs.builder()\n .bootDiagnostics(BootDiagnosticsArgs.builder()\n .enabled(true)\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n diagnosticsProfile: {\n bootDiagnostics: {\n enabled: true,\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n diagnostics_profile=azure_native.compute.DiagnosticsProfileArgs(\n boot_diagnostics=azure_native.compute.BootDiagnosticsArgs(\n enabled=True,\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n diagnosticsProfile:\n bootDiagnostics:\n enabled: true\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with password authentication.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with premium storage.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"WindowsServer\",\n Publisher = \"MicrosoftWindowsServer\",\n Sku = \"2016-Datacenter\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Premium_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"WindowsServer\"),\n\t\t\t\t\tPublisher: pulumi.String(\"MicrosoftWindowsServer\"),\n\t\t\t\t\tSku: pulumi.String(\"2016-Datacenter\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Premium_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"WindowsServer\")\n .publisher(\"MicrosoftWindowsServer\")\n .sku(\"2016-Datacenter\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Premium_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"WindowsServer\",\n publisher: \"MicrosoftWindowsServer\",\n sku: \"2016-Datacenter\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Premium_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"WindowsServer\",\n publisher=\"MicrosoftWindowsServer\",\n sku=\"2016-Datacenter\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.PREMIUM_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: WindowsServer\n publisher: MicrosoftWindowsServer\n sku: 2016-Datacenter\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Premium_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create a vm with ssh authentication.\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n LinuxConfiguration = new AzureNative.Compute.Inputs.LinuxConfigurationArgs\n {\n DisablePasswordAuthentication = true,\n Ssh = new AzureNative.Compute.Inputs.SshConfigurationArgs\n {\n PublicKeys = new[]\n {\n new AzureNative.Compute.Inputs.SshPublicKeyArgs\n {\n KeyData = \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1\",\n Path = \"/home/{your-username}/.ssh/authorized_keys\",\n },\n },\n },\n },\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"{image_offer}\",\n Publisher = \"{image_publisher}\",\n Sku = \"{image_sku}\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadWrite,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_D1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t\tLinuxConfiguration: &compute.LinuxConfigurationArgs{\n\t\t\t\t\tDisablePasswordAuthentication: pulumi.Bool(true),\n\t\t\t\t\tSsh: &compute.SshConfigurationArgs{\n\t\t\t\t\t\tPublicKeys: compute.SshPublicKeyTypeArray{\n\t\t\t\t\t\t\t&compute.SshPublicKeyTypeArgs{\n\t\t\t\t\t\t\t\tKeyData: pulumi.String(\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1\"),\n\t\t\t\t\t\t\t\tPath: pulumi.String(\"/home/{your-username}/.ssh/authorized_keys\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"{image_offer}\"),\n\t\t\t\t\tPublisher: pulumi.String(\"{image_publisher}\"),\n\t\t\t\t\tSku: pulumi.String(\"{image_sku}\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadWrite,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.LinuxConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.SshConfigurationArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_D1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .linuxConfiguration(LinuxConfigurationArgs.builder()\n .disablePasswordAuthentication(true)\n .ssh(SshConfigurationArgs.builder()\n .publicKeys(SshPublicKeyArgs.builder()\n .keyData(\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1\")\n .path(\"/home/{your-username}/.ssh/authorized_keys\")\n .build())\n .build())\n .build())\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"{image_offer}\")\n .publisher(\"{image_publisher}\")\n .sku(\"{image_sku}\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadWrite\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_D1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n linuxConfiguration: {\n disablePasswordAuthentication: true,\n ssh: {\n publicKeys: [{\n keyData: \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1\",\n path: \"/home/{your-username}/.ssh/authorized_keys\",\n }],\n },\n },\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"{image_offer}\",\n publisher: \"{image_publisher}\",\n sku: \"{image_sku}\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadWrite,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_D1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n linux_configuration=azure_native.compute.LinuxConfigurationArgs(\n disable_password_authentication=True,\n ssh=azure_native.compute.SshConfigurationArgs(\n public_keys=[azure_native.compute.SshPublicKeyArgs(\n key_data=\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1\",\n path=\"/home/{your-username}/.ssh/authorized_keys\",\n )],\n ),\n ),\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"{image_offer}\",\n publisher=\"{image_publisher}\",\n sku=\"{image_sku}\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_WRITE,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n hardwareProfile:\n vmSize: Standard_D1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminUsername: '{your-username}'\n computerName: myVM\n linuxConfiguration:\n disablePasswordAuthentication: true\n ssh:\n publicKeys:\n - keyData: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1\n path: /home/{your-username}/.ssh/authorized_keys\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: '{image_offer}'\n publisher: '{image_publisher}'\n sku: '{image_sku}'\n version: latest\n osDisk:\n caching: ReadWrite\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% example %}}\n### Create or update a VM with capacity reservation\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing AzureNative = Pulumi.AzureNative;\n\nreturn await Deployment.RunAsync(() => \n{\n var virtualMachine = new AzureNative.Compute.VirtualMachine(\"virtualMachine\", new()\n {\n CapacityReservation = new AzureNative.Compute.Inputs.CapacityReservationProfileArgs\n {\n CapacityReservationGroup = new AzureNative.Compute.Inputs.SubResourceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}\",\n },\n },\n HardwareProfile = new AzureNative.Compute.Inputs.HardwareProfileArgs\n {\n VmSize = AzureNative.Compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n Location = \"westus\",\n NetworkProfile = new AzureNative.Compute.Inputs.NetworkProfileArgs\n {\n NetworkInterfaces = new[]\n {\n new AzureNative.Compute.Inputs.NetworkInterfaceReferenceArgs\n {\n Id = \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n Primary = true,\n },\n },\n },\n OsProfile = new AzureNative.Compute.Inputs.OSProfileArgs\n {\n AdminPassword = \"{your-password}\",\n AdminUsername = \"{your-username}\",\n ComputerName = \"myVM\",\n },\n Plan = new AzureNative.Compute.Inputs.PlanArgs\n {\n Name = \"windows2016\",\n Product = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n },\n ResourceGroupName = \"myResourceGroup\",\n StorageProfile = new AzureNative.Compute.Inputs.StorageProfileArgs\n {\n ImageReference = new AzureNative.Compute.Inputs.ImageReferenceArgs\n {\n Offer = \"windows-data-science-vm\",\n Publisher = \"microsoft-ads\",\n Sku = \"windows2016\",\n Version = \"latest\",\n },\n OsDisk = new AzureNative.Compute.Inputs.OSDiskArgs\n {\n Caching = AzureNative.Compute.CachingTypes.ReadOnly,\n CreateOption = AzureNative.Compute.DiskCreateOptionTypes.FromImage,\n ManagedDisk = new AzureNative.Compute.Inputs.ManagedDiskParametersArgs\n {\n StorageAccountType = AzureNative.Compute.StorageAccountTypes.Standard_LRS,\n },\n Name = \"myVMosdisk\",\n },\n },\n VmName = \"myVM\",\n });\n\n});\n\n\n```\n\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure-native-sdk/compute/v2\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := compute.NewVirtualMachine(ctx, \"virtualMachine\", &compute.VirtualMachineArgs{\n\t\t\tCapacityReservation: &compute.CapacityReservationProfileArgs{\n\t\t\t\tCapacityReservationGroup: &compute.SubResourceArgs{\n\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tHardwareProfile: &compute.HardwareProfileArgs{\n\t\t\t\tVmSize: pulumi.String(compute.VirtualMachineSizeTypes_Standard_DS1_v2),\n\t\t\t},\n\t\t\tLocation: pulumi.String(\"westus\"),\n\t\t\tNetworkProfile: &compute.NetworkProfileArgs{\n\t\t\t\tNetworkInterfaces: compute.NetworkInterfaceReferenceArray{\n\t\t\t\t\t&compute.NetworkInterfaceReferenceArgs{\n\t\t\t\t\t\tId: pulumi.String(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\"),\n\t\t\t\t\t\tPrimary: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tOsProfile: &compute.OSProfileArgs{\n\t\t\t\tAdminPassword: pulumi.String(\"{your-password}\"),\n\t\t\t\tAdminUsername: pulumi.String(\"{your-username}\"),\n\t\t\t\tComputerName: pulumi.String(\"myVM\"),\n\t\t\t},\n\t\t\tPlan: &compute.PlanArgs{\n\t\t\t\tName: pulumi.String(\"windows2016\"),\n\t\t\t\tProduct: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t},\n\t\t\tResourceGroupName: pulumi.String(\"myResourceGroup\"),\n\t\t\tStorageProfile: &compute.StorageProfileArgs{\n\t\t\t\tImageReference: &compute.ImageReferenceArgs{\n\t\t\t\t\tOffer: pulumi.String(\"windows-data-science-vm\"),\n\t\t\t\t\tPublisher: pulumi.String(\"microsoft-ads\"),\n\t\t\t\t\tSku: pulumi.String(\"windows2016\"),\n\t\t\t\t\tVersion: pulumi.String(\"latest\"),\n\t\t\t\t},\n\t\t\t\tOsDisk: &compute.OSDiskArgs{\n\t\t\t\t\tCaching: compute.CachingTypesReadOnly,\n\t\t\t\t\tCreateOption: pulumi.String(compute.DiskCreateOptionTypesFromImage),\n\t\t\t\t\tManagedDisk: &compute.ManagedDiskParametersArgs{\n\t\t\t\t\t\tStorageAccountType: pulumi.String(compute.StorageAccountTypes_Standard_LRS),\n\t\t\t\t\t},\n\t\t\t\t\tName: pulumi.String(\"myVMosdisk\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tVmName: pulumi.String(\"myVM\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n\n```\n\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.azurenative.compute.VirtualMachine;\nimport com.pulumi.azurenative.compute.VirtualMachineArgs;\nimport com.pulumi.azurenative.compute.inputs.CapacityReservationProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.SubResourceArgs;\nimport com.pulumi.azurenative.compute.inputs.HardwareProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.NetworkProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.OSProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.PlanArgs;\nimport com.pulumi.azurenative.compute.inputs.StorageProfileArgs;\nimport com.pulumi.azurenative.compute.inputs.ImageReferenceArgs;\nimport com.pulumi.azurenative.compute.inputs.OSDiskArgs;\nimport com.pulumi.azurenative.compute.inputs.ManagedDiskParametersArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var virtualMachine = new VirtualMachine(\"virtualMachine\", VirtualMachineArgs.builder() \n .capacityReservation(CapacityReservationProfileArgs.builder()\n .capacityReservationGroup(SubResourceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}\")\n .build())\n .build())\n .hardwareProfile(HardwareProfileArgs.builder()\n .vmSize(\"Standard_DS1_v2\")\n .build())\n .location(\"westus\")\n .networkProfile(NetworkProfileArgs.builder()\n .networkInterfaces(NetworkInterfaceReferenceArgs.builder()\n .id(\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\")\n .primary(true)\n .build())\n .build())\n .osProfile(OSProfileArgs.builder()\n .adminPassword(\"{your-password}\")\n .adminUsername(\"{your-username}\")\n .computerName(\"myVM\")\n .build())\n .plan(PlanArgs.builder()\n .name(\"windows2016\")\n .product(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .build())\n .resourceGroupName(\"myResourceGroup\")\n .storageProfile(StorageProfileArgs.builder()\n .imageReference(ImageReferenceArgs.builder()\n .offer(\"windows-data-science-vm\")\n .publisher(\"microsoft-ads\")\n .sku(\"windows2016\")\n .version(\"latest\")\n .build())\n .osDisk(OSDiskArgs.builder()\n .caching(\"ReadOnly\")\n .createOption(\"FromImage\")\n .managedDisk(ManagedDiskParametersArgs.builder()\n .storageAccountType(\"Standard_LRS\")\n .build())\n .name(\"myVMosdisk\")\n .build())\n .build())\n .vmName(\"myVM\")\n .build());\n\n }\n}\n\n```\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure_native from \"@pulumi/azure-native\";\n\nconst virtualMachine = new azure_native.compute.VirtualMachine(\"virtualMachine\", {\n capacityReservation: {\n capacityReservationGroup: {\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}\",\n },\n },\n hardwareProfile: {\n vmSize: azure_native.compute.VirtualMachineSizeTypes.Standard_DS1_v2,\n },\n location: \"westus\",\n networkProfile: {\n networkInterfaces: [{\n id: \"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary: true,\n }],\n },\n osProfile: {\n adminPassword: \"{your-password}\",\n adminUsername: \"{your-username}\",\n computerName: \"myVM\",\n },\n plan: {\n name: \"windows2016\",\n product: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n },\n resourceGroupName: \"myResourceGroup\",\n storageProfile: {\n imageReference: {\n offer: \"windows-data-science-vm\",\n publisher: \"microsoft-ads\",\n sku: \"windows2016\",\n version: \"latest\",\n },\n osDisk: {\n caching: azure_native.compute.CachingTypes.ReadOnly,\n createOption: azure_native.compute.DiskCreateOptionTypes.FromImage,\n managedDisk: {\n storageAccountType: azure_native.compute.StorageAccountTypes.Standard_LRS,\n },\n name: \"myVMosdisk\",\n },\n },\n vmName: \"myVM\",\n});\n\n```\n\n```python\nimport pulumi\nimport pulumi_azure_native as azure_native\n\nvirtual_machine = azure_native.compute.VirtualMachine(\"virtualMachine\",\n capacity_reservation=azure_native.compute.CapacityReservationProfileArgs(\n capacity_reservation_group=azure_native.compute.SubResourceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}\",\n ),\n ),\n hardware_profile=azure_native.compute.HardwareProfileArgs(\n vm_size=azure_native.compute.VirtualMachineSizeTypes.STANDARD_DS1_V2,\n ),\n location=\"westus\",\n network_profile=azure_native.compute.NetworkProfileArgs(\n network_interfaces=[azure_native.compute.NetworkInterfaceReferenceArgs(\n id=\"/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\",\n primary=True,\n )],\n ),\n os_profile=azure_native.compute.OSProfileArgs(\n admin_password=\"{your-password}\",\n admin_username=\"{your-username}\",\n computer_name=\"myVM\",\n ),\n plan=azure_native.compute.PlanArgs(\n name=\"windows2016\",\n product=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n ),\n resource_group_name=\"myResourceGroup\",\n storage_profile=azure_native.compute.StorageProfileArgs(\n image_reference=azure_native.compute.ImageReferenceArgs(\n offer=\"windows-data-science-vm\",\n publisher=\"microsoft-ads\",\n sku=\"windows2016\",\n version=\"latest\",\n ),\n os_disk=azure_native.compute.OSDiskArgs(\n caching=azure_native.compute.CachingTypes.READ_ONLY,\n create_option=azure_native.compute.DiskCreateOptionTypes.FROM_IMAGE,\n managed_disk=azure_native.compute.ManagedDiskParametersArgs(\n storage_account_type=azure_native.compute.StorageAccountTypes.STANDARD_LRS,\n ),\n name=\"myVMosdisk\",\n ),\n ),\n vm_name=\"myVM\")\n\n```\n\n```yaml\nresources:\n virtualMachine:\n type: azure-native:compute:VirtualMachine\n properties:\n capacityReservation:\n capacityReservationGroup:\n id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}\n hardwareProfile:\n vmSize: Standard_DS1_v2\n location: westus\n networkProfile:\n networkInterfaces:\n - id: /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}\n primary: true\n osProfile:\n adminPassword: '{your-password}'\n adminUsername: '{your-username}'\n computerName: myVM\n plan:\n name: windows2016\n product: windows-data-science-vm\n publisher: microsoft-ads\n resourceGroupName: myResourceGroup\n storageProfile:\n imageReference:\n offer: windows-data-science-vm\n publisher: microsoft-ads\n sku: windows2016\n version: latest\n osDisk:\n caching: ReadOnly\n createOption: FromImage\n managedDisk:\n storageAccountType: Standard_LRS\n name: myVMosdisk\n vmName: myVM\n\n```\n\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nAn existing resource can be imported using its type token, name, and identifier, e.g.\n\n```sh\n$ pulumi import azure-native:compute:VirtualMachine myVM /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName} \n```\n",
"properties": {
"additionalCapabilities": {
"type": "object",
"$ref": "#/types/azure-native:compute:AdditionalCapabilitiesResponse",
"description": "Specifies additional capabilities enabled or disabled on the virtual machine."
},
"applicationProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:ApplicationProfileResponse",
"description": "Specifies the gallery applications that should be made available to the VM/VMSS."
},
"availabilitySet": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference."
},
"billingProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:BillingProfileResponse",
"description": "Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01."
},
"capacityReservation": {
"type": "object",
"$ref": "#/types/azure-native:compute:CapacityReservationProfileResponse",
"description": "Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01."
},
"diagnosticsProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiagnosticsProfileResponse",
"description": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15."
},
"evictionPolicy": {
"type": "string",
"description": "Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview."
},
"extendedLocation": {
"type": "object",
"$ref": "#/types/azure-native:compute:ExtendedLocationResponse",
"description": "The extended location of the Virtual Machine."
},
"extensionsTimeBudget": {
"type": "string",
"description": "Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01."
},
"hardwareProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:HardwareProfileResponse",
"description": "Specifies the hardware settings for the virtual machine."
},
"host": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01."
},
"hostGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01."
},
"identity": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineIdentityResponse",
"description": "The identity of the virtual machine, if configured."
},
"instanceView": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineInstanceViewResponse",
"description": "The virtual machine instance view."
},
"licenseType": {
"type": "string",
"description": "Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15"
},
"location": {
"type": "string",
"description": "Resource location"
},
"name": {
"type": "string",
"description": "Resource name"
},
"networkProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:NetworkProfileResponse",
"description": "Specifies the network interfaces of the virtual machine."
},
"osProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:OSProfileResponse",
"description": "Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned."
},
"plan": {
"type": "object",
"$ref": "#/types/azure-native:compute:PlanResponse",
"description": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**."
},
"platformFaultDomain": {
"type": "integer",
"description": "Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01."
},
"priority": {
"type": "string",
"description": "Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01"
},
"provisioningState": {
"type": "string",
"description": "The provisioning state, which only appears in the response."
},
"proximityPlacementGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01."
},
"resources": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineExtensionResponse"
},
"description": "The virtual machine child extension resources."
},
"scheduledEventsProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:ScheduledEventsProfileResponse",
"description": "Specifies Scheduled Event related configurations."
},
"securityProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:SecurityProfileResponse",
"description": "Specifies the Security related profile settings for the virtual machine."
},
"storageProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:StorageProfileResponse",
"description": "Specifies the storage settings for the virtual machine disks."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
},
"timeCreated": {
"type": "string",
"description": "Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01."
},
"type": {
"type": "string",
"description": "Resource type"
},
"userData": {
"type": "string",
"description": "UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01."
},
"virtualMachineScaleSet": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResourceResponse",
"description": "Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01."
},
"vmId": {
"type": "string",
"description": "Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands."
},
"zones": {
"type": "array",
"items": {
"type": "string"
},
"description": "The virtual machine zones."
}
},
"type": "object",
"required": [
"instanceView",
"location",
"name",
"provisioningState",
"resources",
"timeCreated",
"type",
"vmId"
],
"inputProperties": {
"additionalCapabilities": {
"type": "object",
"$ref": "#/types/azure-native:compute:AdditionalCapabilities",
"description": "Specifies additional capabilities enabled or disabled on the virtual machine."
},
"applicationProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:ApplicationProfile",
"description": "Specifies the gallery applications that should be made available to the VM/VMSS."
},
"availabilitySet": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference."
},
"billingProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:BillingProfile",
"description": "Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01."
},
"capacityReservation": {
"type": "object",
"$ref": "#/types/azure-native:compute:CapacityReservationProfile",
"description": "Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01."
},
"diagnosticsProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:DiagnosticsProfile",
"description": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15."
},
"evictionPolicy": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:VirtualMachineEvictionPolicyTypes"
}
],
"description": "Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview."
},
"extendedLocation": {
"type": "object",
"$ref": "#/types/azure-native:compute:ExtendedLocation",
"description": "The extended location of the Virtual Machine."
},
"extensionsTimeBudget": {
"type": "string",
"description": "Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01."
},
"hardwareProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:HardwareProfile",
"description": "Specifies the hardware settings for the virtual machine."
},
"host": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01."
},
"hostGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01."
},
"identity": {
"type": "object",
"$ref": "#/types/azure-native:compute:VirtualMachineIdentity",
"description": "The identity of the virtual machine, if configured."
},
"licenseType": {
"type": "string",
"description": "Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15"
},
"location": {
"type": "string",
"description": "Resource location"
},
"networkProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:NetworkProfile",
"description": "Specifies the network interfaces of the virtual machine."
},
"osProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:OSProfile",
"description": "Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned."
},
"plan": {
"type": "object",
"$ref": "#/types/azure-native:compute:Plan",
"description": "Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**."
},
"platformFaultDomain": {
"type": "integer",
"description": "Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01."
},
"priority": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/types/azure-native:compute:VirtualMachinePriorityTypes"
}
],
"description": "Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01"
},
"proximityPlacementGroup": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01."
},
"resourceGroupName": {
"type": "string",
"description": "The name of the resource group.",
"willReplaceOnChanges": true
},
"scheduledEventsProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:ScheduledEventsProfile",
"description": "Specifies Scheduled Event related configurations."
},
"securityProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:SecurityProfile",
"description": "Specifies the Security related profile settings for the virtual machine."
},
"storageProfile": {
"type": "object",
"$ref": "#/types/azure-native:compute:StorageProfile",
"description": "Specifies the storage settings for the virtual machine disks."
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
},
"userData": {
"type": "string",
"description": "UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01."
},
"virtualMachineScaleSet": {
"type": "object",
"$ref": "#/types/azure-native:compute:SubResource",
"description": "Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01."
},
"vmName": {
"type": "string",
"description": "The name of the virtual machine.",
"willReplaceOnChanges": true
},
"zones": {
"type": "array",
"items": {
"type": "string"
},
"description": "The virtual machine zones."
}
},
"requiredInputs": [
"resourceGroupName"
],
"aliases": [
{
"type": "azure-native:compute/v20150615:VirtualMachine"
},
{
"type": "azure-native:compute/v20160330:VirtualMachine"
},
{
"type": "azure-native:compute/v20160430preview:VirtualMachine"
},
{
"type": "azure-native:compute/v20170330:VirtualMachine"
},
{
"type": "azure-native:compute/v20171201:VirtualMachine"
},
{
"type": "azure-native:compute/v20180401:VirtualMachine"
},
{
"type": "azure-native:compute/v20180601:VirtualMachine"
},
{
"type": "azure-native:compute/v20181001:VirtualMachine"
},
{
"type": "azure-native:compute/v20190301:VirtualMachine"
},
{
"type": "azure-native:compute/v20190701:VirtualMachine"
},
{
"type": "azure-native:compute/v20191201:VirtualMachine"
},
{
"type": "azure-native:compute/v20200601:VirtualMachine"
},
{
"type": "azure-native:compute/v20201201:VirtualMachine"
},
{
"type": "azure-native:compute/v20210301:VirtualMachine"
},
{
"type": "azure-native:compute/v20210401:VirtualMachine"
},
{
"type": "azure-native:compute/v20210701:VirtualMachine"
},
{
"type": "azure-native:compute/v20211101:VirtualMachine"
},
{
"type": "azure-native:compute/v20220301:VirtualMachine"
},
{
"type": "azure-native:compute/v20220801:VirtualMachine"
},
{
"type": "azure-native:compute/v20221101:VirtualMachine"
},
{
"type": "azure-native:compute/v20230301:VirtualMachine"
},
{
"type": "azure-native:compute/v20230701:VirtualMachine"
},
{
"type": "azure-native:compute/v20230901:VirtualMachine"
},
{
"type": "azure-native:compute/v20240301:VirtualMachine"
}
]
}
},
"functions": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment