linode logo
Linode v3.12.0, Feb 14 23

linode.getAccountLogins

Provides information about Linode account logins that match a set of filters.

Filterable Fields

  • ip

  • restricted

  • username

Example Usage

The following example shows how one might use this data source to access information about a Linode account login.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var filtered_account_logins = Linode.GetAccountLogins.Invoke(new()
    {
        Filters = new[]
        {
            new Linode.Inputs.GetAccountLoginsFilterInputArgs
            {
                Name = "restricted",
                Values = new[]
                {
                    "true",
                },
            },
            new Linode.Inputs.GetAccountLoginsFilterInputArgs
            {
                Name = "username",
                Values = new[]
                {
                    "myUsername",
                },
            },
        },
    });

    return new Dictionary<string, object?>
    {
        ["loginIds"] = new[]
        {
            filtered_account_logins.Apply(filtered_account_logins => filtered_account_logins.Apply(getAccountLoginsResult => getAccountLoginsResult.Logins)),
        }.Select(__item => __item?.Id).ToList(),
    };
});

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetAccountLoginsArgs;
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 filtered-account-logins = LinodeFunctions.getAccountLogins(GetAccountLoginsArgs.builder()
            .filters(            
                GetAccountLoginsFilterArgs.builder()
                    .name("restricted")
                    .values("true")
                    .build(),
                GetAccountLoginsFilterArgs.builder()
                    .name("username")
                    .values("myUsername")
                    .build())
            .build());

        ctx.export("loginIds", filtered_account_logins.logins().stream().map(element -> element.id()).collect(toList()));
    }
}
import pulumi
import pulumi_linode as linode

filtered_account_logins = linode.get_account_logins(filters=[
    linode.GetAccountLoginsFilterArgs(
        name="restricted",
        values=["true"],
    ),
    linode.GetAccountLoginsFilterArgs(
        name="username",
        values=["myUsername"],
    ),
])
pulumi.export("loginIds", [__item.id for __item in [filtered_account_logins.logins]])
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

const filtered-account-logins = linode.getAccountLogins({
    filters: [
        {
            name: "restricted",
            values: ["true"],
        },
        {
            name: "username",
            values: ["myUsername"],
        },
    ],
});
export const loginIds = [filtered_account_logins.then(filtered_account_logins => filtered_account_logins.logins)].map(__item => __item?.id);

Coming soon!

Using getAccountLogins

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 getAccountLogins(args: GetAccountLoginsArgs, opts?: InvokeOptions): Promise<GetAccountLoginsResult>
function getAccountLoginsOutput(args: GetAccountLoginsOutputArgs, opts?: InvokeOptions): Output<GetAccountLoginsResult>
def get_account_logins(filters: Optional[Sequence[GetAccountLoginsFilter]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAccountLoginsResult
def get_account_logins_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAccountLoginsFilterArgs]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAccountLoginsResult]
func GetAccountLogins(ctx *Context, args *GetAccountLoginsArgs, opts ...InvokeOption) (*GetAccountLoginsResult, error)
func GetAccountLoginsOutput(ctx *Context, args *GetAccountLoginsOutputArgs, opts ...InvokeOption) GetAccountLoginsResultOutput

> Note: This function is named GetAccountLogins in the Go SDK.

public static class GetAccountLogins 
{
    public static Task<GetAccountLoginsResult> InvokeAsync(GetAccountLoginsArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountLoginsResult> Invoke(GetAccountLoginsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountLoginsResult> getAccountLogins(GetAccountLoginsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: linode:index/getAccountLogins:getAccountLogins
  arguments:
    # arguments dictionary

The following arguments are supported:

getAccountLogins Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Logins List<GetAccountLoginsLogin>
Filters List<GetAccountLoginsFilter>
Id string

The provider-assigned unique ID for this managed resource.

Logins []GetAccountLoginsLogin
Filters []GetAccountLoginsFilter
id String

The provider-assigned unique ID for this managed resource.

logins List<GetAccountLoginsLogin>
filters List<GetAccountLoginsFilter>
id string

The provider-assigned unique ID for this managed resource.

logins GetAccountLoginsLogin[]
filters GetAccountLoginsFilter[]
id str

The provider-assigned unique ID for this managed resource.

logins Sequence[GetAccountLoginsLogin]
filters Sequence[GetAccountLoginsFilter]
id String

The provider-assigned unique ID for this managed resource.

logins List<Property Map>
filters List<Property Map>

Supporting Types

GetAccountLoginsFilter

Name string

The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.

Values List<string>

A list of values for the filter to allow. These values should all be in string form.

MatchBy string

The method to match the field by. (exact, regex, substring; default exact)

Name string

The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.

Values []string

A list of values for the filter to allow. These values should all be in string form.

MatchBy string

The method to match the field by. (exact, regex, substring; default exact)

name String

The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.

values List<String>

A list of values for the filter to allow. These values should all be in string form.

matchBy String

The method to match the field by. (exact, regex, substring; default exact)

name string

The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.

values string[]

A list of values for the filter to allow. These values should all be in string form.

matchBy string

The method to match the field by. (exact, regex, substring; default exact)

name str

The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.

values Sequence[str]

A list of values for the filter to allow. These values should all be in string form.

match_by str

The method to match the field by. (exact, regex, substring; default exact)

name String

The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.

values List<String>

A list of values for the filter to allow. These values should all be in string form.

matchBy String

The method to match the field by. (exact, regex, substring; default exact)

GetAccountLoginsLogin

Datetime string

When the login was initiated.

Id int

The unique ID of this login object.

Ip string

The remote IP address that requested the login.

Restricted bool

True if the User that was logged into was a restricted User, false otherwise.

Username string

The username of the User that was logged into.

Datetime string

When the login was initiated.

Id int

The unique ID of this login object.

Ip string

The remote IP address that requested the login.

Restricted bool

True if the User that was logged into was a restricted User, false otherwise.

Username string

The username of the User that was logged into.

datetime String

When the login was initiated.

id Integer

The unique ID of this login object.

ip String

The remote IP address that requested the login.

restricted Boolean

True if the User that was logged into was a restricted User, false otherwise.

username String

The username of the User that was logged into.

datetime string

When the login was initiated.

id number

The unique ID of this login object.

ip string

The remote IP address that requested the login.

restricted boolean

True if the User that was logged into was a restricted User, false otherwise.

username string

The username of the User that was logged into.

datetime str

When the login was initiated.

id int

The unique ID of this login object.

ip str

The remote IP address that requested the login.

restricted bool

True if the User that was logged into was a restricted User, false otherwise.

username str

The username of the User that was logged into.

datetime String

When the login was initiated.

id Number

The unique ID of this login object.

ip String

The remote IP address that requested the login.

restricted Boolean

True if the User that was logged into was a restricted User, false otherwise.

username String

The username of the User that was logged into.

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes

This Pulumi package is based on the linode Terraform Provider.