github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/devicefarm/testGridProject.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package devicefarm
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides a resource to manage AWS Device Farm Test Grid Projects.
    15  //
    16  // > **NOTE:** AWS currently has limited regional support for Device Farm (e.g., `us-west-2`). See [AWS Device Farm endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/devicefarm.html) for information on supported regions.
    17  //
    18  // ## Example Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/devicefarm"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  // func main() {
    31  // pulumi.Run(func(ctx *pulumi.Context) error {
    32  // _, err := devicefarm.NewTestGridProject(ctx, "example", &devicefarm.TestGridProjectArgs{
    33  // Name: pulumi.String("example"),
    34  // VpcConfig: &devicefarm.TestGridProjectVpcConfigArgs{
    35  // VpcId: pulumi.Any(exampleAwsVpc.Id),
    36  // SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:4,24-46),
    37  // SecurityGroupIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:5,24-53),
    38  // },
    39  // })
    40  // if err != nil {
    41  // return err
    42  // }
    43  // return nil
    44  // })
    45  // }
    46  // ```
    47  // <!--End PulumiCodeChooser -->
    48  //
    49  // ## Import
    50  //
    51  // Using `pulumi import`, import DeviceFarm Test Grid Projects using their ARN. For example:
    52  //
    53  // ```sh
    54  // $ pulumi import aws:devicefarm/testGridProject:TestGridProject example arn:aws:devicefarm:us-west-2:123456789012:testgrid-project:4fa784c7-ccb4-4dbf-ba4f-02198320daa1
    55  // ```
    56  type TestGridProject struct {
    57  	pulumi.CustomResourceState
    58  
    59  	// The Amazon Resource Name of this Test Grid Project.
    60  	Arn pulumi.StringOutput `pulumi:"arn"`
    61  	// Human-readable description of the project.
    62  	Description pulumi.StringPtrOutput `pulumi:"description"`
    63  	// The name of the Selenium testing project.
    64  	Name pulumi.StringOutput `pulumi:"name"`
    65  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    66  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    67  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    68  	//
    69  	// Deprecated: Please use `tags` instead.
    70  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    71  	// The VPC security groups and subnets that are attached to a project. See VPC Config below.
    72  	VpcConfig TestGridProjectVpcConfigPtrOutput `pulumi:"vpcConfig"`
    73  }
    74  
    75  // NewTestGridProject registers a new resource with the given unique name, arguments, and options.
    76  func NewTestGridProject(ctx *pulumi.Context,
    77  	name string, args *TestGridProjectArgs, opts ...pulumi.ResourceOption) (*TestGridProject, error) {
    78  	if args == nil {
    79  		args = &TestGridProjectArgs{}
    80  	}
    81  
    82  	opts = internal.PkgResourceDefaultOpts(opts)
    83  	var resource TestGridProject
    84  	err := ctx.RegisterResource("aws:devicefarm/testGridProject:TestGridProject", name, args, &resource, opts...)
    85  	if err != nil {
    86  		return nil, err
    87  	}
    88  	return &resource, nil
    89  }
    90  
    91  // GetTestGridProject gets an existing TestGridProject resource's state with the given name, ID, and optional
    92  // state properties that are used to uniquely qualify the lookup (nil if not required).
    93  func GetTestGridProject(ctx *pulumi.Context,
    94  	name string, id pulumi.IDInput, state *TestGridProjectState, opts ...pulumi.ResourceOption) (*TestGridProject, error) {
    95  	var resource TestGridProject
    96  	err := ctx.ReadResource("aws:devicefarm/testGridProject:TestGridProject", name, id, state, &resource, opts...)
    97  	if err != nil {
    98  		return nil, err
    99  	}
   100  	return &resource, nil
   101  }
   102  
   103  // Input properties used for looking up and filtering TestGridProject resources.
   104  type testGridProjectState struct {
   105  	// The Amazon Resource Name of this Test Grid Project.
   106  	Arn *string `pulumi:"arn"`
   107  	// Human-readable description of the project.
   108  	Description *string `pulumi:"description"`
   109  	// The name of the Selenium testing project.
   110  	Name *string `pulumi:"name"`
   111  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   112  	Tags map[string]string `pulumi:"tags"`
   113  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   114  	//
   115  	// Deprecated: Please use `tags` instead.
   116  	TagsAll map[string]string `pulumi:"tagsAll"`
   117  	// The VPC security groups and subnets that are attached to a project. See VPC Config below.
   118  	VpcConfig *TestGridProjectVpcConfig `pulumi:"vpcConfig"`
   119  }
   120  
   121  type TestGridProjectState struct {
   122  	// The Amazon Resource Name of this Test Grid Project.
   123  	Arn pulumi.StringPtrInput
   124  	// Human-readable description of the project.
   125  	Description pulumi.StringPtrInput
   126  	// The name of the Selenium testing project.
   127  	Name pulumi.StringPtrInput
   128  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   129  	Tags pulumi.StringMapInput
   130  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   131  	//
   132  	// Deprecated: Please use `tags` instead.
   133  	TagsAll pulumi.StringMapInput
   134  	// The VPC security groups and subnets that are attached to a project. See VPC Config below.
   135  	VpcConfig TestGridProjectVpcConfigPtrInput
   136  }
   137  
   138  func (TestGridProjectState) ElementType() reflect.Type {
   139  	return reflect.TypeOf((*testGridProjectState)(nil)).Elem()
   140  }
   141  
   142  type testGridProjectArgs struct {
   143  	// Human-readable description of the project.
   144  	Description *string `pulumi:"description"`
   145  	// The name of the Selenium testing project.
   146  	Name *string `pulumi:"name"`
   147  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   148  	Tags map[string]string `pulumi:"tags"`
   149  	// The VPC security groups and subnets that are attached to a project. See VPC Config below.
   150  	VpcConfig *TestGridProjectVpcConfig `pulumi:"vpcConfig"`
   151  }
   152  
   153  // The set of arguments for constructing a TestGridProject resource.
   154  type TestGridProjectArgs struct {
   155  	// Human-readable description of the project.
   156  	Description pulumi.StringPtrInput
   157  	// The name of the Selenium testing project.
   158  	Name pulumi.StringPtrInput
   159  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   160  	Tags pulumi.StringMapInput
   161  	// The VPC security groups and subnets that are attached to a project. See VPC Config below.
   162  	VpcConfig TestGridProjectVpcConfigPtrInput
   163  }
   164  
   165  func (TestGridProjectArgs) ElementType() reflect.Type {
   166  	return reflect.TypeOf((*testGridProjectArgs)(nil)).Elem()
   167  }
   168  
   169  type TestGridProjectInput interface {
   170  	pulumi.Input
   171  
   172  	ToTestGridProjectOutput() TestGridProjectOutput
   173  	ToTestGridProjectOutputWithContext(ctx context.Context) TestGridProjectOutput
   174  }
   175  
   176  func (*TestGridProject) ElementType() reflect.Type {
   177  	return reflect.TypeOf((**TestGridProject)(nil)).Elem()
   178  }
   179  
   180  func (i *TestGridProject) ToTestGridProjectOutput() TestGridProjectOutput {
   181  	return i.ToTestGridProjectOutputWithContext(context.Background())
   182  }
   183  
   184  func (i *TestGridProject) ToTestGridProjectOutputWithContext(ctx context.Context) TestGridProjectOutput {
   185  	return pulumi.ToOutputWithContext(ctx, i).(TestGridProjectOutput)
   186  }
   187  
   188  // TestGridProjectArrayInput is an input type that accepts TestGridProjectArray and TestGridProjectArrayOutput values.
   189  // You can construct a concrete instance of `TestGridProjectArrayInput` via:
   190  //
   191  //	TestGridProjectArray{ TestGridProjectArgs{...} }
   192  type TestGridProjectArrayInput interface {
   193  	pulumi.Input
   194  
   195  	ToTestGridProjectArrayOutput() TestGridProjectArrayOutput
   196  	ToTestGridProjectArrayOutputWithContext(context.Context) TestGridProjectArrayOutput
   197  }
   198  
   199  type TestGridProjectArray []TestGridProjectInput
   200  
   201  func (TestGridProjectArray) ElementType() reflect.Type {
   202  	return reflect.TypeOf((*[]*TestGridProject)(nil)).Elem()
   203  }
   204  
   205  func (i TestGridProjectArray) ToTestGridProjectArrayOutput() TestGridProjectArrayOutput {
   206  	return i.ToTestGridProjectArrayOutputWithContext(context.Background())
   207  }
   208  
   209  func (i TestGridProjectArray) ToTestGridProjectArrayOutputWithContext(ctx context.Context) TestGridProjectArrayOutput {
   210  	return pulumi.ToOutputWithContext(ctx, i).(TestGridProjectArrayOutput)
   211  }
   212  
   213  // TestGridProjectMapInput is an input type that accepts TestGridProjectMap and TestGridProjectMapOutput values.
   214  // You can construct a concrete instance of `TestGridProjectMapInput` via:
   215  //
   216  //	TestGridProjectMap{ "key": TestGridProjectArgs{...} }
   217  type TestGridProjectMapInput interface {
   218  	pulumi.Input
   219  
   220  	ToTestGridProjectMapOutput() TestGridProjectMapOutput
   221  	ToTestGridProjectMapOutputWithContext(context.Context) TestGridProjectMapOutput
   222  }
   223  
   224  type TestGridProjectMap map[string]TestGridProjectInput
   225  
   226  func (TestGridProjectMap) ElementType() reflect.Type {
   227  	return reflect.TypeOf((*map[string]*TestGridProject)(nil)).Elem()
   228  }
   229  
   230  func (i TestGridProjectMap) ToTestGridProjectMapOutput() TestGridProjectMapOutput {
   231  	return i.ToTestGridProjectMapOutputWithContext(context.Background())
   232  }
   233  
   234  func (i TestGridProjectMap) ToTestGridProjectMapOutputWithContext(ctx context.Context) TestGridProjectMapOutput {
   235  	return pulumi.ToOutputWithContext(ctx, i).(TestGridProjectMapOutput)
   236  }
   237  
   238  type TestGridProjectOutput struct{ *pulumi.OutputState }
   239  
   240  func (TestGridProjectOutput) ElementType() reflect.Type {
   241  	return reflect.TypeOf((**TestGridProject)(nil)).Elem()
   242  }
   243  
   244  func (o TestGridProjectOutput) ToTestGridProjectOutput() TestGridProjectOutput {
   245  	return o
   246  }
   247  
   248  func (o TestGridProjectOutput) ToTestGridProjectOutputWithContext(ctx context.Context) TestGridProjectOutput {
   249  	return o
   250  }
   251  
   252  // The Amazon Resource Name of this Test Grid Project.
   253  func (o TestGridProjectOutput) Arn() pulumi.StringOutput {
   254  	return o.ApplyT(func(v *TestGridProject) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   255  }
   256  
   257  // Human-readable description of the project.
   258  func (o TestGridProjectOutput) Description() pulumi.StringPtrOutput {
   259  	return o.ApplyT(func(v *TestGridProject) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   260  }
   261  
   262  // The name of the Selenium testing project.
   263  func (o TestGridProjectOutput) Name() pulumi.StringOutput {
   264  	return o.ApplyT(func(v *TestGridProject) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   265  }
   266  
   267  // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   268  func (o TestGridProjectOutput) Tags() pulumi.StringMapOutput {
   269  	return o.ApplyT(func(v *TestGridProject) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   270  }
   271  
   272  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   273  //
   274  // Deprecated: Please use `tags` instead.
   275  func (o TestGridProjectOutput) TagsAll() pulumi.StringMapOutput {
   276  	return o.ApplyT(func(v *TestGridProject) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   277  }
   278  
   279  // The VPC security groups and subnets that are attached to a project. See VPC Config below.
   280  func (o TestGridProjectOutput) VpcConfig() TestGridProjectVpcConfigPtrOutput {
   281  	return o.ApplyT(func(v *TestGridProject) TestGridProjectVpcConfigPtrOutput { return v.VpcConfig }).(TestGridProjectVpcConfigPtrOutput)
   282  }
   283  
   284  type TestGridProjectArrayOutput struct{ *pulumi.OutputState }
   285  
   286  func (TestGridProjectArrayOutput) ElementType() reflect.Type {
   287  	return reflect.TypeOf((*[]*TestGridProject)(nil)).Elem()
   288  }
   289  
   290  func (o TestGridProjectArrayOutput) ToTestGridProjectArrayOutput() TestGridProjectArrayOutput {
   291  	return o
   292  }
   293  
   294  func (o TestGridProjectArrayOutput) ToTestGridProjectArrayOutputWithContext(ctx context.Context) TestGridProjectArrayOutput {
   295  	return o
   296  }
   297  
   298  func (o TestGridProjectArrayOutput) Index(i pulumi.IntInput) TestGridProjectOutput {
   299  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *TestGridProject {
   300  		return vs[0].([]*TestGridProject)[vs[1].(int)]
   301  	}).(TestGridProjectOutput)
   302  }
   303  
   304  type TestGridProjectMapOutput struct{ *pulumi.OutputState }
   305  
   306  func (TestGridProjectMapOutput) ElementType() reflect.Type {
   307  	return reflect.TypeOf((*map[string]*TestGridProject)(nil)).Elem()
   308  }
   309  
   310  func (o TestGridProjectMapOutput) ToTestGridProjectMapOutput() TestGridProjectMapOutput {
   311  	return o
   312  }
   313  
   314  func (o TestGridProjectMapOutput) ToTestGridProjectMapOutputWithContext(ctx context.Context) TestGridProjectMapOutput {
   315  	return o
   316  }
   317  
   318  func (o TestGridProjectMapOutput) MapIndex(k pulumi.StringInput) TestGridProjectOutput {
   319  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *TestGridProject {
   320  		return vs[0].(map[string]*TestGridProject)[vs[1].(string)]
   321  	}).(TestGridProjectOutput)
   322  }
   323  
   324  func init() {
   325  	pulumi.RegisterInputType(reflect.TypeOf((*TestGridProjectInput)(nil)).Elem(), &TestGridProject{})
   326  	pulumi.RegisterInputType(reflect.TypeOf((*TestGridProjectArrayInput)(nil)).Elem(), TestGridProjectArray{})
   327  	pulumi.RegisterInputType(reflect.TypeOf((*TestGridProjectMapInput)(nil)).Elem(), TestGridProjectMap{})
   328  	pulumi.RegisterOutputType(TestGridProjectOutput{})
   329  	pulumi.RegisterOutputType(TestGridProjectArrayOutput{})
   330  	pulumi.RegisterOutputType(TestGridProjectMapOutput{})
   331  }