Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.ebs.getRegions
Explore with Pulumi AI
This data source provides the Ebs Regions of the current Alibaba Cloud user.
NOTE: Available in v1.187.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.ebs.getRegions({
regionId: "cn-hangzhou",
});
export const regions = _default.then(_default => _default.regions);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ebs.get_regions(region_id="cn-hangzhou")
pulumi.export("regions", default.regions)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ebs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := ebs.GetRegions(ctx, &ebs.GetRegionsArgs{
RegionId: pulumi.StringRef("cn-hangzhou"),
}, nil)
if err != nil {
return err
}
ctx.Export("regions", _default.Regions)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Ebs.GetRegions.Invoke(new()
{
RegionId = "cn-hangzhou",
});
return new Dictionary<string, object?>
{
["regions"] = @default.Apply(@default => @default.Apply(getRegionsResult => getRegionsResult.Regions)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ebs.EbsFunctions;
import com.pulumi.alicloud.ebs.inputs.GetRegionsArgs;
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 default = EbsFunctions.getRegions(GetRegionsArgs.builder()
.regionId("cn-hangzhou")
.build());
ctx.export("regions", default_.regions());
}
}
variables:
default:
fn::invoke:
Function: alicloud:ebs:getRegions
Arguments:
regionId: cn-hangzhou
outputs:
regions: ${default.regions}
Using getRegions
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 getRegions(args: GetRegionsArgs, opts?: InvokeOptions): Promise<GetRegionsResult>
function getRegionsOutput(args: GetRegionsOutputArgs, opts?: InvokeOptions): Output<GetRegionsResult>
def get_regions(output_file: Optional[str] = None,
region_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRegionsResult
def get_regions_output(output_file: Optional[pulumi.Input[str]] = None,
region_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRegionsResult]
func GetRegions(ctx *Context, args *GetRegionsArgs, opts ...InvokeOption) (*GetRegionsResult, error)
func GetRegionsOutput(ctx *Context, args *GetRegionsOutputArgs, opts ...InvokeOption) GetRegionsResultOutput
> Note: This function is named GetRegions
in the Go SDK.
public static class GetRegions
{
public static Task<GetRegionsResult> InvokeAsync(GetRegionsArgs args, InvokeOptions? opts = null)
public static Output<GetRegionsResult> Invoke(GetRegionsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRegionsResult> getRegions(GetRegionsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ebs/getRegions:getRegions
arguments:
# arguments dictionary
The following arguments are supported:
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Region
Id string - A list of Disk Replica Group IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Region
Id string - A list of Disk Replica Group IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - region
Id String - A list of Disk Replica Group IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - region
Id string - A list of Disk Replica Group IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - region_
id str - A list of Disk Replica Group IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - region
Id String - A list of Disk Replica Group IDs.
getRegions Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Regions
List<Pulumi.
Ali Cloud. Ebs. Outputs. Get Regions Region> - Output
File string - Region
Id string
- Id string
- The provider-assigned unique ID for this managed resource.
- Regions
[]Get
Regions Region - Output
File string - Region
Id string
- id String
- The provider-assigned unique ID for this managed resource.
- regions
List<Get
Regions Region> - output
File String - region
Id String
- id string
- The provider-assigned unique ID for this managed resource.
- regions
Get
Regions Region[] - output
File string - region
Id string
- id str
- The provider-assigned unique ID for this managed resource.
- regions
Sequence[Get
Regions Region] - output_
file str - region_
id str
- id String
- The provider-assigned unique ID for this managed resource.
- regions List<Property Map>
- output
File String - region
Id String
Supporting Types
GetRegionsRegion
- Region
Id string - The ID of the region.
- Zones
List<Pulumi.
Ali Cloud. Ebs. Inputs. Get Regions Region Zone> - A list of Ebs Zones.
- Region
Id string - The ID of the region.
- Zones
[]Get
Regions Region Zone - A list of Ebs Zones.
- region
Id String - The ID of the region.
- zones
List<Get
Regions Region Zone> - A list of Ebs Zones.
- region
Id string - The ID of the region.
- zones
Get
Regions Region Zone[] - A list of Ebs Zones.
- region_
id str - The ID of the region.
- zones
Sequence[Get
Regions Region Zone] - A list of Ebs Zones.
- region
Id String - The ID of the region.
- zones List<Property Map>
- A list of Ebs Zones.
GetRegionsRegionZone
- Zone
Id string - The ID of the zone.
- Zone
Id string - The ID of the zone.
- zone
Id String - The ID of the zone.
- zone
Id string - The ID of the zone.
- zone_
id str - The ID of the zone.
- zone
Id String - The ID of the zone.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.