UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

104 lines 2.92 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getRecordsOutput = exports.getRecords = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to get the details of resource records in a Route 53 hosted zone. * * ## Example Usage * * ### Basic Usage * * Return all records in the zone. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * name: "test.com.", * privateZone: true, * }); * const example = selected.then(selected => aws.route53.getRecords({ * zoneId: selected.zoneId, * })); * ``` * * ### Basic Usage with filter * * Return the records that starts with `www`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * name: "test.com.", * privateZone: true, * }); * const example = selected.then(selected => aws.route53.getRecords({ * zoneId: selected.zoneId, * nameRegex: "^www", * })); * ``` */ function getRecords(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:route53/getRecords:getRecords", { "nameRegex": args.nameRegex, "zoneId": args.zoneId, }, opts); } exports.getRecords = getRecords; /** * Use this data source to get the details of resource records in a Route 53 hosted zone. * * ## Example Usage * * ### Basic Usage * * Return all records in the zone. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * name: "test.com.", * privateZone: true, * }); * const example = selected.then(selected => aws.route53.getRecords({ * zoneId: selected.zoneId, * })); * ``` * * ### Basic Usage with filter * * Return the records that starts with `www`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const selected = aws.route53.getZone({ * name: "test.com.", * privateZone: true, * }); * const example = selected.then(selected => aws.route53.getRecords({ * zoneId: selected.zoneId, * nameRegex: "^www", * })); * ``` */ function getRecordsOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:route53/getRecords:getRecords", { "nameRegex": args.nameRegex, "zoneId": args.zoneId, }, opts); } exports.getRecordsOutput = getRecordsOutput; //# sourceMappingURL=getRecords.js.map