1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. rds
  5. getZones
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.rds.getZones

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides availability zones for RDS 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";
    
    const example = alicloud.rds.getZones({
        engine: "MySQL",
        engineVersion: "8.0",
        instanceChargeType: "PostPaid",
        category: "Basic",
        dbInstanceStorageType: "cloud_essd",
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.rds.get_zones(engine="MySQL",
        engine_version="8.0",
        instance_charge_type="PostPaid",
        category="Basic",
        db_instance_storage_type="cloud_essd")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/rds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rds.GetZones(ctx, &rds.GetZonesArgs{
    			Engine:                pulumi.StringRef("MySQL"),
    			EngineVersion:         pulumi.StringRef("8.0"),
    			InstanceChargeType:    pulumi.StringRef("PostPaid"),
    			Category:              pulumi.StringRef("Basic"),
    			DbInstanceStorageType: pulumi.StringRef("cloud_essd"),
    		}, 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 example = AliCloud.Rds.GetZones.Invoke(new()
        {
            Engine = "MySQL",
            EngineVersion = "8.0",
            InstanceChargeType = "PostPaid",
            Category = "Basic",
            DbInstanceStorageType = "cloud_essd",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.rds.RdsFunctions;
    import com.pulumi.alicloud.rds.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 example = RdsFunctions.getZones(GetZonesArgs.builder()
                .engine("MySQL")
                .engineVersion("8.0")
                .instanceChargeType("PostPaid")
                .category("Basic")
                .dbInstanceStorageType("cloud_essd")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:rds:getZones
          Arguments:
            engine: MySQL
            engineVersion: '8.0'
            instanceChargeType: PostPaid
            category: Basic
            dbInstanceStorageType: cloud_essd
    

    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(category: Optional[str] = None,
                  db_instance_storage_type: Optional[str] = None,
                  engine: Optional[str] = None,
                  engine_version: Optional[str] = None,
                  instance_charge_type: Optional[str] = None,
                  multi: Optional[bool] = None,
                  multi_zone: Optional[bool] = None,
                  output_file: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetZonesResult
    def get_zones_output(category: Optional[pulumi.Input[str]] = None,
                  db_instance_storage_type: Optional[pulumi.Input[str]] = None,
                  engine: Optional[pulumi.Input[str]] = None,
                  engine_version: Optional[pulumi.Input[str]] = None,
                  instance_charge_type: Optional[pulumi.Input[str]] = None,
                  multi: Optional[pulumi.Input[bool]] = None,
                  multi_zone: Optional[pulumi.Input[bool]] = None,
                  output_file: 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:rds/getZones:getZones
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Category string
    DB Instance category. the value like [Basic, HighAvailability, Finance, AlwaysOn, serverless_basic, serverless_standard, serverless_ha, cluster], detail info.
    DbInstanceStorageType string
    The DB instance storage space required by the user. Valid values: "cloud_ssd", "local_ssd", "cloud_essd", "cloud_essd2", "cloud_essd3".
    Engine string
    Database type. Valid values: "MySQL", "SQLServer", "PostgreSQL", "MariaDB". If not set, it will match all of engines.
    EngineVersion string
    Database version required by the user. Value options can refer to the latest docs detail info EngineVersion.
    InstanceChargeType string
    Filter the results by a specific instance charge type. Valid values: PrePaid and PostPaid and Serverless. Default to PostPaid.
    Multi bool
    It has been deprecated from version 1.137.0 and using multi_zone instead.

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    MultiZone bool
    Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch RDS instances.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Category string
    DB Instance category. the value like [Basic, HighAvailability, Finance, AlwaysOn, serverless_basic, serverless_standard, serverless_ha, cluster], detail info.
    DbInstanceStorageType string
    The DB instance storage space required by the user. Valid values: "cloud_ssd", "local_ssd", "cloud_essd", "cloud_essd2", "cloud_essd3".
    Engine string
    Database type. Valid values: "MySQL", "SQLServer", "PostgreSQL", "MariaDB". If not set, it will match all of engines.
    EngineVersion string
    Database version required by the user. Value options can refer to the latest docs detail info EngineVersion.
    InstanceChargeType string
    Filter the results by a specific instance charge type. Valid values: PrePaid and PostPaid and Serverless. Default to PostPaid.
    Multi bool
    It has been deprecated from version 1.137.0 and using multi_zone instead.

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    MultiZone bool
    Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch RDS instances.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    category String
    DB Instance category. the value like [Basic, HighAvailability, Finance, AlwaysOn, serverless_basic, serverless_standard, serverless_ha, cluster], detail info.
    dbInstanceStorageType String
    The DB instance storage space required by the user. Valid values: "cloud_ssd", "local_ssd", "cloud_essd", "cloud_essd2", "cloud_essd3".
    engine String
    Database type. Valid values: "MySQL", "SQLServer", "PostgreSQL", "MariaDB". If not set, it will match all of engines.
    engineVersion String
    Database version required by the user. Value options can refer to the latest docs detail info EngineVersion.
    instanceChargeType String
    Filter the results by a specific instance charge type. Valid values: PrePaid and PostPaid and Serverless. Default to PostPaid.
    multi Boolean
    It has been deprecated from version 1.137.0 and using multi_zone instead.

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multiZone Boolean
    Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch RDS instances.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    category string
    DB Instance category. the value like [Basic, HighAvailability, Finance, AlwaysOn, serverless_basic, serverless_standard, serverless_ha, cluster], detail info.
    dbInstanceStorageType string
    The DB instance storage space required by the user. Valid values: "cloud_ssd", "local_ssd", "cloud_essd", "cloud_essd2", "cloud_essd3".
    engine string
    Database type. Valid values: "MySQL", "SQLServer", "PostgreSQL", "MariaDB". If not set, it will match all of engines.
    engineVersion string
    Database version required by the user. Value options can refer to the latest docs detail info EngineVersion.
    instanceChargeType string
    Filter the results by a specific instance charge type. Valid values: PrePaid and PostPaid and Serverless. Default to PostPaid.
    multi boolean
    It has been deprecated from version 1.137.0 and using multi_zone instead.

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multiZone boolean
    Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch RDS instances.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    category str
    DB Instance category. the value like [Basic, HighAvailability, Finance, AlwaysOn, serverless_basic, serverless_standard, serverless_ha, cluster], detail info.
    db_instance_storage_type str
    The DB instance storage space required by the user. Valid values: "cloud_ssd", "local_ssd", "cloud_essd", "cloud_essd2", "cloud_essd3".
    engine str
    Database type. Valid values: "MySQL", "SQLServer", "PostgreSQL", "MariaDB". If not set, it will match all of engines.
    engine_version str
    Database version required by the user. Value options can refer to the latest docs detail info EngineVersion.
    instance_charge_type str
    Filter the results by a specific instance charge type. Valid values: PrePaid and PostPaid and Serverless. Default to PostPaid.
    multi bool
    It has been deprecated from version 1.137.0 and using multi_zone instead.

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multi_zone bool
    Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch RDS instances.
    output_file str
    File name where to save data source results (after running pulumi preview).
    category String
    DB Instance category. the value like [Basic, HighAvailability, Finance, AlwaysOn, serverless_basic, serverless_standard, serverless_ha, cluster], detail info.
    dbInstanceStorageType String
    The DB instance storage space required by the user. Valid values: "cloud_ssd", "local_ssd", "cloud_essd", "cloud_essd2", "cloud_essd3".
    engine String
    Database type. Valid values: "MySQL", "SQLServer", "PostgreSQL", "MariaDB". If not set, it will match all of engines.
    engineVersion String
    Database version required by the user. Value options can refer to the latest docs detail info EngineVersion.
    instanceChargeType String
    Filter the results by a specific instance charge type. Valid values: PrePaid and PostPaid and Serverless. Default to PostPaid.
    multi Boolean
    It has been deprecated from version 1.137.0 and using multi_zone instead.

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multiZone Boolean
    Indicate whether the zones can be used in a multi AZ configuration. Default to false. Multi AZ is usually used to launch RDS instances.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    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.AliCloud.Rds.Outputs.GetZonesZone>
    A list of availability zones. Each element contains the following attributes:
    Category string
    DbInstanceStorageType string
    Engine string
    EngineVersion string
    InstanceChargeType string
    Multi bool

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    MultiZone bool
    OutputFile string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of zone IDs.
    Zones []GetZonesZone
    A list of availability zones. Each element contains the following attributes:
    Category string
    DbInstanceStorageType string
    Engine string
    EngineVersion string
    InstanceChargeType string
    Multi bool

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    MultiZone bool
    OutputFile string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of zone IDs.
    zones List<GetZonesZone>
    A list of availability zones. Each element contains the following attributes:
    category String
    dbInstanceStorageType String
    engine String
    engineVersion String
    instanceChargeType String
    multi Boolean

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multiZone Boolean
    outputFile String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of zone IDs.
    zones GetZonesZone[]
    A list of availability zones. Each element contains the following attributes:
    category string
    dbInstanceStorageType string
    engine string
    engineVersion string
    instanceChargeType string
    multi boolean

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multiZone boolean
    outputFile string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of zone IDs.
    zones Sequence[GetZonesZone]
    A list of availability zones. Each element contains the following attributes:
    category str
    db_instance_storage_type str
    engine str
    engine_version str
    instance_charge_type str
    multi bool

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multi_zone bool
    output_file 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:
    category String
    dbInstanceStorageType String
    engine String
    engineVersion String
    instanceChargeType String
    multi Boolean

    Deprecated: It has been deprecated from version 1.137.0 and using multi_zone instead.

    multiZone Boolean
    outputFile String

    Supporting Types

    GetZonesZone

    Id string
    ID of the zone.
    MultiZoneIds List<string>
    A list of zone ids in which the multi zone.
    Id string
    ID of the zone.
    MultiZoneIds []string
    A list of zone ids in which the multi zone.
    id String
    ID of the zone.
    multiZoneIds List<String>
    A list of zone ids in which the multi zone.
    id string
    ID of the zone.
    multiZoneIds string[]
    A list of zone ids in which the multi zone.
    id str
    ID of the zone.
    multi_zone_ids Sequence[str]
    A list of zone ids in which the multi zone.
    id String
    ID of the zone.
    multiZoneIds List<String>
    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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi