Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.slb.getZones
Explore with Pulumi AI
This data source provides availability zones for SLB that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: Available in v1.73.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const zonesIds = alicloud.slb.getZones({
    availableSlbAddressType: "vpc",
    availableSlbAddressIpVersion: "ipv4",
});
import pulumi
import pulumi_alicloud as alicloud
zones_ids = alicloud.slb.get_zones(available_slb_address_type="vpc",
    available_slb_address_ip_version="ipv4")
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := slb.GetZones(ctx, &slb.GetZonesArgs{
			AvailableSlbAddressType:      pulumi.StringRef("vpc"),
			AvailableSlbAddressIpVersion: pulumi.StringRef("ipv4"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var zonesIds = AliCloud.Slb.GetZones.Invoke(new()
    {
        AvailableSlbAddressType = "vpc",
        AvailableSlbAddressIpVersion = "ipv4",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.slb.SlbFunctions;
import com.pulumi.alicloud.slb.inputs.GetZonesArgs;
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 zonesIds = SlbFunctions.getZones(GetZonesArgs.builder()
            .availableSlbAddressType("vpc")
            .availableSlbAddressIpVersion("ipv4")
            .build());
    }
}
variables:
  zonesIds:
    fn::invoke:
      function: alicloud:slb:getZones
      arguments:
        availableSlbAddressType: vpc
        availableSlbAddressIpVersion: ipv4
Using getZones
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 getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>def get_zones(available_slb_address_ip_version: Optional[str] = None,
              available_slb_address_type: Optional[str] = None,
              enable_details: Optional[bool] = None,
              master_zone_id: Optional[str] = None,
              output_file: Optional[str] = None,
              slave_zone_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(available_slb_address_ip_version: Optional[pulumi.Input[str]] = None,
              available_slb_address_type: Optional[pulumi.Input[str]] = None,
              enable_details: Optional[pulumi.Input[bool]] = None,
              master_zone_id: Optional[pulumi.Input[str]] = None,
              output_file: Optional[pulumi.Input[str]] = None,
              slave_zone_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]func GetZones(ctx *Context, args *GetZonesArgs, opts ...InvokeOption) (*GetZonesResult, error)
func GetZonesOutput(ctx *Context, args *GetZonesOutputArgs, opts ...InvokeOption) GetZonesResultOutput> Note: This function is named GetZones in the Go SDK.
public static class GetZones 
{
    public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
    public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
public static Output<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:slb/getZones:getZones
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AvailableSlb stringAddress Ip Version 
- Filter the results by a slb instance address version. Can be either ipv4, oripv6.
- AvailableSlb stringAddress Type 
- Filter the results by a slb instance network type. Valid values:- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
 
- EnableDetails bool
- Default to false and only output idin thezonesblock. Set it to true can output more details.
- MasterZone stringId 
- The primary zone.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- SlaveZone stringId 
- The secondary zone.
- AvailableSlb stringAddress Ip Version 
- Filter the results by a slb instance address version. Can be either ipv4, oripv6.
- AvailableSlb stringAddress Type 
- Filter the results by a slb instance network type. Valid values:- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
 
- EnableDetails bool
- Default to false and only output idin thezonesblock. Set it to true can output more details.
- MasterZone stringId 
- The primary zone.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- SlaveZone stringId 
- The secondary zone.
- availableSlb StringAddress Ip Version 
- Filter the results by a slb instance address version. Can be either ipv4, oripv6.
- availableSlb StringAddress Type 
- Filter the results by a slb instance network type. Valid values:- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
 
- enableDetails Boolean
- Default to false and only output idin thezonesblock. Set it to true can output more details.
- masterZone StringId 
- The primary zone.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- slaveZone StringId 
- The secondary zone.
- availableSlb stringAddress Ip Version 
- Filter the results by a slb instance address version. Can be either ipv4, oripv6.
- availableSlb stringAddress Type 
- Filter the results by a slb instance network type. Valid values:- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
 
- enableDetails boolean
- Default to false and only output idin thezonesblock. Set it to true can output more details.
- masterZone stringId 
- The primary zone.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- slaveZone stringId 
- The secondary zone.
- available_slb_ straddress_ ip_ version 
- Filter the results by a slb instance address version. Can be either ipv4, oripv6.
- available_slb_ straddress_ type 
- Filter the results by a slb instance network type. Valid values:- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
 
- enable_details bool
- Default to false and only output idin thezonesblock. Set it to true can output more details.
- master_zone_ strid 
- The primary zone.
- output_file str
- File name where to save data source results (after running pulumi preview).
- slave_zone_ strid 
- The secondary zone.
- availableSlb StringAddress Ip Version 
- Filter the results by a slb instance address version. Can be either ipv4, oripv6.
- availableSlb StringAddress Type 
- Filter the results by a slb instance network type. Valid values:- vpc: an internal SLB instance that is deployed in a virtual private cloud (VPC).
- classic_internet: a public-facing SLB instance.
- classic_intranet: an internal SLB instance that is deployed in a classic network.
 
- enableDetails Boolean
- Default to false and only output idin thezonesblock. Set it to true can output more details.
- masterZone StringId 
- The primary zone.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- slaveZone StringId 
- The secondary zone.
getZones Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of primary zone IDs.
- Zones
List<Pulumi.Ali Cloud. Slb. Outputs. Get Zones Zone> 
- A list of availability zones. Each element contains the following attributes:
- AvailableSlb stringAddress Ip Version 
- AvailableSlb stringAddress Type 
- EnableDetails bool
- MasterZone stringId 
- (Available in 1.157.0+) The primary zone.
- OutputFile string
- SlaveZone stringId 
- (Available in 1.157.0+) The secondary zone.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of primary zone IDs.
- Zones
[]GetZones Zone 
- A list of availability zones. Each element contains the following attributes:
- AvailableSlb stringAddress Ip Version 
- AvailableSlb stringAddress Type 
- EnableDetails bool
- MasterZone stringId 
- (Available in 1.157.0+) The primary zone.
- OutputFile string
- SlaveZone stringId 
- (Available in 1.157.0+) The secondary zone.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of primary zone IDs.
- zones
List<GetZones Zone> 
- A list of availability zones. Each element contains the following attributes:
- availableSlb StringAddress Ip Version 
- availableSlb StringAddress Type 
- enableDetails Boolean
- masterZone StringId 
- (Available in 1.157.0+) The primary zone.
- outputFile String
- slaveZone StringId 
- (Available in 1.157.0+) The secondary zone.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of primary zone IDs.
- zones
GetZones Zone[] 
- A list of availability zones. Each element contains the following attributes:
- availableSlb stringAddress Ip Version 
- availableSlb stringAddress Type 
- enableDetails boolean
- masterZone stringId 
- (Available in 1.157.0+) The primary zone.
- outputFile string
- slaveZone stringId 
- (Available in 1.157.0+) The secondary zone.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of primary zone IDs.
- zones
Sequence[GetZones Zone] 
- A list of availability zones. Each element contains the following attributes:
- available_slb_ straddress_ ip_ version 
- available_slb_ straddress_ type 
- enable_details bool
- master_zone_ strid 
- (Available in 1.157.0+) The primary zone.
- output_file str
- slave_zone_ strid 
- (Available in 1.157.0+) The secondary zone.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of primary zone IDs.
- zones List<Property Map>
- A list of availability zones. Each element contains the following attributes:
- availableSlb StringAddress Ip Version 
- availableSlb StringAddress Type 
- enableDetails Boolean
- masterZone StringId 
- (Available in 1.157.0+) The primary zone.
- outputFile String
- slaveZone StringId 
- (Available in 1.157.0+) The secondary zone.
Supporting Types
GetZonesZone  
- Id string
- ID of the zone. It is same as master_zone_id.
- MasterZone stringId 
- The primary zone.
- SlaveZone stringId 
- The secondary zone.
- SlbSlave List<string>Zone Ids 
- (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone.
It has been deprecated from v1.157.0 and use slave_zone_idinstead.
- SupportedResources List<Pulumi.Ali Cloud. Slb. Inputs. Get Zones Zone Supported Resource> 
- (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- Id string
- ID of the zone. It is same as master_zone_id.
- MasterZone stringId 
- The primary zone.
- SlaveZone stringId 
- The secondary zone.
- SlbSlave []stringZone Ids 
- (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone.
It has been deprecated from v1.157.0 and use slave_zone_idinstead.
- SupportedResources []GetZones Zone Supported Resource 
- (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id String
- ID of the zone. It is same as master_zone_id.
- masterZone StringId 
- The primary zone.
- slaveZone StringId 
- The secondary zone.
- slbSlave List<String>Zone Ids 
- (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone.
It has been deprecated from v1.157.0 and use slave_zone_idinstead.
- supportedResources List<GetZones Zone Supported Resource> 
- (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id string
- ID of the zone. It is same as master_zone_id.
- masterZone stringId 
- The primary zone.
- slaveZone stringId 
- The secondary zone.
- slbSlave string[]Zone Ids 
- (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone.
It has been deprecated from v1.157.0 and use slave_zone_idinstead.
- supportedResources GetZones Zone Supported Resource[] 
- (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id str
- ID of the zone. It is same as master_zone_id.
- master_zone_ strid 
- The primary zone.
- slave_zone_ strid 
- The secondary zone.
- slb_slave_ Sequence[str]zone_ ids 
- (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone.
It has been deprecated from v1.157.0 and use slave_zone_idinstead.
- supported_resources Sequence[GetZones Zone Supported Resource] 
- (Available in 1.154.0+)A list of available resource which the slb master zone supported.
- id String
- ID of the zone. It is same as master_zone_id.
- masterZone StringId 
- The primary zone.
- slaveZone StringId 
- The secondary zone.
- slbSlave List<String>Zone Ids 
- (Deprecated from 1.157.0) A list of slb slave zone ids in which the slb master zone.
It has been deprecated from v1.157.0 and use slave_zone_idinstead.
- supportedResources List<Property Map>
- (Available in 1.154.0+)A list of available resource which the slb master zone supported.
GetZonesZoneSupportedResource    
- AddressIp stringVersion 
- The type of IP address.
- AddressType string
- The type of network.
- AddressIp stringVersion 
- The type of IP address.
- AddressType string
- The type of network.
- addressIp StringVersion 
- The type of IP address.
- addressType String
- The type of network.
- addressIp stringVersion 
- The type of IP address.
- addressType string
- The type of network.
- address_ip_ strversion 
- The type of IP address.
- address_type str
- The type of network.
- addressIp StringVersion 
- The type of IP address.
- addressType String
- The type of network.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.