SerialPortArgs

data class SerialPortArgs(val parentResource: Output<String>? = null, val parentResourceType: Output<String>? = null, val resourceGroupName: Output<String>? = null, val resourceProviderNamespace: Output<String>? = null, val serialPort: Output<String>? = null, val state: Output<SerialPortState>? = null) : ConvertibleToJava<SerialPortArgs>

Represents the serial port of the parent resource. Uses Azure REST API version 2018-05-01. In version 2.x of the Azure Native provider, it used 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/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

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}

Constructors

Link copied to clipboard
constructor(parentResource: Output<String>? = null, parentResourceType: Output<String>? = null, resourceGroupName: Output<String>? = null, resourceProviderNamespace: Output<String>? = null, serialPort: Output<String>? = null, state: Output<SerialPortState>? = null)

Properties

Link copied to clipboard
val parentResource: Output<String>? = null

The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.

Link copied to clipboard
val parentResourceType: Output<String>? = null

The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val resourceProviderNamespace: Output<String>? = null

The namespace of the resource provider.

Link copied to clipboard
val serialPort: Output<String>? = null

The name of the serial port to create.

Link copied to clipboard
val state: Output<SerialPortState>? = null

Specifies whether the port is enabled for a serial console connection.

Functions

Link copied to clipboard
open override fun toJava(): SerialPortArgs