UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

86 lines 2.73 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getVpcSubnetsOutput = exports.getVpcSubnets = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides information about a list of Linode VPC subnets that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-vpc-subnets). * * ## Example Usage * * The following example shows how one might use this data source to list VPC subnets. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const filtered_subnets = linode.getVpcSubnets({ * vpcId: 123, * filters: [{ * name: "label", * values: ["test"], * }], * }); * export const vpcSubnets = filtered_subnets.then(filtered_subnets => filtered_subnets.vpcSubnets); * ``` * * ## Filterable Fields * * * `id` * * * `label` * * * `ipv4` */ function getVpcSubnets(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("linode:index/getVpcSubnets:getVpcSubnets", { "filters": args.filters, "vpcId": args.vpcId, "vpcSubnets": args.vpcSubnets, }, opts); } exports.getVpcSubnets = getVpcSubnets; /** * Provides information about a list of Linode VPC subnets that match a set of filters. * For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-vpc-subnets). * * ## Example Usage * * The following example shows how one might use this data source to list VPC subnets. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const filtered_subnets = linode.getVpcSubnets({ * vpcId: 123, * filters: [{ * name: "label", * values: ["test"], * }], * }); * export const vpcSubnets = filtered_subnets.then(filtered_subnets => filtered_subnets.vpcSubnets); * ``` * * ## Filterable Fields * * * `id` * * * `label` * * * `ipv4` */ function getVpcSubnetsOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("linode:index/getVpcSubnets:getVpcSubnets", { "filters": args.filters, "vpcId": args.vpcId, "vpcSubnets": args.vpcSubnets, }, opts); } exports.getVpcSubnetsOutput = getVpcSubnetsOutput; //# sourceMappingURL=getVpcSubnets.js.map