1. Packages
  2. Outscale Provider
  3. API Docs
  4. getSubregions
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.getSubregions

Explore with Pulumi AI

Provides information about subregions.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

List a specific Subregion in the current Region

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

const subregions01 = outscale.getSubregions({
    filters: [{
        name: "subregion_names",
        values: ["eu-west-2a"],
    }],
});
Copy
import pulumi
import pulumi_outscale as outscale

subregions01 = outscale.get_subregions(filters=[{
    "name": "subregion_names",
    "values": ["eu-west-2a"],
}])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.GetSubregions(ctx, &outscale.GetSubregionsArgs{
			Filters: []outscale.GetSubregionsFilter{
				{
					Name: "subregion_names",
					Values: []string{
						"eu-west-2a",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var subregions01 = Outscale.GetSubregions.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetSubregionsFilterInputArgs
            {
                Name = "subregion_names",
                Values = new[]
                {
                    "eu-west-2a",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetSubregionsArgs;
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 subregions01 = OutscaleFunctions.getSubregions(GetSubregionsArgs.builder()
            .filters(GetSubregionsFilterArgs.builder()
                .name("subregion_names")
                .values("eu-west-2a")
                .build())
            .build());

    }
}
Copy
variables:
  subregions01:
    fn::invoke:
      function: outscale:getSubregions
      arguments:
        filters:
          - name: subregion_names
            values:
              - eu-west-2a
Copy

List two specific Subregions in the current Region

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

const subregions02 = outscale.getSubregions({
    filters: [{
        name: "subregion_names",
        values: [
            "eu-west-2a",
            "eu-west-2b",
        ],
    }],
});
Copy
import pulumi
import pulumi_outscale as outscale

subregions02 = outscale.get_subregions(filters=[{
    "name": "subregion_names",
    "values": [
        "eu-west-2a",
        "eu-west-2b",
    ],
}])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.GetSubregions(ctx, &outscale.GetSubregionsArgs{
			Filters: []outscale.GetSubregionsFilter{
				{
					Name: "subregion_names",
					Values: []string{
						"eu-west-2a",
						"eu-west-2b",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var subregions02 = Outscale.GetSubregions.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetSubregionsFilterInputArgs
            {
                Name = "subregion_names",
                Values = new[]
                {
                    "eu-west-2a",
                    "eu-west-2b",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetSubregionsArgs;
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 subregions02 = OutscaleFunctions.getSubregions(GetSubregionsArgs.builder()
            .filters(GetSubregionsFilterArgs.builder()
                .name("subregion_names")
                .values(                
                    "eu-west-2a",
                    "eu-west-2b")
                .build())
            .build());

    }
}
Copy
variables:
  subregions02:
    fn::invoke:
      function: outscale:getSubregions
      arguments:
        filters:
          - name: subregion_names
            values:
              - eu-west-2a
              - eu-west-2b
Copy

List all accessible Subregions in the current Region

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

const all_subregions = outscale.getSubregions({});
Copy
import pulumi
import pulumi_outscale as outscale

all_subregions = outscale.get_subregions()
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.GetSubregions(ctx, &outscale.GetSubregionsArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var all_subregions = Outscale.GetSubregions.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetSubregionsArgs;
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 all-subregions = OutscaleFunctions.getSubregions();

    }
}
Copy
variables:
  all-subregions:
    fn::invoke:
      function: outscale:getSubregions
      arguments: {}
Copy

Using getSubregions

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 getSubregions(args: GetSubregionsArgs, opts?: InvokeOptions): Promise<GetSubregionsResult>
function getSubregionsOutput(args: GetSubregionsOutputArgs, opts?: InvokeOptions): Output<GetSubregionsResult>
Copy
def get_subregions(filters: Optional[Sequence[GetSubregionsFilter]] = None,
                   id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetSubregionsResult
def get_subregions_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSubregionsFilterArgs]]]] = None,
                   id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetSubregionsResult]
Copy
func GetSubregions(ctx *Context, args *GetSubregionsArgs, opts ...InvokeOption) (*GetSubregionsResult, error)
func GetSubregionsOutput(ctx *Context, args *GetSubregionsOutputArgs, opts ...InvokeOption) GetSubregionsResultOutput
Copy

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

public static class GetSubregions 
{
    public static Task<GetSubregionsResult> InvokeAsync(GetSubregionsArgs args, InvokeOptions? opts = null)
    public static Output<GetSubregionsResult> Invoke(GetSubregionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSubregionsResult> getSubregions(GetSubregionsArgs args, InvokeOptions options)
public static Output<GetSubregionsResult> getSubregions(GetSubregionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: outscale:index/getSubregions:getSubregions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetSubregionsFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
Filters []GetSubregionsFilter
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
filters List<GetSubregionsFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
filters GetSubregionsFilter[]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id string
filters Sequence[GetSubregionsFilter]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id str
filters List<Property Map>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String

getSubregions Result

The following output properties are available:

Id string
RequestId string
Subregions List<GetSubregionsSubregion>
Information about one or more Subregions.
Filters List<GetSubregionsFilter>
Id string
RequestId string
Subregions []GetSubregionsSubregion
Information about one or more Subregions.
Filters []GetSubregionsFilter
id String
requestId String
subregions List<GetSubregionsSubregion>
Information about one or more Subregions.
filters List<GetSubregionsFilter>
id string
requestId string
subregions GetSubregionsSubregion[]
Information about one or more Subregions.
filters GetSubregionsFilter[]
id String
requestId String
subregions List<Property Map>
Information about one or more Subregions.
filters List<Property Map>

Supporting Types

GetSubregionsFilter

Name This property is required. string
Values This property is required. List<string>
Name This property is required. string
Values This property is required. []string
name This property is required. String
values This property is required. List<String>
name This property is required. string
values This property is required. string[]
name This property is required. str
values This property is required. Sequence[str]
name This property is required. String
values This property is required. List<String>

GetSubregionsSubregion

LocationCode This property is required. string
The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones.
RegionName This property is required. string
The name of the Region containing the Subregion.
State This property is required. string
The state of the Subregion.
SubregionName This property is required. string
The name of the Subregion.
LocationCode This property is required. string
The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones.
RegionName This property is required. string
The name of the Region containing the Subregion.
State This property is required. string
The state of the Subregion.
SubregionName This property is required. string
The name of the Subregion.
locationCode This property is required. String
The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones.
regionName This property is required. String
The name of the Region containing the Subregion.
state This property is required. String
The state of the Subregion.
subregionName This property is required. String
The name of the Subregion.
locationCode This property is required. string
The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones.
regionName This property is required. string
The name of the Region containing the Subregion.
state This property is required. string
The state of the Subregion.
subregionName This property is required. string
The name of the Subregion.
location_code This property is required. str
The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones.
region_name This property is required. str
The name of the Region containing the Subregion.
state This property is required. str
The state of the Subregion.
subregion_name This property is required. str
The name of the Subregion.
locationCode This property is required. String
The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones.
regionName This property is required. String
The name of the Region containing the Subregion.
state This property is required. String
The state of the Subregion.
subregionName This property is required. String
The name of the Subregion.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.