Serial Port Args
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,
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Properties
Link copied to clipboard
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
The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
The namespace of the resource provider.
Link copied to clipboard
The name of the serial port to create.
Link copied to clipboard
Specifies whether the port is enabled for a serial console connection.