github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/securitylake/subscriberNotification.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 Subscriber Notification.
    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.NewSubscriberNotification(ctx, "test", &securitylake.SubscriberNotificationArgs{
    33  //				SubscriberId: pulumi.Any(testAwsSecuritylakeSubscriber.Id),
    34  //				Configuration: &securitylake.SubscriberNotificationConfigurationArgs{
    35  //					SqsNotificationConfiguration: nil,
    36  //				},
    37  //			})
    38  //			if err != nil {
    39  //				return err
    40  //			}
    41  //			return nil
    42  //		})
    43  //	}
    44  //
    45  // ```
    46  // <!--End PulumiCodeChooser -->
    47  type SubscriberNotification struct {
    48  	pulumi.CustomResourceState
    49  
    50  	// Specify the configuration using which you want to create the subscriber notification..
    51  	Configuration SubscriberNotificationConfigurationPtrOutput `pulumi:"configuration"`
    52  	EndpointId    pulumi.StringOutput                          `pulumi:"endpointId"`
    53  	// The subscriber ID for the notification subscription.
    54  	SubscriberId pulumi.StringOutput `pulumi:"subscriberId"`
    55  }
    56  
    57  // NewSubscriberNotification registers a new resource with the given unique name, arguments, and options.
    58  func NewSubscriberNotification(ctx *pulumi.Context,
    59  	name string, args *SubscriberNotificationArgs, opts ...pulumi.ResourceOption) (*SubscriberNotification, error) {
    60  	if args == nil {
    61  		return nil, errors.New("missing one or more required arguments")
    62  	}
    63  
    64  	if args.SubscriberId == nil {
    65  		return nil, errors.New("invalid value for required argument 'SubscriberId'")
    66  	}
    67  	opts = internal.PkgResourceDefaultOpts(opts)
    68  	var resource SubscriberNotification
    69  	err := ctx.RegisterResource("aws:securitylake/subscriberNotification:SubscriberNotification", name, args, &resource, opts...)
    70  	if err != nil {
    71  		return nil, err
    72  	}
    73  	return &resource, nil
    74  }
    75  
    76  // GetSubscriberNotification gets an existing SubscriberNotification resource's state with the given name, ID, and optional
    77  // state properties that are used to uniquely qualify the lookup (nil if not required).
    78  func GetSubscriberNotification(ctx *pulumi.Context,
    79  	name string, id pulumi.IDInput, state *SubscriberNotificationState, opts ...pulumi.ResourceOption) (*SubscriberNotification, error) {
    80  	var resource SubscriberNotification
    81  	err := ctx.ReadResource("aws:securitylake/subscriberNotification:SubscriberNotification", name, id, state, &resource, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return &resource, nil
    86  }
    87  
    88  // Input properties used for looking up and filtering SubscriberNotification resources.
    89  type subscriberNotificationState struct {
    90  	// Specify the configuration using which you want to create the subscriber notification..
    91  	Configuration *SubscriberNotificationConfiguration `pulumi:"configuration"`
    92  	EndpointId    *string                              `pulumi:"endpointId"`
    93  	// The subscriber ID for the notification subscription.
    94  	SubscriberId *string `pulumi:"subscriberId"`
    95  }
    96  
    97  type SubscriberNotificationState struct {
    98  	// Specify the configuration using which you want to create the subscriber notification..
    99  	Configuration SubscriberNotificationConfigurationPtrInput
   100  	EndpointId    pulumi.StringPtrInput
   101  	// The subscriber ID for the notification subscription.
   102  	SubscriberId pulumi.StringPtrInput
   103  }
   104  
   105  func (SubscriberNotificationState) ElementType() reflect.Type {
   106  	return reflect.TypeOf((*subscriberNotificationState)(nil)).Elem()
   107  }
   108  
   109  type subscriberNotificationArgs struct {
   110  	// Specify the configuration using which you want to create the subscriber notification..
   111  	Configuration *SubscriberNotificationConfiguration `pulumi:"configuration"`
   112  	// The subscriber ID for the notification subscription.
   113  	SubscriberId string `pulumi:"subscriberId"`
   114  }
   115  
   116  // The set of arguments for constructing a SubscriberNotification resource.
   117  type SubscriberNotificationArgs struct {
   118  	// Specify the configuration using which you want to create the subscriber notification..
   119  	Configuration SubscriberNotificationConfigurationPtrInput
   120  	// The subscriber ID for the notification subscription.
   121  	SubscriberId pulumi.StringInput
   122  }
   123  
   124  func (SubscriberNotificationArgs) ElementType() reflect.Type {
   125  	return reflect.TypeOf((*subscriberNotificationArgs)(nil)).Elem()
   126  }
   127  
   128  type SubscriberNotificationInput interface {
   129  	pulumi.Input
   130  
   131  	ToSubscriberNotificationOutput() SubscriberNotificationOutput
   132  	ToSubscriberNotificationOutputWithContext(ctx context.Context) SubscriberNotificationOutput
   133  }
   134  
   135  func (*SubscriberNotification) ElementType() reflect.Type {
   136  	return reflect.TypeOf((**SubscriberNotification)(nil)).Elem()
   137  }
   138  
   139  func (i *SubscriberNotification) ToSubscriberNotificationOutput() SubscriberNotificationOutput {
   140  	return i.ToSubscriberNotificationOutputWithContext(context.Background())
   141  }
   142  
   143  func (i *SubscriberNotification) ToSubscriberNotificationOutputWithContext(ctx context.Context) SubscriberNotificationOutput {
   144  	return pulumi.ToOutputWithContext(ctx, i).(SubscriberNotificationOutput)
   145  }
   146  
   147  // SubscriberNotificationArrayInput is an input type that accepts SubscriberNotificationArray and SubscriberNotificationArrayOutput values.
   148  // You can construct a concrete instance of `SubscriberNotificationArrayInput` via:
   149  //
   150  //	SubscriberNotificationArray{ SubscriberNotificationArgs{...} }
   151  type SubscriberNotificationArrayInput interface {
   152  	pulumi.Input
   153  
   154  	ToSubscriberNotificationArrayOutput() SubscriberNotificationArrayOutput
   155  	ToSubscriberNotificationArrayOutputWithContext(context.Context) SubscriberNotificationArrayOutput
   156  }
   157  
   158  type SubscriberNotificationArray []SubscriberNotificationInput
   159  
   160  func (SubscriberNotificationArray) ElementType() reflect.Type {
   161  	return reflect.TypeOf((*[]*SubscriberNotification)(nil)).Elem()
   162  }
   163  
   164  func (i SubscriberNotificationArray) ToSubscriberNotificationArrayOutput() SubscriberNotificationArrayOutput {
   165  	return i.ToSubscriberNotificationArrayOutputWithContext(context.Background())
   166  }
   167  
   168  func (i SubscriberNotificationArray) ToSubscriberNotificationArrayOutputWithContext(ctx context.Context) SubscriberNotificationArrayOutput {
   169  	return pulumi.ToOutputWithContext(ctx, i).(SubscriberNotificationArrayOutput)
   170  }
   171  
   172  // SubscriberNotificationMapInput is an input type that accepts SubscriberNotificationMap and SubscriberNotificationMapOutput values.
   173  // You can construct a concrete instance of `SubscriberNotificationMapInput` via:
   174  //
   175  //	SubscriberNotificationMap{ "key": SubscriberNotificationArgs{...} }
   176  type SubscriberNotificationMapInput interface {
   177  	pulumi.Input
   178  
   179  	ToSubscriberNotificationMapOutput() SubscriberNotificationMapOutput
   180  	ToSubscriberNotificationMapOutputWithContext(context.Context) SubscriberNotificationMapOutput
   181  }
   182  
   183  type SubscriberNotificationMap map[string]SubscriberNotificationInput
   184  
   185  func (SubscriberNotificationMap) ElementType() reflect.Type {
   186  	return reflect.TypeOf((*map[string]*SubscriberNotification)(nil)).Elem()
   187  }
   188  
   189  func (i SubscriberNotificationMap) ToSubscriberNotificationMapOutput() SubscriberNotificationMapOutput {
   190  	return i.ToSubscriberNotificationMapOutputWithContext(context.Background())
   191  }
   192  
   193  func (i SubscriberNotificationMap) ToSubscriberNotificationMapOutputWithContext(ctx context.Context) SubscriberNotificationMapOutput {
   194  	return pulumi.ToOutputWithContext(ctx, i).(SubscriberNotificationMapOutput)
   195  }
   196  
   197  type SubscriberNotificationOutput struct{ *pulumi.OutputState }
   198  
   199  func (SubscriberNotificationOutput) ElementType() reflect.Type {
   200  	return reflect.TypeOf((**SubscriberNotification)(nil)).Elem()
   201  }
   202  
   203  func (o SubscriberNotificationOutput) ToSubscriberNotificationOutput() SubscriberNotificationOutput {
   204  	return o
   205  }
   206  
   207  func (o SubscriberNotificationOutput) ToSubscriberNotificationOutputWithContext(ctx context.Context) SubscriberNotificationOutput {
   208  	return o
   209  }
   210  
   211  // Specify the configuration using which you want to create the subscriber notification..
   212  func (o SubscriberNotificationOutput) Configuration() SubscriberNotificationConfigurationPtrOutput {
   213  	return o.ApplyT(func(v *SubscriberNotification) SubscriberNotificationConfigurationPtrOutput { return v.Configuration }).(SubscriberNotificationConfigurationPtrOutput)
   214  }
   215  
   216  func (o SubscriberNotificationOutput) EndpointId() pulumi.StringOutput {
   217  	return o.ApplyT(func(v *SubscriberNotification) pulumi.StringOutput { return v.EndpointId }).(pulumi.StringOutput)
   218  }
   219  
   220  // The subscriber ID for the notification subscription.
   221  func (o SubscriberNotificationOutput) SubscriberId() pulumi.StringOutput {
   222  	return o.ApplyT(func(v *SubscriberNotification) pulumi.StringOutput { return v.SubscriberId }).(pulumi.StringOutput)
   223  }
   224  
   225  type SubscriberNotificationArrayOutput struct{ *pulumi.OutputState }
   226  
   227  func (SubscriberNotificationArrayOutput) ElementType() reflect.Type {
   228  	return reflect.TypeOf((*[]*SubscriberNotification)(nil)).Elem()
   229  }
   230  
   231  func (o SubscriberNotificationArrayOutput) ToSubscriberNotificationArrayOutput() SubscriberNotificationArrayOutput {
   232  	return o
   233  }
   234  
   235  func (o SubscriberNotificationArrayOutput) ToSubscriberNotificationArrayOutputWithContext(ctx context.Context) SubscriberNotificationArrayOutput {
   236  	return o
   237  }
   238  
   239  func (o SubscriberNotificationArrayOutput) Index(i pulumi.IntInput) SubscriberNotificationOutput {
   240  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SubscriberNotification {
   241  		return vs[0].([]*SubscriberNotification)[vs[1].(int)]
   242  	}).(SubscriberNotificationOutput)
   243  }
   244  
   245  type SubscriberNotificationMapOutput struct{ *pulumi.OutputState }
   246  
   247  func (SubscriberNotificationMapOutput) ElementType() reflect.Type {
   248  	return reflect.TypeOf((*map[string]*SubscriberNotification)(nil)).Elem()
   249  }
   250  
   251  func (o SubscriberNotificationMapOutput) ToSubscriberNotificationMapOutput() SubscriberNotificationMapOutput {
   252  	return o
   253  }
   254  
   255  func (o SubscriberNotificationMapOutput) ToSubscriberNotificationMapOutputWithContext(ctx context.Context) SubscriberNotificationMapOutput {
   256  	return o
   257  }
   258  
   259  func (o SubscriberNotificationMapOutput) MapIndex(k pulumi.StringInput) SubscriberNotificationOutput {
   260  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SubscriberNotification {
   261  		return vs[0].(map[string]*SubscriberNotification)[vs[1].(string)]
   262  	}).(SubscriberNotificationOutput)
   263  }
   264  
   265  func init() {
   266  	pulumi.RegisterInputType(reflect.TypeOf((*SubscriberNotificationInput)(nil)).Elem(), &SubscriberNotification{})
   267  	pulumi.RegisterInputType(reflect.TypeOf((*SubscriberNotificationArrayInput)(nil)).Elem(), SubscriberNotificationArray{})
   268  	pulumi.RegisterInputType(reflect.TypeOf((*SubscriberNotificationMapInput)(nil)).Elem(), SubscriberNotificationMap{})
   269  	pulumi.RegisterOutputType(SubscriberNotificationOutput{})
   270  	pulumi.RegisterOutputType(SubscriberNotificationArrayOutput{})
   271  	pulumi.RegisterOutputType(SubscriberNotificationMapOutput{})
   272  }