azure-native.serialconsole.SerialPort
Explore with Pulumi AI
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
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:
- Parent
Resource string - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- Parent
Resource stringType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- Resource
Group stringName - The name of the resource group.
- Resource
Provider stringNamespace - The namespace of the resource provider.
- Serial
Port 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.
- Parent
Resource string - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- Parent
Resource stringType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- Resource
Group stringName - The name of the resource group.
- Resource
Provider stringNamespace - The namespace of the resource provider.
- Serial
Port string - The name of the serial port to create.
- State
Serial
Port State Enum - Specifies whether the port is enabled for a serial console connection.
- parent
Resource String - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- parent
Resource StringType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- resource
Group StringName - The name of the resource group.
- resource
Provider StringNamespace - The namespace of the resource provider.
- serial
Port String - The name of the serial port to create.
- state
Serial
Port State - Specifies whether the port is enabled for a serial console connection.
- parent
Resource string - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- parent
Resource stringType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- resource
Group stringName - The name of the resource group.
- resource
Provider stringNamespace - The namespace of the resource provider.
- serial
Port string - The name of the serial port to create.
- state
Serial
Port 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
Serial
Port State - Specifies whether the port is enabled for a serial console connection.
- parent
Resource String - The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.
- parent
Resource StringType - The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
- resource
Group StringName - The name of the resource group.
- resource
Provider StringNamespace - The namespace of the resource provider.
- serial
Port 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
- Serial
Port State Enabled - enabled
- Serial
Port 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/{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