azure-native.serialconsole.SerialPort
Explore with Pulumi AI
Represents the serial port of the parent resource. API Version: 2018-05-01.
Example Usage
Create a new serial port resource.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var serialPort = new AzureNative.SerialConsole.SerialPort("serialPort", new()
    {
        ParentResource = "myVM",
        ParentResourceType = "virtualMachines",
        ResourceGroupName = "myResourceGroup",
        ResourceProviderNamespace = "Microsoft.Compute",
        SerialPort = "0",
        State = AzureNative.SerialConsole.SerialPortState.Enabled,
    });
});
package main
import (
	serialconsole "github.com/pulumi/pulumi-azure-native-sdk/serialconsole"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := serialconsole.NewSerialPort(ctx, "serialPort", &serialconsole.SerialPortArgs{
			ParentResource:            pulumi.String("myVM"),
			ParentResourceType:        pulumi.String("virtualMachines"),
			ResourceGroupName:         pulumi.String("myResourceGroup"),
			ResourceProviderNamespace: pulumi.String("Microsoft.Compute"),
			SerialPort:                pulumi.String("0"),
			State:                     serialconsole.SerialPortStateEnabled,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.serialconsole.SerialPort;
import com.pulumi.azurenative.serialconsole.SerialPortArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var serialPort = new SerialPort("serialPort", SerialPortArgs.builder()        
            .parentResource("myVM")
            .parentResourceType("virtualMachines")
            .resourceGroupName("myResourceGroup")
            .resourceProviderNamespace("Microsoft.Compute")
            .serialPort("0")
            .state("enabled")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const serialPort = new azure_native.serialconsole.SerialPort("serialPort", {
    parentResource: "myVM",
    parentResourceType: "virtualMachines",
    resourceGroupName: "myResourceGroup",
    resourceProviderNamespace: "Microsoft.Compute",
    serialPort: "0",
    state: azure_native.serialconsole.SerialPortState.Enabled,
});
import pulumi
import pulumi_azure_native as azure_native
serial_port = azure_native.serialconsole.SerialPort("serialPort",
    parent_resource="myVM",
    parent_resource_type="virtualMachines",
    resource_group_name="myResourceGroup",
    resource_provider_namespace="Microsoft.Compute",
    serial_port="0",
    state=azure_native.serialconsole.SerialPortState.ENABLED)
resources:
  serialPort:
    type: azure-native:serialconsole:SerialPort
    properties:
      parentResource: myVM
      parentResourceType: virtualMachines
      resourceGroupName: myResourceGroup
      resourceProviderNamespace: Microsoft.Compute
      serialPort: '0'
      state: enabled
Create SerialPort Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SerialPort(name: string, args: SerialPortArgs, opts?: CustomResourceOptions);@overload
def SerialPort(resource_name: str,
               args: SerialPortArgs,
               opts: Optional[ResourceOptions] = None)
@overload
def SerialPort(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               parent_resource: Optional[str] = None,
               parent_resource_type: Optional[str] = None,
               resource_group_name: Optional[str] = None,
               resource_provider_namespace: Optional[str] = None,
               serial_port: Optional[str] = None,
               state: Optional[SerialPortState] = None)func NewSerialPort(ctx *Context, name string, args SerialPortArgs, opts ...ResourceOption) (*SerialPort, error)public SerialPort(string name, SerialPortArgs args, CustomResourceOptions? opts = null)
public SerialPort(String name, SerialPortArgs args)
public SerialPort(String name, SerialPortArgs args, CustomResourceOptions options)
type: azure-native:serialconsole:SerialPort
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SerialPortArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SerialPortArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SerialPortArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SerialPortArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SerialPortArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var serialPortResource = new AzureNative.Serialconsole.SerialPort("serialPortResource", new()
{
    ParentResource = "string",
    ParentResourceType = "string",
    ResourceGroupName = "string",
    ResourceProviderNamespace = "string",
    SerialPort = "string",
    State = "enabled",
});
example, err := serialconsole.NewSerialPort(ctx, "serialPortResource", &serialconsole.SerialPortArgs{
	ParentResource:            "string",
	ParentResourceType:        "string",
	ResourceGroupName:         "string",
	ResourceProviderNamespace: "string",
	SerialPort:                "string",
	State:                     "enabled",
})
var serialPortResource = new SerialPort("serialPortResource", SerialPortArgs.builder()
    .parentResource("string")
    .parentResourceType("string")
    .resourceGroupName("string")
    .resourceProviderNamespace("string")
    .serialPort("string")
    .state("enabled")
    .build());
serial_port_resource = azure_native.serialconsole.SerialPort("serialPortResource",
    parent_resource=string,
    parent_resource_type=string,
    resource_group_name=string,
    resource_provider_namespace=string,
    serial_port=string,
    state=enabled)
const serialPortResource = new azure_native.serialconsole.SerialPort("serialPortResource", {
    parentResource: "string",
    parentResourceType: "string",
    resourceGroupName: "string",
    resourceProviderNamespace: "string",
    serialPort: "string",
    state: "enabled",
});
type: azure-native:serialconsole:SerialPort
properties:
    parentResource: string
    parentResourceType: string
    resourceGroupName: string
    resourceProviderNamespace: string
    serialPort: string
    state: enabled
SerialPort Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SerialPort resource accepts the following input properties:
- ParentResource string
- The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- ParentResource stringType 
- The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- ResourceGroup stringName 
- The name of the resource group.
- ResourceProvider stringNamespace 
- The namespace of the resource provider.
- SerialPort string
- The name of the serial port to create.
- State
Pulumi.Azure Native. Serial Console. Serial Port State 
- Specifies whether the port is enabled for a serial console connection.
- ParentResource string
- The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- ParentResource stringType 
- The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- ResourceGroup stringName 
- The name of the resource group.
- ResourceProvider stringNamespace 
- The namespace of the resource provider.
- SerialPort string
- The name of the serial port to create.
- State
SerialPort State Enum 
- Specifies whether the port is enabled for a serial console connection.
- parentResource String
- The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- parentResource StringType 
- The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- resourceGroup StringName 
- The name of the resource group.
- resourceProvider StringNamespace 
- The namespace of the resource provider.
- serialPort String
- The name of the serial port to create.
- state
SerialPort State 
- Specifies whether the port is enabled for a serial console connection.
- parentResource string
- The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- parentResource stringType 
- The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- resourceGroup stringName 
- The name of the resource group.
- resourceProvider stringNamespace 
- The namespace of the resource provider.
- serialPort string
- The name of the serial port to create.
- state
SerialPort State 
- Specifies whether the port is enabled for a serial console connection.
- parent_resource str
- The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- parent_resource_ strtype 
- The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- resource_group_ strname 
- The name of the resource group.
- resource_provider_ strnamespace 
- The namespace of the resource provider.
- serial_port str
- The name of the serial port to create.
- state
SerialPort State 
- Specifies whether the port is enabled for a serial console connection.
- parentResource String
- The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- parentResource StringType 
- The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- resourceGroup StringName 
- The name of the resource group.
- resourceProvider StringNamespace 
- The namespace of the resource provider.
- serialPort String
- The name of the serial port to create.
- state "enabled" | "disabled"
- Specifies whether the port is enabled for a serial console connection.
Outputs
All input properties are implicitly available as output properties. Additionally, the SerialPort resource produces the following output properties:
Supporting Types
SerialPortState, SerialPortStateArgs      
- Enabled
- enabled
- Disabled
- disabled
- SerialPort State Enabled 
- enabled
- SerialPort State Disabled 
- disabled
- Enabled
- enabled
- Disabled
- disabled
- Enabled
- enabled
- Disabled
- disabled
- ENABLED
- enabled
- DISABLED
- disabled
- "enabled"
- enabled
- "disabled"
- disabled
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:serialconsole:SerialPort 0 /subscriptions/00000000-00000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/providers/Microsoft.SerialConsole/serialPorts/0 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0