Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.pvtz.getZones
Explore with Pulumi AI
This data source lists a number of Private Zones resource information owned by an Alibaba Cloud account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const pvtzZonesDs = alicloud.pvtz.getZones({
keyword: basic.zoneName,
});
export const firstZoneId = pvtzZonesDs.then(pvtzZonesDs => pvtzZonesDs.zones?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
pvtz_zones_ds = alicloud.pvtz.get_zones(keyword=basic["zoneName"])
pulumi.export("firstZoneId", pvtz_zones_ds.zones[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pvtz"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pvtzZonesDs, err := pvtz.GetZones(ctx, &pvtz.GetZonesArgs{
Keyword: pulumi.StringRef(basic.ZoneName),
}, nil)
if err != nil {
return err
}
ctx.Export("firstZoneId", pvtzZonesDs.Zones[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var pvtzZonesDs = AliCloud.Pvtz.GetZones.Invoke(new()
{
Keyword = basic.ZoneName,
});
return new Dictionary<string, object?>
{
["firstZoneId"] = pvtzZonesDs.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.pvtz.PvtzFunctions;
import com.pulumi.alicloud.pvtz.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 pvtzZonesDs = PvtzFunctions.getZones(GetZonesArgs.builder()
.keyword(basic.zoneName())
.build());
ctx.export("firstZoneId", pvtzZonesDs.applyValue(getZonesResult -> getZonesResult.zones()[0].id()));
}
}
variables:
pvtzZonesDs:
fn::invoke:
Function: alicloud:pvtz:getZones
Arguments:
keyword: ${basic.zoneName}
outputs:
firstZoneId: ${pvtzZonesDs.zones[0].id}
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(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
keyword: Optional[str] = None,
lang: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
query_region_id: Optional[str] = None,
query_vpc_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
search_mode: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
keyword: Optional[pulumi.Input[str]] = None,
lang: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
query_region_id: Optional[pulumi.Input[str]] = None,
query_vpc_id: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
search_mode: 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:pvtz/getZones:getZones
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Default to
false
. Set it to true can output more details. - Ids List<string>
- A list of zone IDs.
- Keyword string
- keyword for zone name.
- Lang string
- User language.
- Name
Regex string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Query
Region stringId - query_region_id for zone regionId.
- Query
Vpc stringId - query_vpc_id for zone vpcId.
- Resource
Group stringId - resource_group_id for zone resourceGroupId.
- Search
Mode string - Search mode. Value:
- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
- Enable
Details bool - Default to
false
. Set it to true can output more details. - Ids []string
- A list of zone IDs.
- Keyword string
- keyword for zone name.
- Lang string
- User language.
- Name
Regex string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Query
Region stringId - query_region_id for zone regionId.
- Query
Vpc stringId - query_vpc_id for zone vpcId.
- Resource
Group stringId - resource_group_id for zone resourceGroupId.
- Search
Mode string - Search mode. Value:
- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
- enable
Details Boolean - Default to
false
. Set it to true can output more details. - ids List<String>
- A list of zone IDs.
- keyword String
- keyword for zone name.
- lang String
- User language.
- name
Regex String - output
File String - File name where to save data source results (after running
pulumi preview
). - query
Region StringId - query_region_id for zone regionId.
- query
Vpc StringId - query_vpc_id for zone vpcId.
- resource
Group StringId - resource_group_id for zone resourceGroupId.
- search
Mode String - Search mode. Value:
- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
- enable
Details boolean - Default to
false
. Set it to true can output more details. - ids string[]
- A list of zone IDs.
- keyword string
- keyword for zone name.
- lang string
- User language.
- name
Regex string - output
File string - File name where to save data source results (after running
pulumi preview
). - query
Region stringId - query_region_id for zone regionId.
- query
Vpc stringId - query_vpc_id for zone vpcId.
- resource
Group stringId - resource_group_id for zone resourceGroupId.
- search
Mode string - Search mode. Value:
- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
- enable_
details bool - Default to
false
. Set it to true can output more details. - ids Sequence[str]
- A list of zone IDs.
- keyword str
- keyword for zone name.
- lang str
- User language.
- name_
regex str - output_
file str - File name where to save data source results (after running
pulumi preview
). - query_
region_ strid - query_region_id for zone regionId.
- query_
vpc_ strid - query_vpc_id for zone vpcId.
- resource_
group_ strid - resource_group_id for zone resourceGroupId.
- search_
mode str - Search mode. Value:
- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
- enable
Details Boolean - Default to
false
. Set it to true can output more details. - ids List<String>
- A list of zone IDs.
- keyword String
- keyword for zone name.
- lang String
- User language.
- name
Regex String - output
File String - File name where to save data source results (after running
pulumi preview
). - query
Region StringId - query_region_id for zone regionId.
- query
Vpc StringId - query_vpc_id for zone vpcId.
- resource
Group StringId - resource_group_id for zone resourceGroupId.
- search
Mode String - Search mode. Value:
- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
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.
- Names List<string>
- A list of zone names.
- Zones
List<Pulumi.
Ali Cloud. Pvtz. Outputs. Get Zones Zone> - A list of zones. Each element contains the following attributes:
- Enable
Details bool - Keyword string
- Lang string
- Name
Regex string - Output
File string - Query
Region stringId - Query
Vpc stringId - Resource
Group stringId - The Id of resource group which the Private Zone belongs.
- Search
Mode string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of zone IDs.
- Names []string
- A list of zone names.
- Zones
[]Get
Zones Zone - A list of zones. Each element contains the following attributes:
- Enable
Details bool - Keyword string
- Lang string
- Name
Regex string - Output
File string - Query
Region stringId - Query
Vpc stringId - Resource
Group stringId - The Id of resource group which the Private Zone belongs.
- Search
Mode string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of zone IDs.
- names List<String>
- A list of zone names.
- zones
List<Get
Zones Zone> - A list of zones. Each element contains the following attributes:
- enable
Details Boolean - keyword String
- lang String
- name
Regex String - output
File String - query
Region StringId - query
Vpc StringId - resource
Group StringId - The Id of resource group which the Private Zone belongs.
- search
Mode String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of zone IDs.
- names string[]
- A list of zone names.
- zones
Get
Zones Zone[] - A list of zones. Each element contains the following attributes:
- enable
Details boolean - keyword string
- lang string
- name
Regex string - output
File string - query
Region stringId - query
Vpc stringId - resource
Group stringId - The Id of resource group which the Private Zone belongs.
- search
Mode string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of zone IDs.
- names Sequence[str]
- A list of zone names.
- zones
Sequence[Get
Zones Zone] - A list of zones. Each element contains the following attributes:
- enable_
details bool - keyword str
- lang str
- name_
regex str - output_
file str - query_
region_ strid - query_
vpc_ strid - resource_
group_ strid - The Id of resource group which the Private Zone belongs.
- search_
mode str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of zone IDs.
- names List<String>
- A list of zone names.
- zones List<Property Map>
- A list of zones. Each element contains the following attributes:
- enable
Details Boolean - keyword String
- lang String
- name
Regex String - output
File String - query
Region StringId - query
Vpc StringId - resource
Group StringId - The Id of resource group which the Private Zone belongs.
- search
Mode String
Supporting Types
GetZonesZone
- Bind
Vpcs List<Pulumi.Ali Cloud. Pvtz. Inputs. Get Zones Zone Bind Vpc> - List of the VPCs is bound to the Private Zone:
- Create
Timestamp int - Time of create of the Private Zone.
- Creation
Time string - Id string
- ID of the Private Zone.
- Is
Ptr bool - Whether the Private Zone is ptr.
- Name string
- Name of the Private Zone.
- Proxy
Pattern string - The recursive DNS proxy.
- Record
Count int - Count of the Private Zone Record.
- Remark string
- Remark of the Private Zone.
- Resource
Group stringId - resource_group_id for zone resourceGroupId.
- Slave
Dns bool - Whether to turn on secondary DNS.
- Update
Time string - Update
Timestamp int - Time of update of the Private Zone.
- Zone
Id string - ZoneId of the Private Zone.
- Zone
Name string - ZoneName of the Private Zone.
- Bind
Vpcs []GetZones Zone Bind Vpc - List of the VPCs is bound to the Private Zone:
- Create
Timestamp int - Time of create of the Private Zone.
- Creation
Time string - Id string
- ID of the Private Zone.
- Is
Ptr bool - Whether the Private Zone is ptr.
- Name string
- Name of the Private Zone.
- Proxy
Pattern string - The recursive DNS proxy.
- Record
Count int - Count of the Private Zone Record.
- Remark string
- Remark of the Private Zone.
- Resource
Group stringId - resource_group_id for zone resourceGroupId.
- Slave
Dns bool - Whether to turn on secondary DNS.
- Update
Time string - Update
Timestamp int - Time of update of the Private Zone.
- Zone
Id string - ZoneId of the Private Zone.
- Zone
Name string - ZoneName of the Private Zone.
- bind
Vpcs List<GetZones Zone Bind Vpc> - List of the VPCs is bound to the Private Zone:
- create
Timestamp Integer - Time of create of the Private Zone.
- creation
Time String - id String
- ID of the Private Zone.
- is
Ptr Boolean - Whether the Private Zone is ptr.
- name String
- Name of the Private Zone.
- proxy
Pattern String - The recursive DNS proxy.
- record
Count Integer - Count of the Private Zone Record.
- remark String
- Remark of the Private Zone.
- resource
Group StringId - resource_group_id for zone resourceGroupId.
- slave
Dns Boolean - Whether to turn on secondary DNS.
- update
Time String - update
Timestamp Integer - Time of update of the Private Zone.
- zone
Id String - ZoneId of the Private Zone.
- zone
Name String - ZoneName of the Private Zone.
- bind
Vpcs GetZones Zone Bind Vpc[] - List of the VPCs is bound to the Private Zone:
- create
Timestamp number - Time of create of the Private Zone.
- creation
Time string - id string
- ID of the Private Zone.
- is
Ptr boolean - Whether the Private Zone is ptr.
- name string
- Name of the Private Zone.
- proxy
Pattern string - The recursive DNS proxy.
- record
Count number - Count of the Private Zone Record.
- remark string
- Remark of the Private Zone.
- resource
Group stringId - resource_group_id for zone resourceGroupId.
- slave
Dns boolean - Whether to turn on secondary DNS.
- update
Time string - update
Timestamp number - Time of update of the Private Zone.
- zone
Id string - ZoneId of the Private Zone.
- zone
Name string - ZoneName of the Private Zone.
- bind_
vpcs Sequence[GetZones Zone Bind Vpc] - List of the VPCs is bound to the Private Zone:
- create_
timestamp int - Time of create of the Private Zone.
- creation_
time str - id str
- ID of the Private Zone.
- is_
ptr bool - Whether the Private Zone is ptr.
- name str
- Name of the Private Zone.
- proxy_
pattern str - The recursive DNS proxy.
- record_
count int - Count of the Private Zone Record.
- remark str
- Remark of the Private Zone.
- resource_
group_ strid - resource_group_id for zone resourceGroupId.
- slave_
dns bool - Whether to turn on secondary DNS.
- update_
time str - update_
timestamp int - Time of update of the Private Zone.
- zone_
id str - ZoneId of the Private Zone.
- zone_
name str - ZoneName of the Private Zone.
- bind
Vpcs List<Property Map> - List of the VPCs is bound to the Private Zone:
- create
Timestamp Number - Time of create of the Private Zone.
- creation
Time String - id String
- ID of the Private Zone.
- is
Ptr Boolean - Whether the Private Zone is ptr.
- name String
- Name of the Private Zone.
- proxy
Pattern String - The recursive DNS proxy.
- record
Count Number - Count of the Private Zone Record.
- remark String
- Remark of the Private Zone.
- resource
Group StringId - resource_group_id for zone resourceGroupId.
- slave
Dns Boolean - Whether to turn on secondary DNS.
- update
Time String - update
Timestamp Number - Time of update of the Private Zone.
- zone
Id String - ZoneId of the Private Zone.
- zone
Name String - ZoneName of the Private Zone.
GetZonesZoneBindVpc
- Region
Id string - Binding the regionId of VPC.
- Region
Name string - Binding the regionName of VPC.
- Vpc
Id string - Binding the vpcId of VPC.
- Vpc
Name string
- Region
Id string - Binding the regionId of VPC.
- Region
Name string - Binding the regionName of VPC.
- Vpc
Id string - Binding the vpcId of VPC.
- Vpc
Name string
- region
Id String - Binding the regionId of VPC.
- region
Name String - Binding the regionName of VPC.
- vpc
Id String - Binding the vpcId of VPC.
- vpc
Name String
- region
Id string - Binding the regionId of VPC.
- region
Name string - Binding the regionName of VPC.
- vpc
Id string - Binding the vpcId of VPC.
- vpc
Name string
- region_
id str - Binding the regionId of VPC.
- region_
name str - Binding the regionName of VPC.
- vpc_
id str - Binding the vpcId of VPC.
- vpc_
name str
- region
Id String - Binding the regionId of VPC.
- region
Name String - Binding the regionName of VPC.
- vpc
Id String - Binding the vpcId of VPC.
- vpc
Name String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.