UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

110 lines 3.47 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.getSpacesBucketsOutput = exports.getSpacesBuckets = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Get information on Spaces buckets for use in other resources, with the ability to filter and sort the results. * If no filters are specified, all Spaces buckets will be returned. * * Note: You can use the `digitalocean.SpacesBucket` data source to * obtain metadata about a single bucket if you already know its `name` and `region`. * * ## Example Usage * * Use the `filter` block with a `key` string and `values` list to filter buckets. * * Get all buckets in a region: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const nyc3 = digitalocean.getSpacesBuckets({ * filters: [{ * key: "region", * values: ["nyc3"], * }], * }); * ``` * You can sort the results as well: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const nyc3 = digitalocean.getSpacesBuckets({ * filters: [{ * key: "region", * values: ["nyc3"], * }], * sorts: [{ * key: "name", * direction: "desc", * }], * }); * ``` */ function getSpacesBuckets(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("digitalocean:index/getSpacesBuckets:getSpacesBuckets", { "filters": args.filters, "sorts": args.sorts, }, opts); } exports.getSpacesBuckets = getSpacesBuckets; /** * Get information on Spaces buckets for use in other resources, with the ability to filter and sort the results. * If no filters are specified, all Spaces buckets will be returned. * * Note: You can use the `digitalocean.SpacesBucket` data source to * obtain metadata about a single bucket if you already know its `name` and `region`. * * ## Example Usage * * Use the `filter` block with a `key` string and `values` list to filter buckets. * * Get all buckets in a region: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const nyc3 = digitalocean.getSpacesBuckets({ * filters: [{ * key: "region", * values: ["nyc3"], * }], * }); * ``` * You can sort the results as well: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const nyc3 = digitalocean.getSpacesBuckets({ * filters: [{ * key: "region", * values: ["nyc3"], * }], * sorts: [{ * key: "name", * direction: "desc", * }], * }); * ``` */ function getSpacesBucketsOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("digitalocean:index/getSpacesBuckets:getSpacesBuckets", { "filters": args.filters, "sorts": args.sorts, }, opts); } exports.getSpacesBucketsOutput = getSpacesBucketsOutput; //# sourceMappingURL=getSpacesBuckets.js.map