1. Packages
  2. Azure Native
  3. API Docs
  4. serialconsole
  5. SerialPort
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.serialconsole.SerialPort

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    Represents the serial port of the parent resource. Azure REST API version: 2018-05-01. Prior API version in Azure Native 1.x: 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/v2"
    	"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 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)
    
    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,
    });
    
    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 = AzureNative.SerialConsole.SerialPortState.Enabled,
    });
    
    example, err := serialconsole.NewSerialPort(ctx, "serialPortResource", &serialconsole.SerialPortArgs{
    ParentResource: pulumi.String("string"),
    ParentResourceType: pulumi.String("string"),
    ResourceGroupName: pulumi.String("string"),
    ResourceProviderNamespace: pulumi.String("string"),
    SerialPort: pulumi.String("string"),
    State: serialconsole.SerialPortStateEnabled,
    })
    
    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=azure_native.serialconsole.SerialPortState.ENABLED)
    
    const serialPortResource = new azure_native.serialconsole.SerialPort("serialPortResource", {
        parentResource: "string",
        parentResourceType: "string",
        resourceGroupName: "string",
        resourceProviderNamespace: "string",
        serialPort: "string",
        state: azure_native.serialconsole.SerialPortState.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

    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.
    ParentResourceType string
    The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
    ResourceGroupName string
    The name of the resource group.
    ResourceProviderNamespace string
    The namespace of the resource provider.
    SerialPort string
    The name of the serial port to create.
    State Pulumi.AzureNative.SerialConsole.SerialPortState
    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.
    ParentResourceType string
    The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
    ResourceGroupName string
    The name of the resource group.
    ResourceProviderNamespace string
    The namespace of the resource provider.
    SerialPort string
    The name of the serial port to create.
    State SerialPortStateEnum
    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.
    parentResourceType String
    The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
    resourceGroupName String
    The name of the resource group.
    resourceProviderNamespace String
    The namespace of the resource provider.
    serialPort String
    The name of the serial port to create.
    state SerialPortState
    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.
    parentResourceType string
    The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
    resourceGroupName string
    The name of the resource group.
    resourceProviderNamespace string
    The namespace of the resource provider.
    serialPort string
    The name of the serial port to create.
    state SerialPortState
    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_type str
    The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
    resource_group_name str
    The name of the resource group.
    resource_provider_namespace str
    The namespace of the resource provider.
    serial_port str
    The name of the serial port to create.
    state SerialPortState
    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.
    parentResourceType String
    The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
    resourceGroupName String
    The name of the resource group.
    resourceProviderNamespace String
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name
    Type string
    Resource type
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name
    Type string
    Resource type
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name
    type String
    Resource type
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name
    type string
    Resource type
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name
    type str
    Resource type
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name
    type String
    Resource type

    Supporting Types

    SerialPortState, SerialPortStateArgs

    Enabled
    enabled
    Disabled
    disabled
    SerialPortStateEnabled
    enabled
    SerialPortStateDisabled
    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/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi