github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/evidently/project.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 evidently
     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 CloudWatch Evidently Project resource.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := evidently.NewProject(ctx, "example", &evidently.ProjectArgs{
    34  //				Name:        pulumi.String("Example"),
    35  //				Description: pulumi.String("Example Description"),
    36  //				Tags: pulumi.StringMap{
    37  //					"Key1": pulumi.String("example Project"),
    38  //				},
    39  //			})
    40  //			if err != nil {
    41  //				return err
    42  //			}
    43  //			return nil
    44  //		})
    45  //	}
    46  //
    47  // ```
    48  // <!--End PulumiCodeChooser -->
    49  //
    50  // ### Store evaluation events in a CloudWatch Log Group
    51  //
    52  // <!--Start PulumiCodeChooser -->
    53  // ```go
    54  // package main
    55  //
    56  // import (
    57  //
    58  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
    59  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    60  //
    61  // )
    62  //
    63  //	func main() {
    64  //		pulumi.Run(func(ctx *pulumi.Context) error {
    65  //			_, err := evidently.NewProject(ctx, "example", &evidently.ProjectArgs{
    66  //				Name:        pulumi.String("Example"),
    67  //				Description: pulumi.String("Example Description"),
    68  //				DataDelivery: &evidently.ProjectDataDeliveryArgs{
    69  //					CloudwatchLogs: &evidently.ProjectDataDeliveryCloudwatchLogsArgs{
    70  //						LogGroup: pulumi.String("example-log-group-name"),
    71  //					},
    72  //				},
    73  //				Tags: pulumi.StringMap{
    74  //					"Key1": pulumi.String("example Project"),
    75  //				},
    76  //			})
    77  //			if err != nil {
    78  //				return err
    79  //			}
    80  //			return nil
    81  //		})
    82  //	}
    83  //
    84  // ```
    85  // <!--End PulumiCodeChooser -->
    86  //
    87  // ### Store evaluation events in an S3 bucket
    88  //
    89  // <!--Start PulumiCodeChooser -->
    90  // ```go
    91  // package main
    92  //
    93  // import (
    94  //
    95  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/evidently"
    96  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    97  //
    98  // )
    99  //
   100  //	func main() {
   101  //		pulumi.Run(func(ctx *pulumi.Context) error {
   102  //			_, err := evidently.NewProject(ctx, "example", &evidently.ProjectArgs{
   103  //				Name:        pulumi.String("Example"),
   104  //				Description: pulumi.String("Example Description"),
   105  //				DataDelivery: &evidently.ProjectDataDeliveryArgs{
   106  //					S3Destination: &evidently.ProjectDataDeliveryS3DestinationArgs{
   107  //						Bucket: pulumi.String("example-bucket-name"),
   108  //						Prefix: pulumi.String("example"),
   109  //					},
   110  //				},
   111  //				Tags: pulumi.StringMap{
   112  //					"Key1": pulumi.String("example Project"),
   113  //				},
   114  //			})
   115  //			if err != nil {
   116  //				return err
   117  //			}
   118  //			return nil
   119  //		})
   120  //	}
   121  //
   122  // ```
   123  // <!--End PulumiCodeChooser -->
   124  //
   125  // ## Import
   126  //
   127  // Using `pulumi import`, import CloudWatch Evidently Project using the `arn`. For example:
   128  //
   129  // ```sh
   130  // $ pulumi import aws:evidently/project:Project example arn:aws:evidently:us-east-1:123456789012:segment/example
   131  // ```
   132  type Project struct {
   133  	pulumi.CustomResourceState
   134  
   135  	// The number of ongoing experiments currently in the project.
   136  	ActiveExperimentCount pulumi.IntOutput `pulumi:"activeExperimentCount"`
   137  	// The number of ongoing launches currently in the project.
   138  	ActiveLaunchCount pulumi.IntOutput `pulumi:"activeLaunchCount"`
   139  	// The ARN of the project.
   140  	Arn pulumi.StringOutput `pulumi:"arn"`
   141  	// The date and time that the project is created.
   142  	CreatedTime pulumi.StringOutput `pulumi:"createdTime"`
   143  	// A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
   144  	DataDelivery ProjectDataDeliveryPtrOutput `pulumi:"dataDelivery"`
   145  	// Specifies the description of the project.
   146  	Description pulumi.StringPtrOutput `pulumi:"description"`
   147  	// The number of experiments currently in the project. This includes all experiments that have been created and not deleted, whether they are ongoing or not.
   148  	ExperimentCount pulumi.IntOutput `pulumi:"experimentCount"`
   149  	// The number of features currently in the project.
   150  	FeatureCount pulumi.IntOutput `pulumi:"featureCount"`
   151  	// The date and time that the project was most recently updated.
   152  	LastUpdatedTime pulumi.StringOutput `pulumi:"lastUpdatedTime"`
   153  	// The number of launches currently in the project. This includes all launches that have been created and not deleted, whether they are ongoing or not.
   154  	LaunchCount pulumi.IntOutput `pulumi:"launchCount"`
   155  	// A name for the project.
   156  	Name pulumi.StringOutput `pulumi:"name"`
   157  	// The current state of the project. Valid values are `AVAILABLE` and `UPDATING`.
   158  	Status pulumi.StringOutput `pulumi:"status"`
   159  	// Tags to apply to the project. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   160  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   161  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   162  	//
   163  	// Deprecated: Please use `tags` instead.
   164  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   165  }
   166  
   167  // NewProject registers a new resource with the given unique name, arguments, and options.
   168  func NewProject(ctx *pulumi.Context,
   169  	name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error) {
   170  	if args == nil {
   171  		args = &ProjectArgs{}
   172  	}
   173  
   174  	opts = internal.PkgResourceDefaultOpts(opts)
   175  	var resource Project
   176  	err := ctx.RegisterResource("aws:evidently/project:Project", name, args, &resource, opts...)
   177  	if err != nil {
   178  		return nil, err
   179  	}
   180  	return &resource, nil
   181  }
   182  
   183  // GetProject gets an existing Project resource's state with the given name, ID, and optional
   184  // state properties that are used to uniquely qualify the lookup (nil if not required).
   185  func GetProject(ctx *pulumi.Context,
   186  	name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error) {
   187  	var resource Project
   188  	err := ctx.ReadResource("aws:evidently/project:Project", name, id, state, &resource, opts...)
   189  	if err != nil {
   190  		return nil, err
   191  	}
   192  	return &resource, nil
   193  }
   194  
   195  // Input properties used for looking up and filtering Project resources.
   196  type projectState struct {
   197  	// The number of ongoing experiments currently in the project.
   198  	ActiveExperimentCount *int `pulumi:"activeExperimentCount"`
   199  	// The number of ongoing launches currently in the project.
   200  	ActiveLaunchCount *int `pulumi:"activeLaunchCount"`
   201  	// The ARN of the project.
   202  	Arn *string `pulumi:"arn"`
   203  	// The date and time that the project is created.
   204  	CreatedTime *string `pulumi:"createdTime"`
   205  	// A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
   206  	DataDelivery *ProjectDataDelivery `pulumi:"dataDelivery"`
   207  	// Specifies the description of the project.
   208  	Description *string `pulumi:"description"`
   209  	// The number of experiments currently in the project. This includes all experiments that have been created and not deleted, whether they are ongoing or not.
   210  	ExperimentCount *int `pulumi:"experimentCount"`
   211  	// The number of features currently in the project.
   212  	FeatureCount *int `pulumi:"featureCount"`
   213  	// The date and time that the project was most recently updated.
   214  	LastUpdatedTime *string `pulumi:"lastUpdatedTime"`
   215  	// The number of launches currently in the project. This includes all launches that have been created and not deleted, whether they are ongoing or not.
   216  	LaunchCount *int `pulumi:"launchCount"`
   217  	// A name for the project.
   218  	Name *string `pulumi:"name"`
   219  	// The current state of the project. Valid values are `AVAILABLE` and `UPDATING`.
   220  	Status *string `pulumi:"status"`
   221  	// Tags to apply to the project. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   222  	Tags map[string]string `pulumi:"tags"`
   223  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   224  	//
   225  	// Deprecated: Please use `tags` instead.
   226  	TagsAll map[string]string `pulumi:"tagsAll"`
   227  }
   228  
   229  type ProjectState struct {
   230  	// The number of ongoing experiments currently in the project.
   231  	ActiveExperimentCount pulumi.IntPtrInput
   232  	// The number of ongoing launches currently in the project.
   233  	ActiveLaunchCount pulumi.IntPtrInput
   234  	// The ARN of the project.
   235  	Arn pulumi.StringPtrInput
   236  	// The date and time that the project is created.
   237  	CreatedTime pulumi.StringPtrInput
   238  	// A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
   239  	DataDelivery ProjectDataDeliveryPtrInput
   240  	// Specifies the description of the project.
   241  	Description pulumi.StringPtrInput
   242  	// The number of experiments currently in the project. This includes all experiments that have been created and not deleted, whether they are ongoing or not.
   243  	ExperimentCount pulumi.IntPtrInput
   244  	// The number of features currently in the project.
   245  	FeatureCount pulumi.IntPtrInput
   246  	// The date and time that the project was most recently updated.
   247  	LastUpdatedTime pulumi.StringPtrInput
   248  	// The number of launches currently in the project. This includes all launches that have been created and not deleted, whether they are ongoing or not.
   249  	LaunchCount pulumi.IntPtrInput
   250  	// A name for the project.
   251  	Name pulumi.StringPtrInput
   252  	// The current state of the project. Valid values are `AVAILABLE` and `UPDATING`.
   253  	Status pulumi.StringPtrInput
   254  	// Tags to apply to the project. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   255  	Tags pulumi.StringMapInput
   256  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   257  	//
   258  	// Deprecated: Please use `tags` instead.
   259  	TagsAll pulumi.StringMapInput
   260  }
   261  
   262  func (ProjectState) ElementType() reflect.Type {
   263  	return reflect.TypeOf((*projectState)(nil)).Elem()
   264  }
   265  
   266  type projectArgs struct {
   267  	// A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
   268  	DataDelivery *ProjectDataDelivery `pulumi:"dataDelivery"`
   269  	// Specifies the description of the project.
   270  	Description *string `pulumi:"description"`
   271  	// A name for the project.
   272  	Name *string `pulumi:"name"`
   273  	// Tags to apply to the project. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   274  	Tags map[string]string `pulumi:"tags"`
   275  }
   276  
   277  // The set of arguments for constructing a Project resource.
   278  type ProjectArgs struct {
   279  	// A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
   280  	DataDelivery ProjectDataDeliveryPtrInput
   281  	// Specifies the description of the project.
   282  	Description pulumi.StringPtrInput
   283  	// A name for the project.
   284  	Name pulumi.StringPtrInput
   285  	// Tags to apply to the project. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   286  	Tags pulumi.StringMapInput
   287  }
   288  
   289  func (ProjectArgs) ElementType() reflect.Type {
   290  	return reflect.TypeOf((*projectArgs)(nil)).Elem()
   291  }
   292  
   293  type ProjectInput interface {
   294  	pulumi.Input
   295  
   296  	ToProjectOutput() ProjectOutput
   297  	ToProjectOutputWithContext(ctx context.Context) ProjectOutput
   298  }
   299  
   300  func (*Project) ElementType() reflect.Type {
   301  	return reflect.TypeOf((**Project)(nil)).Elem()
   302  }
   303  
   304  func (i *Project) ToProjectOutput() ProjectOutput {
   305  	return i.ToProjectOutputWithContext(context.Background())
   306  }
   307  
   308  func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput {
   309  	return pulumi.ToOutputWithContext(ctx, i).(ProjectOutput)
   310  }
   311  
   312  // ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values.
   313  // You can construct a concrete instance of `ProjectArrayInput` via:
   314  //
   315  //	ProjectArray{ ProjectArgs{...} }
   316  type ProjectArrayInput interface {
   317  	pulumi.Input
   318  
   319  	ToProjectArrayOutput() ProjectArrayOutput
   320  	ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput
   321  }
   322  
   323  type ProjectArray []ProjectInput
   324  
   325  func (ProjectArray) ElementType() reflect.Type {
   326  	return reflect.TypeOf((*[]*Project)(nil)).Elem()
   327  }
   328  
   329  func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput {
   330  	return i.ToProjectArrayOutputWithContext(context.Background())
   331  }
   332  
   333  func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput {
   334  	return pulumi.ToOutputWithContext(ctx, i).(ProjectArrayOutput)
   335  }
   336  
   337  // ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values.
   338  // You can construct a concrete instance of `ProjectMapInput` via:
   339  //
   340  //	ProjectMap{ "key": ProjectArgs{...} }
   341  type ProjectMapInput interface {
   342  	pulumi.Input
   343  
   344  	ToProjectMapOutput() ProjectMapOutput
   345  	ToProjectMapOutputWithContext(context.Context) ProjectMapOutput
   346  }
   347  
   348  type ProjectMap map[string]ProjectInput
   349  
   350  func (ProjectMap) ElementType() reflect.Type {
   351  	return reflect.TypeOf((*map[string]*Project)(nil)).Elem()
   352  }
   353  
   354  func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput {
   355  	return i.ToProjectMapOutputWithContext(context.Background())
   356  }
   357  
   358  func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput {
   359  	return pulumi.ToOutputWithContext(ctx, i).(ProjectMapOutput)
   360  }
   361  
   362  type ProjectOutput struct{ *pulumi.OutputState }
   363  
   364  func (ProjectOutput) ElementType() reflect.Type {
   365  	return reflect.TypeOf((**Project)(nil)).Elem()
   366  }
   367  
   368  func (o ProjectOutput) ToProjectOutput() ProjectOutput {
   369  	return o
   370  }
   371  
   372  func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput {
   373  	return o
   374  }
   375  
   376  // The number of ongoing experiments currently in the project.
   377  func (o ProjectOutput) ActiveExperimentCount() pulumi.IntOutput {
   378  	return o.ApplyT(func(v *Project) pulumi.IntOutput { return v.ActiveExperimentCount }).(pulumi.IntOutput)
   379  }
   380  
   381  // The number of ongoing launches currently in the project.
   382  func (o ProjectOutput) ActiveLaunchCount() pulumi.IntOutput {
   383  	return o.ApplyT(func(v *Project) pulumi.IntOutput { return v.ActiveLaunchCount }).(pulumi.IntOutput)
   384  }
   385  
   386  // The ARN of the project.
   387  func (o ProjectOutput) Arn() pulumi.StringOutput {
   388  	return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   389  }
   390  
   391  // The date and time that the project is created.
   392  func (o ProjectOutput) CreatedTime() pulumi.StringOutput {
   393  	return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.CreatedTime }).(pulumi.StringOutput)
   394  }
   395  
   396  // A block that contains information about where Evidently is to store evaluation events for longer term storage, if you choose to do so. If you choose not to store these events, Evidently deletes them after using them to produce metrics and other experiment results that you can view. See below.
   397  func (o ProjectOutput) DataDelivery() ProjectDataDeliveryPtrOutput {
   398  	return o.ApplyT(func(v *Project) ProjectDataDeliveryPtrOutput { return v.DataDelivery }).(ProjectDataDeliveryPtrOutput)
   399  }
   400  
   401  // Specifies the description of the project.
   402  func (o ProjectOutput) Description() pulumi.StringPtrOutput {
   403  	return o.ApplyT(func(v *Project) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   404  }
   405  
   406  // The number of experiments currently in the project. This includes all experiments that have been created and not deleted, whether they are ongoing or not.
   407  func (o ProjectOutput) ExperimentCount() pulumi.IntOutput {
   408  	return o.ApplyT(func(v *Project) pulumi.IntOutput { return v.ExperimentCount }).(pulumi.IntOutput)
   409  }
   410  
   411  // The number of features currently in the project.
   412  func (o ProjectOutput) FeatureCount() pulumi.IntOutput {
   413  	return o.ApplyT(func(v *Project) pulumi.IntOutput { return v.FeatureCount }).(pulumi.IntOutput)
   414  }
   415  
   416  // The date and time that the project was most recently updated.
   417  func (o ProjectOutput) LastUpdatedTime() pulumi.StringOutput {
   418  	return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.LastUpdatedTime }).(pulumi.StringOutput)
   419  }
   420  
   421  // The number of launches currently in the project. This includes all launches that have been created and not deleted, whether they are ongoing or not.
   422  func (o ProjectOutput) LaunchCount() pulumi.IntOutput {
   423  	return o.ApplyT(func(v *Project) pulumi.IntOutput { return v.LaunchCount }).(pulumi.IntOutput)
   424  }
   425  
   426  // A name for the project.
   427  func (o ProjectOutput) Name() pulumi.StringOutput {
   428  	return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   429  }
   430  
   431  // The current state of the project. Valid values are `AVAILABLE` and `UPDATING`.
   432  func (o ProjectOutput) Status() pulumi.StringOutput {
   433  	return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   434  }
   435  
   436  // Tags to apply to the project. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   437  func (o ProjectOutput) Tags() pulumi.StringMapOutput {
   438  	return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   439  }
   440  
   441  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   442  //
   443  // Deprecated: Please use `tags` instead.
   444  func (o ProjectOutput) TagsAll() pulumi.StringMapOutput {
   445  	return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   446  }
   447  
   448  type ProjectArrayOutput struct{ *pulumi.OutputState }
   449  
   450  func (ProjectArrayOutput) ElementType() reflect.Type {
   451  	return reflect.TypeOf((*[]*Project)(nil)).Elem()
   452  }
   453  
   454  func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput {
   455  	return o
   456  }
   457  
   458  func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput {
   459  	return o
   460  }
   461  
   462  func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput {
   463  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Project {
   464  		return vs[0].([]*Project)[vs[1].(int)]
   465  	}).(ProjectOutput)
   466  }
   467  
   468  type ProjectMapOutput struct{ *pulumi.OutputState }
   469  
   470  func (ProjectMapOutput) ElementType() reflect.Type {
   471  	return reflect.TypeOf((*map[string]*Project)(nil)).Elem()
   472  }
   473  
   474  func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput {
   475  	return o
   476  }
   477  
   478  func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput {
   479  	return o
   480  }
   481  
   482  func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput {
   483  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Project {
   484  		return vs[0].(map[string]*Project)[vs[1].(string)]
   485  	}).(ProjectOutput)
   486  }
   487  
   488  func init() {
   489  	pulumi.RegisterInputType(reflect.TypeOf((*ProjectInput)(nil)).Elem(), &Project{})
   490  	pulumi.RegisterInputType(reflect.TypeOf((*ProjectArrayInput)(nil)).Elem(), ProjectArray{})
   491  	pulumi.RegisterInputType(reflect.TypeOf((*ProjectMapInput)(nil)).Elem(), ProjectMap{})
   492  	pulumi.RegisterOutputType(ProjectOutput{})
   493  	pulumi.RegisterOutputType(ProjectArrayOutput{})
   494  	pulumi.RegisterOutputType(ProjectMapOutput{})
   495  }