UNPKG

@pulumi/aws

Version:

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

101 lines 4.45 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.DevicePool = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage AWS Device Farm Device Pools. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.devicefarm.DevicePool("example", { * name: "example", * projectArn: exampleAwsDevicefarmProject.arn, * rules: [{ * attribute: "OS_VERSION", * operator: "EQUALS", * value: "\"AVAILABLE\"", * }], * }); * ``` * * ## Import * * Using `pulumi import`, import DeviceFarm Device Pools using their ARN. For example: * * ```sh * $ pulumi import aws:devicefarm/devicePool:DevicePool example arn:aws:devicefarm:us-west-2:123456789012:devicepool:4fa784c7-ccb4-4dbf-ba4f-02198320daa1/4fa784c7-ccb4-4dbf-ba4f-02198320daa1 * ``` */ class DevicePool extends pulumi.CustomResource { /** * Get an existing DevicePool resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new DevicePool(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DevicePool. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === DevicePool.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["maxDevices"] = state ? state.maxDevices : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["projectArn"] = state ? state.projectArn : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["rules"] = state ? state.rules : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["type"] = state ? state.type : undefined; } else { const args = argsOrState; if ((!args || args.projectArn === undefined) && !opts.urn) { throw new Error("Missing required property 'projectArn'"); } if ((!args || args.rules === undefined) && !opts.urn) { throw new Error("Missing required property 'rules'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["maxDevices"] = args ? args.maxDevices : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectArn"] = args ? args.projectArn : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["rules"] = args ? args.rules : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DevicePool.__pulumiType, name, resourceInputs, opts); } } exports.DevicePool = DevicePool; /** @internal */ DevicePool.__pulumiType = 'aws:devicefarm/devicePool:DevicePool'; //# sourceMappingURL=devicePool.js.map