Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.kvstore.getZones
Explore with Pulumi AI
This data source provides availability zones for Tair (Redis OSS-Compatible) And Memcache (KVStore) that can be accessed by an Alibaba Cloud account within the region configured in the provider.
NOTE: Available since v1.73.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const zonesIds = alicloud.kvstore.getZones({
    instanceChargeType: "PostPaid",
});
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
zones_ids = alicloud.kvstore.get_zones(instance_charge_type="PostPaid")
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kvstore"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Declare the data source
		_, err := kvstore.GetZones(ctx, &kvstore.GetZonesArgs{
			InstanceChargeType: pulumi.StringRef("PostPaid"),
		}, 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(() => 
{
    // Declare the data source
    var zonesIds = AliCloud.KVStore.GetZones.Invoke(new()
    {
        InstanceChargeType = "PostPaid",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.kvstore.KvstoreFunctions;
import com.pulumi.alicloud.kvstore.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) {
        // Declare the data source
        final var zonesIds = KvstoreFunctions.getZones(GetZonesArgs.builder()
            .instanceChargeType("PostPaid")
            .build());
    }
}
variables:
  # Declare the data source
  zonesIds:
    fn::invoke:
      function: alicloud:kvstore:getZones
      arguments:
        instanceChargeType: PostPaid
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(engine: Optional[str] = None,
              instance_charge_type: Optional[str] = None,
              multi: Optional[bool] = None,
              output_file: Optional[str] = None,
              product_type: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(engine: Optional[pulumi.Input[str]] = None,
              instance_charge_type: Optional[pulumi.Input[str]] = None,
              multi: Optional[pulumi.Input[bool]] = None,
              output_file: Optional[pulumi.Input[str]] = None,
              product_type: 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:kvstore/getZones:getZones
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Engine string
- Database type. Options are Redis,Memcache. Default toRedis.- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: Local,Tair_rdb,Tair_scm,Tair_essd,OnECS.
 
- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: 
- InstanceCharge stringType 
- Filter the results by a specific instance charge type. Valid values: PrePaidandPostPaid. Default toPostPaid.
- Multi bool
- Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch Tair (Redis OSS-Compatible) And Memcache (KVStore) instances.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ProductType string
- Engine string
- Database type. Options are Redis,Memcache. Default toRedis.- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: Local,Tair_rdb,Tair_scm,Tair_essd,OnECS.
 
- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: 
- InstanceCharge stringType 
- Filter the results by a specific instance charge type. Valid values: PrePaidandPostPaid. Default toPostPaid.
- Multi bool
- Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch Tair (Redis OSS-Compatible) And Memcache (KVStore) instances.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ProductType string
- engine String
- Database type. Options are Redis,Memcache. Default toRedis.- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: Local,Tair_rdb,Tair_scm,Tair_essd,OnECS.
 
- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: 
- instanceCharge StringType 
- Filter the results by a specific instance charge type. Valid values: PrePaidandPostPaid. Default toPostPaid.
- multi Boolean
- Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch Tair (Redis OSS-Compatible) And Memcache (KVStore) instances.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- productType String
- engine string
- Database type. Options are Redis,Memcache. Default toRedis.- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: Local,Tair_rdb,Tair_scm,Tair_essd,OnECS.
 
- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: 
- instanceCharge stringType 
- Filter the results by a specific instance charge type. Valid values: PrePaidandPostPaid. Default toPostPaid.
- multi boolean
- Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch Tair (Redis OSS-Compatible) And Memcache (KVStore) instances.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- productType string
- engine str
- Database type. Options are Redis,Memcache. Default toRedis.- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: Local,Tair_rdb,Tair_scm,Tair_essd,OnECS.
 
- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: 
- instance_charge_ strtype 
- Filter the results by a specific instance charge type. Valid values: PrePaidandPostPaid. Default toPostPaid.
- multi bool
- Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch Tair (Redis OSS-Compatible) And Memcache (KVStore) instances.
- output_file str
- File name where to save data source results (after running pulumi preview).
- product_type str
- engine String
- Database type. Options are Redis,Memcache. Default toRedis.- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: Local,Tair_rdb,Tair_scm,Tair_essd,OnECS.
 
- product_type - (Optional, Available since v1.130.0+) The type of the service. Valid values: 
- instanceCharge StringType 
- Filter the results by a specific instance charge type. Valid values: PrePaidandPostPaid. Default toPostPaid.
- multi Boolean
- Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch Tair (Redis OSS-Compatible) And Memcache (KVStore) instances.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- productType String
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 zone IDs.
- Zones
List<Pulumi.Ali Cloud. KVStore. Outputs. Get Zones Zone> 
- A list of availability zones. Each element contains the following attributes:
- Engine string
- InstanceCharge stringType 
- Multi bool
- OutputFile string
- ProductType string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of zone IDs.
- Zones
[]GetZones Zone 
- A list of availability zones. Each element contains the following attributes:
- Engine string
- InstanceCharge stringType 
- Multi bool
- OutputFile string
- ProductType string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of zone IDs.
- zones
List<GetZones Zone> 
- A list of availability zones. Each element contains the following attributes:
- engine String
- instanceCharge StringType 
- multi Boolean
- outputFile String
- productType String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of zone IDs.
- zones
GetZones Zone[] 
- A list of availability zones. Each element contains the following attributes:
- engine string
- instanceCharge stringType 
- multi boolean
- outputFile string
- productType string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of zone IDs.
- zones
Sequence[GetZones Zone] 
- A list of availability zones. Each element contains the following attributes:
- engine str
- instance_charge_ strtype 
- multi bool
- output_file str
- product_type str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of zone IDs.
- zones List<Property Map>
- A list of availability zones. Each element contains the following attributes:
- engine String
- instanceCharge StringType 
- multi Boolean
- outputFile String
- productType String
Supporting Types
GetZonesZone  
- Id string
- ID of the zone.
- MultiZone List<string>Ids 
- A list of zone ids in which the multi zone.
- Id string
- ID of the zone.
- MultiZone []stringIds 
- A list of zone ids in which the multi zone.
- id String
- ID of the zone.
- multiZone List<String>Ids 
- A list of zone ids in which the multi zone.
- id string
- ID of the zone.
- multiZone string[]Ids 
- A list of zone ids in which the multi zone.
- id str
- ID of the zone.
- multi_zone_ Sequence[str]ids 
- A list of zone ids in which the multi zone.
- id String
- ID of the zone.
- multiZone List<String>Ids 
- A list of zone ids in which the multi zone.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.