github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/securitylake/dataLake.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 securitylake
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Resource for managing an AWS Security Lake Data Lake.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securitylake"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := securitylake.NewDataLake(ctx, "example", &securitylake.DataLakeArgs{
    33  //				MetaStoreManagerRoleArn: pulumi.Any(metaStoreManager.Arn),
    34  //				Configuration: &securitylake.DataLakeConfigurationArgs{
    35  //					Region: pulumi.String("eu-west-1"),
    36  //					EncryptionConfigurations: securitylake.DataLakeConfigurationEncryptionConfigurationArray{
    37  //						&securitylake.DataLakeConfigurationEncryptionConfigurationArgs{
    38  //							KmsKeyId: pulumi.String("S3_MANAGED_KEY"),
    39  //						},
    40  //					},
    41  //					LifecycleConfiguration: &securitylake.DataLakeConfigurationLifecycleConfigurationArgs{
    42  //						Transitions: securitylake.DataLakeConfigurationLifecycleConfigurationTransitionArray{
    43  //							&securitylake.DataLakeConfigurationLifecycleConfigurationTransitionArgs{
    44  //								Days:         pulumi.Int(31),
    45  //								StorageClass: pulumi.String("STANDARD_IA"),
    46  //							},
    47  //							&securitylake.DataLakeConfigurationLifecycleConfigurationTransitionArgs{
    48  //								Days:         pulumi.Int(80),
    49  //								StorageClass: pulumi.String("ONEZONE_IA"),
    50  //							},
    51  //						},
    52  //						Expiration: &securitylake.DataLakeConfigurationLifecycleConfigurationExpirationArgs{
    53  //							Days: pulumi.Int(300),
    54  //						},
    55  //					},
    56  //				},
    57  //			})
    58  //			if err != nil {
    59  //				return err
    60  //			}
    61  //			return nil
    62  //		})
    63  //	}
    64  //
    65  // ```
    66  // <!--End PulumiCodeChooser -->
    67  //
    68  // ### Basic Usage
    69  //
    70  // <!--Start PulumiCodeChooser -->
    71  // ```go
    72  // package main
    73  //
    74  // import (
    75  //
    76  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/securitylake"
    77  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    78  //
    79  // )
    80  //
    81  //	func main() {
    82  //		pulumi.Run(func(ctx *pulumi.Context) error {
    83  //			_, err := securitylake.NewDataLake(ctx, "example", &securitylake.DataLakeArgs{
    84  //				MetaStoreManagerRoleArn: pulumi.Any(metaStoreManager.Arn),
    85  //				Configuration: &securitylake.DataLakeConfigurationArgs{
    86  //					Region: pulumi.String("eu-west-1"),
    87  //					EncryptionConfigurations: securitylake.DataLakeConfigurationEncryptionConfigurationArray{
    88  //						&securitylake.DataLakeConfigurationEncryptionConfigurationArgs{
    89  //							KmsKeyId: pulumi.String("S3_MANAGED_KEY"),
    90  //						},
    91  //					},
    92  //				},
    93  //			})
    94  //			if err != nil {
    95  //				return err
    96  //			}
    97  //			return nil
    98  //		})
    99  //	}
   100  //
   101  // ```
   102  // <!--End PulumiCodeChooser -->
   103  //
   104  // ## Import
   105  //
   106  // Using `pulumi import`, import Security Hub standards subscriptions using the standards subscription ARN. For example:
   107  //
   108  // ```sh
   109  // $ pulumi import aws:securitylake/dataLake:DataLake example arn:aws:securitylake:eu-west-1:123456789012:data-lake/default
   110  // ```
   111  type DataLake struct {
   112  	pulumi.CustomResourceState
   113  
   114  	// ARN of the Data Lake.
   115  	Arn pulumi.StringOutput `pulumi:"arn"`
   116  	// Specify the Region or Regions that will contribute data to the rollup region.
   117  	Configuration DataLakeConfigurationPtrOutput `pulumi:"configuration"`
   118  	// The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources.
   119  	MetaStoreManagerRoleArn pulumi.StringOutput `pulumi:"metaStoreManagerRoleArn"`
   120  	// The ARN for the Amazon Security Lake Amazon S3 bucket.
   121  	S3BucketArn pulumi.StringOutput `pulumi:"s3BucketArn"`
   122  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   123  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   124  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   125  	//
   126  	// Deprecated: Please use `tags` instead.
   127  	TagsAll  pulumi.StringMapOutput    `pulumi:"tagsAll"`
   128  	Timeouts DataLakeTimeoutsPtrOutput `pulumi:"timeouts"`
   129  }
   130  
   131  // NewDataLake registers a new resource with the given unique name, arguments, and options.
   132  func NewDataLake(ctx *pulumi.Context,
   133  	name string, args *DataLakeArgs, opts ...pulumi.ResourceOption) (*DataLake, error) {
   134  	if args == nil {
   135  		return nil, errors.New("missing one or more required arguments")
   136  	}
   137  
   138  	if args.MetaStoreManagerRoleArn == nil {
   139  		return nil, errors.New("invalid value for required argument 'MetaStoreManagerRoleArn'")
   140  	}
   141  	opts = internal.PkgResourceDefaultOpts(opts)
   142  	var resource DataLake
   143  	err := ctx.RegisterResource("aws:securitylake/dataLake:DataLake", name, args, &resource, opts...)
   144  	if err != nil {
   145  		return nil, err
   146  	}
   147  	return &resource, nil
   148  }
   149  
   150  // GetDataLake gets an existing DataLake resource's state with the given name, ID, and optional
   151  // state properties that are used to uniquely qualify the lookup (nil if not required).
   152  func GetDataLake(ctx *pulumi.Context,
   153  	name string, id pulumi.IDInput, state *DataLakeState, opts ...pulumi.ResourceOption) (*DataLake, error) {
   154  	var resource DataLake
   155  	err := ctx.ReadResource("aws:securitylake/dataLake:DataLake", name, id, state, &resource, opts...)
   156  	if err != nil {
   157  		return nil, err
   158  	}
   159  	return &resource, nil
   160  }
   161  
   162  // Input properties used for looking up and filtering DataLake resources.
   163  type dataLakeState struct {
   164  	// ARN of the Data Lake.
   165  	Arn *string `pulumi:"arn"`
   166  	// Specify the Region or Regions that will contribute data to the rollup region.
   167  	Configuration *DataLakeConfiguration `pulumi:"configuration"`
   168  	// The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources.
   169  	MetaStoreManagerRoleArn *string `pulumi:"metaStoreManagerRoleArn"`
   170  	// The ARN for the Amazon Security Lake Amazon S3 bucket.
   171  	S3BucketArn *string `pulumi:"s3BucketArn"`
   172  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   173  	Tags map[string]string `pulumi:"tags"`
   174  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   175  	//
   176  	// Deprecated: Please use `tags` instead.
   177  	TagsAll  map[string]string `pulumi:"tagsAll"`
   178  	Timeouts *DataLakeTimeouts `pulumi:"timeouts"`
   179  }
   180  
   181  type DataLakeState struct {
   182  	// ARN of the Data Lake.
   183  	Arn pulumi.StringPtrInput
   184  	// Specify the Region or Regions that will contribute data to the rollup region.
   185  	Configuration DataLakeConfigurationPtrInput
   186  	// The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources.
   187  	MetaStoreManagerRoleArn pulumi.StringPtrInput
   188  	// The ARN for the Amazon Security Lake Amazon S3 bucket.
   189  	S3BucketArn pulumi.StringPtrInput
   190  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   191  	Tags pulumi.StringMapInput
   192  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   193  	//
   194  	// Deprecated: Please use `tags` instead.
   195  	TagsAll  pulumi.StringMapInput
   196  	Timeouts DataLakeTimeoutsPtrInput
   197  }
   198  
   199  func (DataLakeState) ElementType() reflect.Type {
   200  	return reflect.TypeOf((*dataLakeState)(nil)).Elem()
   201  }
   202  
   203  type dataLakeArgs struct {
   204  	// Specify the Region or Regions that will contribute data to the rollup region.
   205  	Configuration *DataLakeConfiguration `pulumi:"configuration"`
   206  	// The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources.
   207  	MetaStoreManagerRoleArn string `pulumi:"metaStoreManagerRoleArn"`
   208  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   209  	Tags     map[string]string `pulumi:"tags"`
   210  	Timeouts *DataLakeTimeouts `pulumi:"timeouts"`
   211  }
   212  
   213  // The set of arguments for constructing a DataLake resource.
   214  type DataLakeArgs struct {
   215  	// Specify the Region or Regions that will contribute data to the rollup region.
   216  	Configuration DataLakeConfigurationPtrInput
   217  	// The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources.
   218  	MetaStoreManagerRoleArn pulumi.StringInput
   219  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   220  	Tags     pulumi.StringMapInput
   221  	Timeouts DataLakeTimeoutsPtrInput
   222  }
   223  
   224  func (DataLakeArgs) ElementType() reflect.Type {
   225  	return reflect.TypeOf((*dataLakeArgs)(nil)).Elem()
   226  }
   227  
   228  type DataLakeInput interface {
   229  	pulumi.Input
   230  
   231  	ToDataLakeOutput() DataLakeOutput
   232  	ToDataLakeOutputWithContext(ctx context.Context) DataLakeOutput
   233  }
   234  
   235  func (*DataLake) ElementType() reflect.Type {
   236  	return reflect.TypeOf((**DataLake)(nil)).Elem()
   237  }
   238  
   239  func (i *DataLake) ToDataLakeOutput() DataLakeOutput {
   240  	return i.ToDataLakeOutputWithContext(context.Background())
   241  }
   242  
   243  func (i *DataLake) ToDataLakeOutputWithContext(ctx context.Context) DataLakeOutput {
   244  	return pulumi.ToOutputWithContext(ctx, i).(DataLakeOutput)
   245  }
   246  
   247  // DataLakeArrayInput is an input type that accepts DataLakeArray and DataLakeArrayOutput values.
   248  // You can construct a concrete instance of `DataLakeArrayInput` via:
   249  //
   250  //	DataLakeArray{ DataLakeArgs{...} }
   251  type DataLakeArrayInput interface {
   252  	pulumi.Input
   253  
   254  	ToDataLakeArrayOutput() DataLakeArrayOutput
   255  	ToDataLakeArrayOutputWithContext(context.Context) DataLakeArrayOutput
   256  }
   257  
   258  type DataLakeArray []DataLakeInput
   259  
   260  func (DataLakeArray) ElementType() reflect.Type {
   261  	return reflect.TypeOf((*[]*DataLake)(nil)).Elem()
   262  }
   263  
   264  func (i DataLakeArray) ToDataLakeArrayOutput() DataLakeArrayOutput {
   265  	return i.ToDataLakeArrayOutputWithContext(context.Background())
   266  }
   267  
   268  func (i DataLakeArray) ToDataLakeArrayOutputWithContext(ctx context.Context) DataLakeArrayOutput {
   269  	return pulumi.ToOutputWithContext(ctx, i).(DataLakeArrayOutput)
   270  }
   271  
   272  // DataLakeMapInput is an input type that accepts DataLakeMap and DataLakeMapOutput values.
   273  // You can construct a concrete instance of `DataLakeMapInput` via:
   274  //
   275  //	DataLakeMap{ "key": DataLakeArgs{...} }
   276  type DataLakeMapInput interface {
   277  	pulumi.Input
   278  
   279  	ToDataLakeMapOutput() DataLakeMapOutput
   280  	ToDataLakeMapOutputWithContext(context.Context) DataLakeMapOutput
   281  }
   282  
   283  type DataLakeMap map[string]DataLakeInput
   284  
   285  func (DataLakeMap) ElementType() reflect.Type {
   286  	return reflect.TypeOf((*map[string]*DataLake)(nil)).Elem()
   287  }
   288  
   289  func (i DataLakeMap) ToDataLakeMapOutput() DataLakeMapOutput {
   290  	return i.ToDataLakeMapOutputWithContext(context.Background())
   291  }
   292  
   293  func (i DataLakeMap) ToDataLakeMapOutputWithContext(ctx context.Context) DataLakeMapOutput {
   294  	return pulumi.ToOutputWithContext(ctx, i).(DataLakeMapOutput)
   295  }
   296  
   297  type DataLakeOutput struct{ *pulumi.OutputState }
   298  
   299  func (DataLakeOutput) ElementType() reflect.Type {
   300  	return reflect.TypeOf((**DataLake)(nil)).Elem()
   301  }
   302  
   303  func (o DataLakeOutput) ToDataLakeOutput() DataLakeOutput {
   304  	return o
   305  }
   306  
   307  func (o DataLakeOutput) ToDataLakeOutputWithContext(ctx context.Context) DataLakeOutput {
   308  	return o
   309  }
   310  
   311  // ARN of the Data Lake.
   312  func (o DataLakeOutput) Arn() pulumi.StringOutput {
   313  	return o.ApplyT(func(v *DataLake) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   314  }
   315  
   316  // Specify the Region or Regions that will contribute data to the rollup region.
   317  func (o DataLakeOutput) Configuration() DataLakeConfigurationPtrOutput {
   318  	return o.ApplyT(func(v *DataLake) DataLakeConfigurationPtrOutput { return v.Configuration }).(DataLakeConfigurationPtrOutput)
   319  }
   320  
   321  // The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources.
   322  func (o DataLakeOutput) MetaStoreManagerRoleArn() pulumi.StringOutput {
   323  	return o.ApplyT(func(v *DataLake) pulumi.StringOutput { return v.MetaStoreManagerRoleArn }).(pulumi.StringOutput)
   324  }
   325  
   326  // The ARN for the Amazon Security Lake Amazon S3 bucket.
   327  func (o DataLakeOutput) S3BucketArn() pulumi.StringOutput {
   328  	return o.ApplyT(func(v *DataLake) pulumi.StringOutput { return v.S3BucketArn }).(pulumi.StringOutput)
   329  }
   330  
   331  // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   332  func (o DataLakeOutput) Tags() pulumi.StringMapOutput {
   333  	return o.ApplyT(func(v *DataLake) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   334  }
   335  
   336  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   337  //
   338  // Deprecated: Please use `tags` instead.
   339  func (o DataLakeOutput) TagsAll() pulumi.StringMapOutput {
   340  	return o.ApplyT(func(v *DataLake) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   341  }
   342  
   343  func (o DataLakeOutput) Timeouts() DataLakeTimeoutsPtrOutput {
   344  	return o.ApplyT(func(v *DataLake) DataLakeTimeoutsPtrOutput { return v.Timeouts }).(DataLakeTimeoutsPtrOutput)
   345  }
   346  
   347  type DataLakeArrayOutput struct{ *pulumi.OutputState }
   348  
   349  func (DataLakeArrayOutput) ElementType() reflect.Type {
   350  	return reflect.TypeOf((*[]*DataLake)(nil)).Elem()
   351  }
   352  
   353  func (o DataLakeArrayOutput) ToDataLakeArrayOutput() DataLakeArrayOutput {
   354  	return o
   355  }
   356  
   357  func (o DataLakeArrayOutput) ToDataLakeArrayOutputWithContext(ctx context.Context) DataLakeArrayOutput {
   358  	return o
   359  }
   360  
   361  func (o DataLakeArrayOutput) Index(i pulumi.IntInput) DataLakeOutput {
   362  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataLake {
   363  		return vs[0].([]*DataLake)[vs[1].(int)]
   364  	}).(DataLakeOutput)
   365  }
   366  
   367  type DataLakeMapOutput struct{ *pulumi.OutputState }
   368  
   369  func (DataLakeMapOutput) ElementType() reflect.Type {
   370  	return reflect.TypeOf((*map[string]*DataLake)(nil)).Elem()
   371  }
   372  
   373  func (o DataLakeMapOutput) ToDataLakeMapOutput() DataLakeMapOutput {
   374  	return o
   375  }
   376  
   377  func (o DataLakeMapOutput) ToDataLakeMapOutputWithContext(ctx context.Context) DataLakeMapOutput {
   378  	return o
   379  }
   380  
   381  func (o DataLakeMapOutput) MapIndex(k pulumi.StringInput) DataLakeOutput {
   382  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataLake {
   383  		return vs[0].(map[string]*DataLake)[vs[1].(string)]
   384  	}).(DataLakeOutput)
   385  }
   386  
   387  func init() {
   388  	pulumi.RegisterInputType(reflect.TypeOf((*DataLakeInput)(nil)).Elem(), &DataLake{})
   389  	pulumi.RegisterInputType(reflect.TypeOf((*DataLakeArrayInput)(nil)).Elem(), DataLakeArray{})
   390  	pulumi.RegisterInputType(reflect.TypeOf((*DataLakeMapInput)(nil)).Elem(), DataLakeMap{})
   391  	pulumi.RegisterOutputType(DataLakeOutput{})
   392  	pulumi.RegisterOutputType(DataLakeArrayOutput{})
   393  	pulumi.RegisterOutputType(DataLakeMapOutput{})
   394  }