AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.ec2.getSerialConsoleAccess
Explore with Pulumi AI
Provides a way to check whether serial console access is enabled for your AWS account in the current AWS region.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.ec2.getSerialConsoleAccess({});
import pulumi
import pulumi_aws as aws
current = aws.ec2.get_serial_console_access()
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.LookupSerialConsoleAccess(ctx, map[string]interface{}{}, nil)
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 current = Aws.Ec2.GetSerialConsoleAccess.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
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) {
final var current = Ec2Functions.getSerialConsoleAccess();
}
}
variables:
current:
fn::invoke:
Function: aws:ec2:getSerialConsoleAccess
Arguments: {}
Using getSerialConsoleAccess
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSerialConsoleAccess(opts?: InvokeOptions): Promise<GetSerialConsoleAccessResult>
function getSerialConsoleAccessOutput(opts?: InvokeOptions): Output<GetSerialConsoleAccessResult>
def get_serial_console_access(opts: Optional[InvokeOptions] = None) -> GetSerialConsoleAccessResult
def get_serial_console_access_output(opts: Optional[InvokeOptions] = None) -> Output[GetSerialConsoleAccessResult]
func LookupSerialConsoleAccess(ctx *Context, opts ...InvokeOption) (*LookupSerialConsoleAccessResult, error)
func LookupSerialConsoleAccessOutput(ctx *Context, opts ...InvokeOption) LookupSerialConsoleAccessResultOutput
> Note: This function is named LookupSerialConsoleAccess
in the Go SDK.
public static class GetSerialConsoleAccess
{
public static Task<GetSerialConsoleAccessResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetSerialConsoleAccessResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetSerialConsoleAccessResult> getSerialConsoleAccess(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ec2/getSerialConsoleAccess:getSerialConsoleAccess
arguments:
# arguments dictionary
getSerialConsoleAccess Result
The following output properties are available:
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.