1. Packages
  2. Alicloud Provider
  3. API Docs
  4. slb
  5. getZones
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.slb.getZones

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:slb/getZones:getZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AvailableSlbAddressIpVersion string
    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.
    AvailableSlbAddressType string
    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 id in the zones block. Set it to true can output more details.

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    MasterZoneId string
    The primary zone.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SlaveZoneId string
    The secondary zone.
    AvailableSlbAddressIpVersion string
    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.
    AvailableSlbAddressType string
    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 id in the zones block. Set it to true can output more details.

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    MasterZoneId string
    The primary zone.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    SlaveZoneId string
    The secondary zone.
    availableSlbAddressIpVersion String
    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.
    availableSlbAddressType String
    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 id in the zones block. Set it to true can output more details.

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    masterZoneId String
    The primary zone.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    slaveZoneId String
    The secondary zone.
    availableSlbAddressIpVersion string
    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.
    availableSlbAddressType string
    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 id in the zones block. Set it to true can output more details.

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    masterZoneId string
    The primary zone.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    slaveZoneId string
    The secondary zone.
    available_slb_address_ip_version str
    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.
    available_slb_address_type str
    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 id in the zones block. Set it to true can output more details.

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    master_zone_id str
    The primary zone.
    output_file str
    File name where to save data source results (after running pulumi preview).
    slave_zone_id str
    The secondary zone.
    availableSlbAddressIpVersion String
    Filter the results by a slb instance address version. Can be either ipv4, or ipv6.
    availableSlbAddressType String
    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 id in the zones block. Set it to true can output more details.

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    masterZoneId String
    The primary zone.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    slaveZoneId String
    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.AliCloud.Slb.Outputs.GetZonesZone>
    A list of availability zones. Each element contains the following attributes:
    AvailableSlbAddressIpVersion string
    AvailableSlbAddressType string
    EnableDetails bool

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    MasterZoneId string
    (Available in 1.157.0+) The primary zone.
    OutputFile string
    SlaveZoneId string
    (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 []GetZonesZone
    A list of availability zones. Each element contains the following attributes:
    AvailableSlbAddressIpVersion string
    AvailableSlbAddressType string
    EnableDetails bool

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    MasterZoneId string
    (Available in 1.157.0+) The primary zone.
    OutputFile string
    SlaveZoneId string
    (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<GetZonesZone>
    A list of availability zones. Each element contains the following attributes:
    availableSlbAddressIpVersion String
    availableSlbAddressType String
    enableDetails Boolean

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    masterZoneId String
    (Available in 1.157.0+) The primary zone.
    outputFile String
    slaveZoneId String
    (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 GetZonesZone[]
    A list of availability zones. Each element contains the following attributes:
    availableSlbAddressIpVersion string
    availableSlbAddressType string
    enableDetails boolean

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    masterZoneId string
    (Available in 1.157.0+) The primary zone.
    outputFile string
    slaveZoneId string
    (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[GetZonesZone]
    A list of availability zones. Each element contains the following attributes:
    available_slb_address_ip_version str
    available_slb_address_type str
    enable_details bool

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    master_zone_id str
    (Available in 1.157.0+) The primary zone.
    output_file str
    slave_zone_id str
    (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:
    availableSlbAddressIpVersion String
    availableSlbAddressType String
    enableDetails Boolean

    Deprecated: The parameter enable_details has been deprecated from version v1.154.0+

    masterZoneId String
    (Available in 1.157.0+) The primary zone.
    outputFile String
    slaveZoneId String
    (Available in 1.157.0+) The secondary zone.

    Supporting Types

    GetZonesZone

    Id string
    ID of the zone. It is same as master_zone_id.
    MasterZoneId string
    The primary zone.
    SlaveZoneId string
    The secondary zone.
    SlbSlaveZoneIds List<string>
    (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_id instead.

    Deprecated: the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.

    SupportedResources List<Pulumi.AliCloud.Slb.Inputs.GetZonesZoneSupportedResource>
    (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.
    MasterZoneId string
    The primary zone.
    SlaveZoneId string
    The secondary zone.
    SlbSlaveZoneIds []string
    (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_id instead.

    Deprecated: the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.

    SupportedResources []GetZonesZoneSupportedResource
    (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.
    masterZoneId String
    The primary zone.
    slaveZoneId String
    The secondary zone.
    slbSlaveZoneIds List<String>
    (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_id instead.

    Deprecated: the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.

    supportedResources List<GetZonesZoneSupportedResource>
    (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.
    masterZoneId string
    The primary zone.
    slaveZoneId string
    The secondary zone.
    slbSlaveZoneIds string[]
    (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_id instead.

    Deprecated: the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.

    supportedResources GetZonesZoneSupportedResource[]
    (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_id str
    The primary zone.
    slave_zone_id str
    The secondary zone.
    slb_slave_zone_ids Sequence[str]
    (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_id instead.

    Deprecated: the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.

    supported_resources Sequence[GetZonesZoneSupportedResource]
    (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.
    masterZoneId String
    The primary zone.
    slaveZoneId String
    The secondary zone.
    slbSlaveZoneIds List<String>
    (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_id instead.

    Deprecated: the attribute slb_slave_zone_ids has been deprecated from version 1.157.0 and use slave_zone_id instead.

    supportedResources List<Property Map>
    (Available in 1.154.0+)A list of available resource which the slb master zone supported.

    GetZonesZoneSupportedResource

    AddressIpVersion string
    The type of IP address.
    AddressType string
    The type of network.
    AddressIpVersion string
    The type of IP address.
    AddressType string
    The type of network.
    addressIpVersion String
    The type of IP address.
    addressType String
    The type of network.
    addressIpVersion string
    The type of IP address.
    addressType string
    The type of network.
    address_ip_version str
    The type of IP address.
    address_type str
    The type of network.
    addressIpVersion String
    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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi