1. Packages
  2. AWS
  3. API Docs
  4. devicefarm
  5. DevicePool
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.devicefarm.DevicePool

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides a resource to manage AWS Device Farm Device Pools.

    Example Usage

    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 pulumi
    import pulumi_aws as aws
    
    example = aws.devicefarm.DevicePool("example",
        name="example",
        project_arn=example_aws_devicefarm_project["arn"],
        rules=[{
            "attribute": "OS_VERSION",
            "operator": "EQUALS",
            "value": "\"AVAILABLE\"",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/devicefarm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := devicefarm.NewDevicePool(ctx, "example", &devicefarm.DevicePoolArgs{
    			Name:       pulumi.String("example"),
    			ProjectArn: pulumi.Any(exampleAwsDevicefarmProject.Arn),
    			Rules: devicefarm.DevicePoolRuleArray{
    				&devicefarm.DevicePoolRuleArgs{
    					Attribute: pulumi.String("OS_VERSION"),
    					Operator:  pulumi.String("EQUALS"),
    					Value:     pulumi.String("\"AVAILABLE\""),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.DeviceFarm.DevicePool("example", new()
        {
            Name = "example",
            ProjectArn = exampleAwsDevicefarmProject.Arn,
            Rules = new[]
            {
                new Aws.DeviceFarm.Inputs.DevicePoolRuleArgs
                {
                    Attribute = "OS_VERSION",
                    Operator = "EQUALS",
                    Value = "\"AVAILABLE\"",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.devicefarm.DevicePool;
    import com.pulumi.aws.devicefarm.DevicePoolArgs;
    import com.pulumi.aws.devicefarm.inputs.DevicePoolRuleArgs;
    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) {
            var example = new DevicePool("example", DevicePoolArgs.builder()
                .name("example")
                .projectArn(exampleAwsDevicefarmProject.arn())
                .rules(DevicePoolRuleArgs.builder()
                    .attribute("OS_VERSION")
                    .operator("EQUALS")
                    .value("\"AVAILABLE\"")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:devicefarm:DevicePool
        properties:
          name: example
          projectArn: ${exampleAwsDevicefarmProject.arn}
          rules:
            - attribute: OS_VERSION
              operator: EQUALS
              value: '"AVAILABLE"'
    

    Create DevicePool Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DevicePool(name: string, args: DevicePoolArgs, opts?: CustomResourceOptions);
    @overload
    def DevicePool(resource_name: str,
                   args: DevicePoolArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def DevicePool(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   project_arn: Optional[str] = None,
                   rules: Optional[Sequence[DevicePoolRuleArgs]] = None,
                   description: Optional[str] = None,
                   max_devices: Optional[int] = None,
                   name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None)
    func NewDevicePool(ctx *Context, name string, args DevicePoolArgs, opts ...ResourceOption) (*DevicePool, error)
    public DevicePool(string name, DevicePoolArgs args, CustomResourceOptions? opts = null)
    public DevicePool(String name, DevicePoolArgs args)
    public DevicePool(String name, DevicePoolArgs args, CustomResourceOptions options)
    
    type: aws:devicefarm:DevicePool
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DevicePoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DevicePoolArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DevicePoolArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DevicePoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DevicePoolArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var devicePoolResource = new Aws.DeviceFarm.DevicePool("devicePoolResource", new()
    {
        ProjectArn = "string",
        Rules = new[]
        {
            new Aws.DeviceFarm.Inputs.DevicePoolRuleArgs
            {
                Attribute = "string",
                Operator = "string",
                Value = "string",
            },
        },
        Description = "string",
        MaxDevices = 0,
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := devicefarm.NewDevicePool(ctx, "devicePoolResource", &devicefarm.DevicePoolArgs{
    	ProjectArn: pulumi.String("string"),
    	Rules: devicefarm.DevicePoolRuleArray{
    		&devicefarm.DevicePoolRuleArgs{
    			Attribute: pulumi.String("string"),
    			Operator:  pulumi.String("string"),
    			Value:     pulumi.String("string"),
    		},
    	},
    	Description: pulumi.String("string"),
    	MaxDevices:  pulumi.Int(0),
    	Name:        pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var devicePoolResource = new DevicePool("devicePoolResource", DevicePoolArgs.builder()
        .projectArn("string")
        .rules(DevicePoolRuleArgs.builder()
            .attribute("string")
            .operator("string")
            .value("string")
            .build())
        .description("string")
        .maxDevices(0)
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    device_pool_resource = aws.devicefarm.DevicePool("devicePoolResource",
        project_arn="string",
        rules=[{
            "attribute": "string",
            "operator": "string",
            "value": "string",
        }],
        description="string",
        max_devices=0,
        name="string",
        tags={
            "string": "string",
        })
    
    const devicePoolResource = new aws.devicefarm.DevicePool("devicePoolResource", {
        projectArn: "string",
        rules: [{
            attribute: "string",
            operator: "string",
            value: "string",
        }],
        description: "string",
        maxDevices: 0,
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:devicefarm:DevicePool
    properties:
        description: string
        maxDevices: 0
        name: string
        projectArn: string
        rules:
            - attribute: string
              operator: string
              value: string
        tags:
            string: string
    

    DevicePool Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DevicePool resource accepts the following input properties:

    ProjectArn string
    The ARN of the project for the device pool.
    Rules List<DevicePoolRule>
    The device pool's rules. See Rule.
    Description string
    The device pool's description.
    MaxDevices int
    The number of devices that Device Farm can add to your device pool.
    Name string
    The name of the Device Pool
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ProjectArn string
    The ARN of the project for the device pool.
    Rules []DevicePoolRuleArgs
    The device pool's rules. See Rule.
    Description string
    The device pool's description.
    MaxDevices int
    The number of devices that Device Farm can add to your device pool.
    Name string
    The name of the Device Pool
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    projectArn String
    The ARN of the project for the device pool.
    rules List<DevicePoolRule>
    The device pool's rules. See Rule.
    description String
    The device pool's description.
    maxDevices Integer
    The number of devices that Device Farm can add to your device pool.
    name String
    The name of the Device Pool
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    projectArn string
    The ARN of the project for the device pool.
    rules DevicePoolRule[]
    The device pool's rules. See Rule.
    description string
    The device pool's description.
    maxDevices number
    The number of devices that Device Farm can add to your device pool.
    name string
    The name of the Device Pool
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    project_arn str
    The ARN of the project for the device pool.
    rules Sequence[DevicePoolRuleArgs]
    The device pool's rules. See Rule.
    description str
    The device pool's description.
    max_devices int
    The number of devices that Device Farm can add to your device pool.
    name str
    The name of the Device Pool
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    projectArn String
    The ARN of the project for the device pool.
    rules List<Property Map>
    The device pool's rules. See Rule.
    description String
    The device pool's description.
    maxDevices Number
    The number of devices that Device Farm can add to your device pool.
    name String
    The name of the Device Pool
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DevicePool resource produces the following output properties:

    Arn string
    The Amazon Resource Name of this Device Pool
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    Arn string
    The Amazon Resource Name of this Device Pool
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    arn String
    The Amazon Resource Name of this Device Pool
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    arn string
    The Amazon Resource Name of this Device Pool
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type string
    arn str
    The Amazon Resource Name of this Device Pool
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type str
    arn String
    The Amazon Resource Name of this Device Pool
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String

    Look up Existing DevicePool Resource

    Get an existing DevicePool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DevicePoolState, opts?: CustomResourceOptions): DevicePool
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            description: Optional[str] = None,
            max_devices: Optional[int] = None,
            name: Optional[str] = None,
            project_arn: Optional[str] = None,
            rules: Optional[Sequence[DevicePoolRuleArgs]] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            type: Optional[str] = None) -> DevicePool
    func GetDevicePool(ctx *Context, name string, id IDInput, state *DevicePoolState, opts ...ResourceOption) (*DevicePool, error)
    public static DevicePool Get(string name, Input<string> id, DevicePoolState? state, CustomResourceOptions? opts = null)
    public static DevicePool get(String name, Output<String> id, DevicePoolState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    The Amazon Resource Name of this Device Pool
    Description string
    The device pool's description.
    MaxDevices int
    The number of devices that Device Farm can add to your device pool.
    Name string
    The name of the Device Pool
    ProjectArn string
    The ARN of the project for the device pool.
    Rules List<DevicePoolRule>
    The device pool's rules. See Rule.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    Arn string
    The Amazon Resource Name of this Device Pool
    Description string
    The device pool's description.
    MaxDevices int
    The number of devices that Device Farm can add to your device pool.
    Name string
    The name of the Device Pool
    ProjectArn string
    The ARN of the project for the device pool.
    Rules []DevicePoolRuleArgs
    The device pool's rules. See Rule.
    Tags map[string]string
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Type string
    arn String
    The Amazon Resource Name of this Device Pool
    description String
    The device pool's description.
    maxDevices Integer
    The number of devices that Device Farm can add to your device pool.
    name String
    The name of the Device Pool
    projectArn String
    The ARN of the project for the device pool.
    rules List<DevicePoolRule>
    The device pool's rules. See Rule.
    tags Map<String,String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String
    arn string
    The Amazon Resource Name of this Device Pool
    description string
    The device pool's description.
    maxDevices number
    The number of devices that Device Farm can add to your device pool.
    name string
    The name of the Device Pool
    projectArn string
    The ARN of the project for the device pool.
    rules DevicePoolRule[]
    The device pool's rules. See Rule.
    tags {[key: string]: string}
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type string
    arn str
    The Amazon Resource Name of this Device Pool
    description str
    The device pool's description.
    max_devices int
    The number of devices that Device Farm can add to your device pool.
    name str
    The name of the Device Pool
    project_arn str
    The ARN of the project for the device pool.
    rules Sequence[DevicePoolRuleArgs]
    The device pool's rules. See Rule.
    tags Mapping[str, str]
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type str
    arn String
    The Amazon Resource Name of this Device Pool
    description String
    The device pool's description.
    maxDevices Number
    The number of devices that Device Farm can add to your device pool.
    name String
    The name of the Device Pool
    projectArn String
    The ARN of the project for the device pool.
    rules List<Property Map>
    The device pool's rules. See Rule.
    tags Map<String>
    A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    type String

    Supporting Types

    DevicePoolRule, DevicePoolRuleArgs

    Attribute string
    The rule's stringified attribute. Valid values are: APPIUM_VERSION, ARN, AVAILABILITY, FLEET_TYPE, FORM_FACTOR, INSTANCE_ARN, INSTANCE_LABELS, MANUFACTURER, MODEL, OS_VERSION, PLATFORM, REMOTE_ACCESS_ENABLED, REMOTE_DEBUG_ENABLED.
    Operator string
    Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by each attribute. Valid values are: EQUALS, NOT_IN, IN, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, CONTAINS.
    Value string
    The rule's value.
    Attribute string
    The rule's stringified attribute. Valid values are: APPIUM_VERSION, ARN, AVAILABILITY, FLEET_TYPE, FORM_FACTOR, INSTANCE_ARN, INSTANCE_LABELS, MANUFACTURER, MODEL, OS_VERSION, PLATFORM, REMOTE_ACCESS_ENABLED, REMOTE_DEBUG_ENABLED.
    Operator string
    Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by each attribute. Valid values are: EQUALS, NOT_IN, IN, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, CONTAINS.
    Value string
    The rule's value.
    attribute String
    The rule's stringified attribute. Valid values are: APPIUM_VERSION, ARN, AVAILABILITY, FLEET_TYPE, FORM_FACTOR, INSTANCE_ARN, INSTANCE_LABELS, MANUFACTURER, MODEL, OS_VERSION, PLATFORM, REMOTE_ACCESS_ENABLED, REMOTE_DEBUG_ENABLED.
    operator String
    Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by each attribute. Valid values are: EQUALS, NOT_IN, IN, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, CONTAINS.
    value String
    The rule's value.
    attribute string
    The rule's stringified attribute. Valid values are: APPIUM_VERSION, ARN, AVAILABILITY, FLEET_TYPE, FORM_FACTOR, INSTANCE_ARN, INSTANCE_LABELS, MANUFACTURER, MODEL, OS_VERSION, PLATFORM, REMOTE_ACCESS_ENABLED, REMOTE_DEBUG_ENABLED.
    operator string
    Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by each attribute. Valid values are: EQUALS, NOT_IN, IN, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, CONTAINS.
    value string
    The rule's value.
    attribute str
    The rule's stringified attribute. Valid values are: APPIUM_VERSION, ARN, AVAILABILITY, FLEET_TYPE, FORM_FACTOR, INSTANCE_ARN, INSTANCE_LABELS, MANUFACTURER, MODEL, OS_VERSION, PLATFORM, REMOTE_ACCESS_ENABLED, REMOTE_DEBUG_ENABLED.
    operator str
    Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by each attribute. Valid values are: EQUALS, NOT_IN, IN, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, CONTAINS.
    value str
    The rule's value.
    attribute String
    The rule's stringified attribute. Valid values are: APPIUM_VERSION, ARN, AVAILABILITY, FLEET_TYPE, FORM_FACTOR, INSTANCE_ARN, INSTANCE_LABELS, MANUFACTURER, MODEL, OS_VERSION, PLATFORM, REMOTE_ACCESS_ENABLED, REMOTE_DEBUG_ENABLED.
    operator String
    Specifies how Device Farm compares the rule's attribute to the value. For the operators that are supported by each attribute. Valid values are: EQUALS, NOT_IN, IN, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, CONTAINS.
    value String
    The rule's value.

    Import

    Using pulumi import, import DeviceFarm Device Pools using their ARN. For example:

    $ 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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi