1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2
  5. SerialConsoleAccess

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

aws.ec2.SerialConsoleAccess

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    Provides a resource to manage whether serial console access is enabled for your AWS account in the current AWS region.

    NOTE: Removing this resource disables serial console access.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2.SerialConsoleAccess("example", {enabled: true});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2.SerialConsoleAccess("example", enabled=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewSerialConsoleAccess(ctx, "example", &ec2.SerialConsoleAccessArgs{
    			Enabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ec2.SerialConsoleAccess("example", new()
        {
            Enabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.SerialConsoleAccess;
    import com.pulumi.aws.ec2.SerialConsoleAccessArgs;
    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 example = new SerialConsoleAccess("example", SerialConsoleAccessArgs.builder()
                .enabled(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:SerialConsoleAccess
        properties:
          enabled: true
    

    Create SerialConsoleAccess Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SerialConsoleAccess(name: string, args?: SerialConsoleAccessArgs, opts?: CustomResourceOptions);
    @overload
    def SerialConsoleAccess(resource_name: str,
                            args: Optional[SerialConsoleAccessArgs] = None,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def SerialConsoleAccess(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            enabled: Optional[bool] = None)
    func NewSerialConsoleAccess(ctx *Context, name string, args *SerialConsoleAccessArgs, opts ...ResourceOption) (*SerialConsoleAccess, error)
    public SerialConsoleAccess(string name, SerialConsoleAccessArgs? args = null, CustomResourceOptions? opts = null)
    public SerialConsoleAccess(String name, SerialConsoleAccessArgs args)
    public SerialConsoleAccess(String name, SerialConsoleAccessArgs args, CustomResourceOptions options)
    
    type: aws:ec2:SerialConsoleAccess
    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 SerialConsoleAccessArgs
    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 SerialConsoleAccessArgs
    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 SerialConsoleAccessArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SerialConsoleAccessArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SerialConsoleAccessArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var serialConsoleAccessResource = new Aws.Ec2.SerialConsoleAccess("serialConsoleAccessResource", new()
    {
        Enabled = false,
    });
    
    example, err := ec2.NewSerialConsoleAccess(ctx, "serialConsoleAccessResource", &ec2.SerialConsoleAccessArgs{
    	Enabled: pulumi.Bool(false),
    })
    
    var serialConsoleAccessResource = new SerialConsoleAccess("serialConsoleAccessResource", SerialConsoleAccessArgs.builder()
        .enabled(false)
        .build());
    
    serial_console_access_resource = aws.ec2.SerialConsoleAccess("serialConsoleAccessResource", enabled=False)
    
    const serialConsoleAccessResource = new aws.ec2.SerialConsoleAccess("serialConsoleAccessResource", {enabled: false});
    
    type: aws:ec2:SerialConsoleAccess
    properties:
        enabled: false
    

    SerialConsoleAccess 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 SerialConsoleAccess resource accepts the following input properties:

    Enabled bool
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    Enabled bool
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled Boolean
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled boolean
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled bool
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled Boolean
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SerialConsoleAccess resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SerialConsoleAccess Resource

    Get an existing SerialConsoleAccess resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SerialConsoleAccessState, opts?: CustomResourceOptions): SerialConsoleAccess
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None) -> SerialConsoleAccess
    func GetSerialConsoleAccess(ctx *Context, name string, id IDInput, state *SerialConsoleAccessState, opts ...ResourceOption) (*SerialConsoleAccess, error)
    public static SerialConsoleAccess Get(string name, Input<string> id, SerialConsoleAccessState? state, CustomResourceOptions? opts = null)
    public static SerialConsoleAccess get(String name, Output<String> id, SerialConsoleAccessState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Enabled bool
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    Enabled bool
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled Boolean
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled boolean
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled bool
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.
    enabled Boolean
    Whether or not serial console access is enabled. Valid values are true or false. Defaults to true.

    Import

    Using pulumi import, import serial console access state. For example:

    $ pulumi import aws:ec2/serialConsoleAccess:SerialConsoleAccess example default
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi