Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:pvtz/getZoneRecords:getZoneRecords
arguments:
# arguments dictionary
The following arguments are supported:
- Zone
Id 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.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Search
Mode 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.
- User
Client stringIp - User ip.
- Zone
Id 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.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Search
Mode 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.
- User
Client stringIp - User ip.
- zone
Id 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.
- output
File String - File name where to save data source results (after running
pulumi preview
). - search
Mode 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.
- user
Client StringIp - User ip.
- zone
Id 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.
- output
File string - File name where to save data source results (after running
pulumi preview
). - search
Mode 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.
- user
Client 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.
- zone
Id 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.
- output
File String - File name where to save data source results (after running
pulumi preview
). - search
Mode 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.
- user
Client 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:
- Zone
Id string - Keyword string
- Lang string
- Output
File string - Search
Mode string - Status string
- Status of the Private Zone Record.
- Tag string
- User
Client stringIp
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Private Zone Record IDs.
- Records
[]Get
Zone Records Record - A list of zone records. Each element contains the following attributes:
- Zone
Id string - Keyword string
- Lang string
- Output
File string - Search
Mode string - Status string
- Status of the Private Zone Record.
- Tag string
- User
Client stringIp
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Private Zone Record IDs.
- records
List<Get
Zone Records Record> - A list of zone records. Each element contains the following attributes:
- zone
Id String - keyword String
- lang String
- output
File String - search
Mode String - status String
- Status of the Private Zone Record.
- tag String
- user
Client StringIp
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Private Zone Record IDs.
- records
Get
Zone Records Record[] - A list of zone records. Each element contains the following attributes:
- zone
Id string - keyword string
- lang string
- output
File string - search
Mode string - status string
- Status of the Private Zone Record.
- tag string
- user
Client stringIp
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Private Zone Record IDs.
- records
Sequence[Get
Zone 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:
- zone
Id String - keyword String
- lang String
- output
File String - search
Mode String - status String
- Status of the Private Zone Record.
- tag String
- user
Client StringIp
Supporting Types
GetZoneRecordsRecord
- Id string
- ID of the Private Zone Record.
- Priority int
- Priority of the Private Zone Record.
- Record
Id string - RecordId of the Private Zone Record.
- Remark string
- Remark of the Private Zone Record.
- Resource
Record 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.
- Record
Id string - RecordId of the Private Zone Record.
- Remark string
- Remark of the Private Zone Record.
- Resource
Record 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.
- record
Id String - RecordId of the Private Zone Record.
- remark String
- Remark of the Private Zone Record.
- resource
Record 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.
- record
Id string - RecordId of the Private Zone Record.
- remark string
- Remark of the Private Zone Record.
- resource
Record 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.
- record
Id String - RecordId of the Private Zone Record.
- remark String
- Remark of the Private Zone Record.
- resource
Record 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
alicloud
Terraform Provider.