1. Packages
  2. Linode Provider
  3. API Docs
  4. getAccountAvailabilities
Linode v4.37.0 published on Thursday, Apr 10, 2025 by Pulumi

linode.getAccountAvailabilities

Explore with Pulumi AI

Provides information about services availabilities for the current Linode account. For more information, see the Linode APIv4 docs.

Example Usage

The following example shows how one might use this data source to discover regions without specific service availability.

import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";

export = async () => {
    const filtered_availabilities = await linode.getAccountAvailabilities({
        filters: [{
            name: "unavailable",
            values: ["Linodes"],
        }],
    });
    return {
        "regions-without-linodes": filtered_availabilities.availabilities.map(__item => __item.region),
    };
}
Copy
import pulumi
import pulumi_linode as linode

filtered_availabilities = linode.get_account_availabilities(filters=[{
    "name": "unavailable",
    "values": ["Linodes"],
}])
pulumi.export("regions-without-linodes", [__item.region for __item in filtered_availabilities.availabilities])
Copy
package main

import (
	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
filtered_availabilities, err := linode.GetAccountAvailabilities(ctx, &linode.GetAccountAvailabilitiesArgs{
Filters: []linode.GetAccountAvailabilitiesFilter{
{
Name: "unavailable",
Values: []string{
"Linodes",
},
},
},
}, nil);
if err != nil {
return err
}
ctx.Export("regions-without-linodes", pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:8,11-59)))
return nil
})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

return await Deployment.RunAsync(() => 
{
    var filtered_availabilities = Linode.GetAccountAvailabilities.Invoke(new()
    {
        Filters = new[]
        {
            new Linode.Inputs.GetAccountAvailabilitiesFilterInputArgs
            {
                Name = "unavailable",
                Values = new[]
                {
                    "Linodes",
                },
            },
        },
    });

    return new Dictionary<string, object?>
    {
        ["regions-without-linodes"] = filtered_availabilities.Apply(filtered_availabilities => filtered_availabilities.Apply(getAccountAvailabilitiesResult => getAccountAvailabilitiesResult.Availabilities).Select(__item => __item.Region).ToList()),
    };
});
Copy
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.GetAccountAvailabilitiesArgs;
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-availabilities = LinodeFunctions.getAccountAvailabilities(GetAccountAvailabilitiesArgs.builder()
            .filters(GetAccountAvailabilitiesFilterArgs.builder()
                .name("unavailable")
                .values("Linodes")
                .build())
            .build());

        ctx.export("regions-without-linodes", filtered_availabilities.availabilities().stream().map(element -> element.region()).collect(toList()));
    }
}
Copy
Coming soon!

Filterable Fields

  • region

  • unavailable

  • available

Using getAccountAvailabilities

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 getAccountAvailabilities(args: GetAccountAvailabilitiesArgs, opts?: InvokeOptions): Promise<GetAccountAvailabilitiesResult>
function getAccountAvailabilitiesOutput(args: GetAccountAvailabilitiesOutputArgs, opts?: InvokeOptions): Output<GetAccountAvailabilitiesResult>
Copy
def get_account_availabilities(availabilities: Optional[Sequence[GetAccountAvailabilitiesAvailability]] = None,
                               filters: Optional[Sequence[GetAccountAvailabilitiesFilter]] = None,
                               opts: Optional[InvokeOptions] = None) -> GetAccountAvailabilitiesResult
def get_account_availabilities_output(availabilities: Optional[pulumi.Input[Sequence[pulumi.Input[GetAccountAvailabilitiesAvailabilityArgs]]]] = None,
                               filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAccountAvailabilitiesFilterArgs]]]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetAccountAvailabilitiesResult]
Copy
func GetAccountAvailabilities(ctx *Context, args *GetAccountAvailabilitiesArgs, opts ...InvokeOption) (*GetAccountAvailabilitiesResult, error)
func GetAccountAvailabilitiesOutput(ctx *Context, args *GetAccountAvailabilitiesOutputArgs, opts ...InvokeOption) GetAccountAvailabilitiesResultOutput
Copy

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

public static class GetAccountAvailabilities 
{
    public static Task<GetAccountAvailabilitiesResult> InvokeAsync(GetAccountAvailabilitiesArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountAvailabilitiesResult> Invoke(GetAccountAvailabilitiesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetAccountAvailabilitiesResult> getAccountAvailabilities(GetAccountAvailabilitiesArgs args, InvokeOptions options)
public static Output<GetAccountAvailabilitiesResult> getAccountAvailabilities(GetAccountAvailabilitiesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: linode:index/getAccountAvailabilities:getAccountAvailabilities
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

getAccountAvailabilities Result

The following output properties are available:

Supporting Types

GetAccountAvailabilitiesAvailability

Availables This property is required. List<string>
A set of services which are available for the given region.
Region This property is required. string
The region this availability entry refers to.
Unavailables This property is required. List<string>
A set of services that are unavailable for the given region.
Availables This property is required. []string
A set of services which are available for the given region.
Region This property is required. string
The region this availability entry refers to.
Unavailables This property is required. []string
A set of services that are unavailable for the given region.
availables This property is required. List<String>
A set of services which are available for the given region.
region This property is required. String
The region this availability entry refers to.
unavailables This property is required. List<String>
A set of services that are unavailable for the given region.
availables This property is required. string[]
A set of services which are available for the given region.
region This property is required. string
The region this availability entry refers to.
unavailables This property is required. string[]
A set of services that are unavailable for the given region.
availables This property is required. Sequence[str]
A set of services which are available for the given region.
region This property is required. str
The region this availability entry refers to.
unavailables This property is required. Sequence[str]
A set of services that are unavailable for the given region.
availables This property is required. List<String>
A set of services which are available for the given region.
region This property is required. String
The region this availability entry refers to.
unavailables This property is required. List<String>
A set of services that are unavailable for the given region.

GetAccountAvailabilitiesFilter

Name This property is required. string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values This property is required. 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 This property is required. string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
Values This property is required. []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 This property is required. String
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. 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 This property is required. string
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. 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 This property is required. str
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. 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 This property is required. String
The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
values This property is required. 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)

Package Details

Repository
Linode pulumi/pulumi-linode
License
Apache-2.0
Notes
This Pulumi package is based on the linode Terraform Provider.