Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.pvtz.getZoneRecords
Explore with Pulumi AI
This data source provides Private Zone Records resource information owned by an Alibaba Cloud account.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const recordsDs = alicloud.pvtz.getZoneRecords({
    zoneId: basic.id,
    keyword: foo.value,
});
export const firstRecordId = recordsDs.then(recordsDs => recordsDs.records?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
records_ds = alicloud.pvtz.get_zone_records(zone_id=basic["id"],
    keyword=foo["value"])
pulumi.export("firstRecordId", records_ds.records[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 {
		recordsDs, err := pvtz.GetZoneRecords(ctx, &pvtz.GetZoneRecordsArgs{
			ZoneId:  basic.Id,
			Keyword: pulumi.StringRef(foo.Value),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstRecordId", recordsDs.Records[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var recordsDs = AliCloud.Pvtz.GetZoneRecords.Invoke(new()
    {
        ZoneId = basic.Id,
        Keyword = foo.Value,
    });
    return new Dictionary<string, object?>
    {
        ["firstRecordId"] = recordsDs.Apply(getZoneRecordsResult => getZoneRecordsResult.Records[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.GetZoneRecordsArgs;
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 recordsDs = PvtzFunctions.getZoneRecords(GetZoneRecordsArgs.builder()
            .zoneId(basic.id())
            .keyword(foo.value())
            .build());
        ctx.export("firstRecordId", recordsDs.applyValue(getZoneRecordsResult -> getZoneRecordsResult.records()[0].id()));
    }
}
variables:
  recordsDs:
    fn::invoke:
      function: alicloud:pvtz:getZoneRecords
      arguments:
        zoneId: ${basic.id}
        keyword: ${foo.value}
outputs:
  firstRecordId: ${recordsDs.records[0].id}
Using getZoneRecords
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 getZoneRecords(args: GetZoneRecordsArgs, opts?: InvokeOptions): Promise<GetZoneRecordsResult>
function getZoneRecordsOutput(args: GetZoneRecordsOutputArgs, opts?: InvokeOptions): Output<GetZoneRecordsResult>def get_zone_records(ids: Optional[Sequence[str]] = None,
                     keyword: Optional[str] = None,
                     lang: Optional[str] = None,
                     output_file: Optional[str] = None,
                     search_mode: Optional[str] = None,
                     status: Optional[str] = None,
                     tag: Optional[str] = None,
                     user_client_ip: Optional[str] = None,
                     zone_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetZoneRecordsResult
def get_zone_records_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     keyword: Optional[pulumi.Input[str]] = None,
                     lang: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     search_mode: Optional[pulumi.Input[str]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     tag: Optional[pulumi.Input[str]] = None,
                     user_client_ip: Optional[pulumi.Input[str]] = None,
                     zone_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetZoneRecordsResult]func GetZoneRecords(ctx *Context, args *GetZoneRecordsArgs, opts ...InvokeOption) (*GetZoneRecordsResult, error)
func GetZoneRecordsOutput(ctx *Context, args *GetZoneRecordsOutputArgs, opts ...InvokeOption) GetZoneRecordsResultOutput> Note: This function is named GetZoneRecords in the Go SDK.
public static class GetZoneRecords 
{
    public static Task<GetZoneRecordsResult> InvokeAsync(GetZoneRecordsArgs args, InvokeOptions? opts = null)
    public static Output<GetZoneRecordsResult> Invoke(GetZoneRecordsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetZoneRecordsResult> getZoneRecords(GetZoneRecordsArgs args, InvokeOptions options)
public static Output<GetZoneRecordsResult> getZoneRecords(GetZoneRecordsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:pvtz/getZoneRecords:getZoneRecords
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ZoneId string
- ID of the Private Zone.
- Ids List<string>
- A list of Private Zone Record IDs.
- Keyword string
- Keyword for record rr and value.
- Lang string
- User language.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- SearchMode string
- Search mode. Value:- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
 
- Status string
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- Tag string
- It is not filled in by default, and queries the current zone resolution records. Fill in "ecs" to query the host name record list under the VPC associated with the current zone.
- UserClient stringIp 
- User ip.
- ZoneId string
- ID of the Private Zone.
- Ids []string
- A list of Private Zone Record IDs.
- Keyword string
- Keyword for record rr and value.
- Lang string
- User language.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- SearchMode string
- Search mode. Value:- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
 
- Status string
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- Tag string
- It is not filled in by default, and queries the current zone resolution records. Fill in "ecs" to query the host name record list under the VPC associated with the current zone.
- UserClient stringIp 
- User ip.
- zoneId String
- ID of the Private Zone.
- ids List<String>
- A list of Private Zone Record IDs.
- keyword String
- Keyword for record rr and value.
- lang String
- User language.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- searchMode String
- Search mode. Value:- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
 
- status String
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- tag String
- It is not filled in by default, and queries the current zone resolution records. Fill in "ecs" to query the host name record list under the VPC associated with the current zone.
- userClient StringIp 
- User ip.
- zoneId string
- ID of the Private Zone.
- ids string[]
- A list of Private Zone Record IDs.
- keyword string
- Keyword for record rr and value.
- lang string
- User language.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- searchMode string
- Search mode. Value:- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
 
- status string
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- tag string
- It is not filled in by default, and queries the current zone resolution records. Fill in "ecs" to query the host name record list under the VPC associated with the current zone.
- userClient stringIp 
- User ip.
- zone_id str
- ID of the Private Zone.
- ids Sequence[str]
- A list of Private Zone Record IDs.
- keyword str
- Keyword for record rr and value.
- lang str
- User language.
- output_file str
- File name where to save data source results (after running pulumi preview).
- search_mode str
- Search mode. Value:- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
 
- status str
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- tag str
- It is not filled in by default, and queries the current zone resolution records. Fill in "ecs" to query the host name record list under the VPC associated with the current zone.
- user_client_ strip 
- User ip.
- zoneId String
- ID of the Private Zone.
- ids List<String>
- A list of Private Zone Record IDs.
- keyword String
- Keyword for record rr and value.
- lang String
- User language.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- searchMode String
- Search mode. Value:- LIKE: fuzzy search.
- EXACT: precise search. It is not filled in by default.
 
- status String
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- tag String
- It is not filled in by default, and queries the current zone resolution records. Fill in "ecs" to query the host name record list under the VPC associated with the current zone.
- userClient StringIp 
- User ip.
getZoneRecords Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Private Zone Record IDs.
- Records
List<Pulumi.Ali Cloud. Pvtz. Outputs. Get Zone Records Record> 
- A list of zone records. Each element contains the following attributes:
- ZoneId string
- Keyword string
- Lang string
- OutputFile string
- SearchMode string
- Status string
- Status of the Private Zone Record.
- Tag string
- UserClient stringIp 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Private Zone Record IDs.
- Records
[]GetZone Records Record 
- A list of zone records. Each element contains the following attributes:
- ZoneId string
- Keyword string
- Lang string
- OutputFile string
- SearchMode string
- Status string
- Status of the Private Zone Record.
- Tag string
- UserClient stringIp 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Private Zone Record IDs.
- records
List<GetZone Records Record> 
- A list of zone records. Each element contains the following attributes:
- zoneId String
- keyword String
- lang String
- outputFile String
- searchMode String
- status String
- Status of the Private Zone Record.
- tag String
- userClient StringIp 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Private Zone Record IDs.
- records
GetZone Records Record[] 
- A list of zone records. Each element contains the following attributes:
- zoneId string
- keyword string
- lang string
- outputFile string
- searchMode string
- status string
- Status of the Private Zone Record.
- tag string
- userClient stringIp 
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Private Zone Record IDs.
- records
Sequence[GetZone Records Record] 
- A list of zone records. Each element contains the following attributes:
- zone_id str
- keyword str
- lang str
- output_file str
- search_mode str
- status str
- Status of the Private Zone Record.
- tag str
- user_client_ strip 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Private Zone Record IDs.
- records List<Property Map>
- A list of zone records. Each element contains the following attributes:
- zoneId String
- keyword String
- lang String
- outputFile String
- searchMode String
- status String
- Status of the Private Zone Record.
- tag String
- userClient StringIp 
Supporting Types
GetZoneRecordsRecord   
- Id string
- ID of the Private Zone Record.
- Priority int
- Priority of the Private Zone Record.
- RecordId string
- RecordId of the Private Zone Record.
- Remark string
- Remark of the Private Zone Record.
- ResourceRecord string
- Resource record of the Private Zone Record.
- Rr string
- Rr of the Private Zone Record.
- Status string
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- Ttl int
- Ttl of the Private Zone Record.
- Type string
- Type of the Private Zone Record.
- Value string
- Value of the Private Zone Record.
- Id string
- ID of the Private Zone Record.
- Priority int
- Priority of the Private Zone Record.
- RecordId string
- RecordId of the Private Zone Record.
- Remark string
- Remark of the Private Zone Record.
- ResourceRecord string
- Resource record of the Private Zone Record.
- Rr string
- Rr of the Private Zone Record.
- Status string
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- Ttl int
- Ttl of the Private Zone Record.
- Type string
- Type of the Private Zone Record.
- Value string
- Value of the Private Zone Record.
- id String
- ID of the Private Zone Record.
- priority Integer
- Priority of the Private Zone Record.
- recordId String
- RecordId of the Private Zone Record.
- remark String
- Remark of the Private Zone Record.
- resourceRecord String
- Resource record of the Private Zone Record.
- rr String
- Rr of the Private Zone Record.
- status String
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- ttl Integer
- Ttl of the Private Zone Record.
- type String
- Type of the Private Zone Record.
- value String
- Value of the Private Zone Record.
- id string
- ID of the Private Zone Record.
- priority number
- Priority of the Private Zone Record.
- recordId string
- RecordId of the Private Zone Record.
- remark string
- Remark of the Private Zone Record.
- resourceRecord string
- Resource record of the Private Zone Record.
- rr string
- Rr of the Private Zone Record.
- status string
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- ttl number
- Ttl of the Private Zone Record.
- type string
- Type of the Private Zone Record.
- value string
- Value of the Private Zone Record.
- id str
- ID of the Private Zone Record.
- priority int
- Priority of the Private Zone Record.
- record_id str
- RecordId of the Private Zone Record.
- remark str
- Remark of the Private Zone Record.
- resource_record str
- Resource record of the Private Zone Record.
- rr str
- Rr of the Private Zone Record.
- status str
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- ttl int
- Ttl of the Private Zone Record.
- type str
- Type of the Private Zone Record.
- value str
- Value of the Private Zone Record.
- id String
- ID of the Private Zone Record.
- priority Number
- Priority of the Private Zone Record.
- recordId String
- RecordId of the Private Zone Record.
- remark String
- Remark of the Private Zone Record.
- resourceRecord String
- Resource record of the Private Zone Record.
- rr String
- Rr of the Private Zone Record.
- status String
- Resolve record status. Value:- ENABLE: enable resolution.
- DISABLE: pause parsing.
 
- ttl Number
- Ttl of the Private Zone Record.
- type String
- Type of the Private Zone Record.
- value String
- Value of the Private Zone Record.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.