github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ivschat/room.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 ivschat
     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  // Resource for managing an AWS IVS (Interactive Video) Chat Room.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ivschat"
    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 := ivschat.NewRoom(ctx, "example", &ivschat.RoomArgs{
    34  //				Name: pulumi.String("tf-room"),
    35  //			})
    36  //			if err != nil {
    37  //				return err
    38  //			}
    39  //			return nil
    40  //		})
    41  //	}
    42  //
    43  // ```
    44  // <!--End PulumiCodeChooser -->
    45  //
    46  // ## Import
    47  //
    48  // Using `pulumi import`, import IVS (Interactive Video) Chat Room using the ARN. For example:
    49  //
    50  // ```sh
    51  // $ pulumi import aws:ivschat/room:Room example arn:aws:ivschat:us-west-2:326937407773:room/GoXEXyB4VwHb
    52  // ```
    53  type Room struct {
    54  	pulumi.CustomResourceState
    55  
    56  	// ARN of the Room.
    57  	Arn pulumi.StringOutput `pulumi:"arn"`
    58  	// List of Logging Configuration
    59  	// ARNs to attach to the room.
    60  	LoggingConfigurationIdentifiers pulumi.StringArrayOutput `pulumi:"loggingConfigurationIdentifiers"`
    61  	// Maximum number of characters in a single
    62  	// message. Messages are expected to be UTF-8 encoded and this limit applies
    63  	// specifically to rune/code-point count, not number of bytes.
    64  	MaximumMessageLength pulumi.IntOutput `pulumi:"maximumMessageLength"`
    65  	// Maximum number of messages per
    66  	// second that can be sent to the room (by all clients).
    67  	MaximumMessageRatePerSecond pulumi.IntOutput `pulumi:"maximumMessageRatePerSecond"`
    68  	// Configuration information for optional
    69  	// review of messages.
    70  	MessageReviewHandler RoomMessageReviewHandlerPtrOutput `pulumi:"messageReviewHandler"`
    71  	// Room name.
    72  	Name pulumi.StringOutput `pulumi:"name"`
    73  	// 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.
    74  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    75  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    76  	//
    77  	// Deprecated: Please use `tags` instead.
    78  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    79  }
    80  
    81  // NewRoom registers a new resource with the given unique name, arguments, and options.
    82  func NewRoom(ctx *pulumi.Context,
    83  	name string, args *RoomArgs, opts ...pulumi.ResourceOption) (*Room, error) {
    84  	if args == nil {
    85  		args = &RoomArgs{}
    86  	}
    87  
    88  	opts = internal.PkgResourceDefaultOpts(opts)
    89  	var resource Room
    90  	err := ctx.RegisterResource("aws:ivschat/room:Room", name, args, &resource, opts...)
    91  	if err != nil {
    92  		return nil, err
    93  	}
    94  	return &resource, nil
    95  }
    96  
    97  // GetRoom gets an existing Room resource's state with the given name, ID, and optional
    98  // state properties that are used to uniquely qualify the lookup (nil if not required).
    99  func GetRoom(ctx *pulumi.Context,
   100  	name string, id pulumi.IDInput, state *RoomState, opts ...pulumi.ResourceOption) (*Room, error) {
   101  	var resource Room
   102  	err := ctx.ReadResource("aws:ivschat/room:Room", name, id, state, &resource, opts...)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return &resource, nil
   107  }
   108  
   109  // Input properties used for looking up and filtering Room resources.
   110  type roomState struct {
   111  	// ARN of the Room.
   112  	Arn *string `pulumi:"arn"`
   113  	// List of Logging Configuration
   114  	// ARNs to attach to the room.
   115  	LoggingConfigurationIdentifiers []string `pulumi:"loggingConfigurationIdentifiers"`
   116  	// Maximum number of characters in a single
   117  	// message. Messages are expected to be UTF-8 encoded and this limit applies
   118  	// specifically to rune/code-point count, not number of bytes.
   119  	MaximumMessageLength *int `pulumi:"maximumMessageLength"`
   120  	// Maximum number of messages per
   121  	// second that can be sent to the room (by all clients).
   122  	MaximumMessageRatePerSecond *int `pulumi:"maximumMessageRatePerSecond"`
   123  	// Configuration information for optional
   124  	// review of messages.
   125  	MessageReviewHandler *RoomMessageReviewHandler `pulumi:"messageReviewHandler"`
   126  	// Room name.
   127  	Name *string `pulumi:"name"`
   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 map[string]string `pulumi:"tags"`
   130  	// 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 map[string]string `pulumi:"tagsAll"`
   134  }
   135  
   136  type RoomState struct {
   137  	// ARN of the Room.
   138  	Arn pulumi.StringPtrInput
   139  	// List of Logging Configuration
   140  	// ARNs to attach to the room.
   141  	LoggingConfigurationIdentifiers pulumi.StringArrayInput
   142  	// Maximum number of characters in a single
   143  	// message. Messages are expected to be UTF-8 encoded and this limit applies
   144  	// specifically to rune/code-point count, not number of bytes.
   145  	MaximumMessageLength pulumi.IntPtrInput
   146  	// Maximum number of messages per
   147  	// second that can be sent to the room (by all clients).
   148  	MaximumMessageRatePerSecond pulumi.IntPtrInput
   149  	// Configuration information for optional
   150  	// review of messages.
   151  	MessageReviewHandler RoomMessageReviewHandlerPtrInput
   152  	// Room name.
   153  	Name pulumi.StringPtrInput
   154  	// 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.
   155  	Tags pulumi.StringMapInput
   156  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   157  	//
   158  	// Deprecated: Please use `tags` instead.
   159  	TagsAll pulumi.StringMapInput
   160  }
   161  
   162  func (RoomState) ElementType() reflect.Type {
   163  	return reflect.TypeOf((*roomState)(nil)).Elem()
   164  }
   165  
   166  type roomArgs struct {
   167  	// List of Logging Configuration
   168  	// ARNs to attach to the room.
   169  	LoggingConfigurationIdentifiers []string `pulumi:"loggingConfigurationIdentifiers"`
   170  	// Maximum number of characters in a single
   171  	// message. Messages are expected to be UTF-8 encoded and this limit applies
   172  	// specifically to rune/code-point count, not number of bytes.
   173  	MaximumMessageLength *int `pulumi:"maximumMessageLength"`
   174  	// Maximum number of messages per
   175  	// second that can be sent to the room (by all clients).
   176  	MaximumMessageRatePerSecond *int `pulumi:"maximumMessageRatePerSecond"`
   177  	// Configuration information for optional
   178  	// review of messages.
   179  	MessageReviewHandler *RoomMessageReviewHandler `pulumi:"messageReviewHandler"`
   180  	// Room name.
   181  	Name *string `pulumi:"name"`
   182  	// 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.
   183  	Tags map[string]string `pulumi:"tags"`
   184  }
   185  
   186  // The set of arguments for constructing a Room resource.
   187  type RoomArgs struct {
   188  	// List of Logging Configuration
   189  	// ARNs to attach to the room.
   190  	LoggingConfigurationIdentifiers pulumi.StringArrayInput
   191  	// Maximum number of characters in a single
   192  	// message. Messages are expected to be UTF-8 encoded and this limit applies
   193  	// specifically to rune/code-point count, not number of bytes.
   194  	MaximumMessageLength pulumi.IntPtrInput
   195  	// Maximum number of messages per
   196  	// second that can be sent to the room (by all clients).
   197  	MaximumMessageRatePerSecond pulumi.IntPtrInput
   198  	// Configuration information for optional
   199  	// review of messages.
   200  	MessageReviewHandler RoomMessageReviewHandlerPtrInput
   201  	// Room name.
   202  	Name pulumi.StringPtrInput
   203  	// 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.
   204  	Tags pulumi.StringMapInput
   205  }
   206  
   207  func (RoomArgs) ElementType() reflect.Type {
   208  	return reflect.TypeOf((*roomArgs)(nil)).Elem()
   209  }
   210  
   211  type RoomInput interface {
   212  	pulumi.Input
   213  
   214  	ToRoomOutput() RoomOutput
   215  	ToRoomOutputWithContext(ctx context.Context) RoomOutput
   216  }
   217  
   218  func (*Room) ElementType() reflect.Type {
   219  	return reflect.TypeOf((**Room)(nil)).Elem()
   220  }
   221  
   222  func (i *Room) ToRoomOutput() RoomOutput {
   223  	return i.ToRoomOutputWithContext(context.Background())
   224  }
   225  
   226  func (i *Room) ToRoomOutputWithContext(ctx context.Context) RoomOutput {
   227  	return pulumi.ToOutputWithContext(ctx, i).(RoomOutput)
   228  }
   229  
   230  // RoomArrayInput is an input type that accepts RoomArray and RoomArrayOutput values.
   231  // You can construct a concrete instance of `RoomArrayInput` via:
   232  //
   233  //	RoomArray{ RoomArgs{...} }
   234  type RoomArrayInput interface {
   235  	pulumi.Input
   236  
   237  	ToRoomArrayOutput() RoomArrayOutput
   238  	ToRoomArrayOutputWithContext(context.Context) RoomArrayOutput
   239  }
   240  
   241  type RoomArray []RoomInput
   242  
   243  func (RoomArray) ElementType() reflect.Type {
   244  	return reflect.TypeOf((*[]*Room)(nil)).Elem()
   245  }
   246  
   247  func (i RoomArray) ToRoomArrayOutput() RoomArrayOutput {
   248  	return i.ToRoomArrayOutputWithContext(context.Background())
   249  }
   250  
   251  func (i RoomArray) ToRoomArrayOutputWithContext(ctx context.Context) RoomArrayOutput {
   252  	return pulumi.ToOutputWithContext(ctx, i).(RoomArrayOutput)
   253  }
   254  
   255  // RoomMapInput is an input type that accepts RoomMap and RoomMapOutput values.
   256  // You can construct a concrete instance of `RoomMapInput` via:
   257  //
   258  //	RoomMap{ "key": RoomArgs{...} }
   259  type RoomMapInput interface {
   260  	pulumi.Input
   261  
   262  	ToRoomMapOutput() RoomMapOutput
   263  	ToRoomMapOutputWithContext(context.Context) RoomMapOutput
   264  }
   265  
   266  type RoomMap map[string]RoomInput
   267  
   268  func (RoomMap) ElementType() reflect.Type {
   269  	return reflect.TypeOf((*map[string]*Room)(nil)).Elem()
   270  }
   271  
   272  func (i RoomMap) ToRoomMapOutput() RoomMapOutput {
   273  	return i.ToRoomMapOutputWithContext(context.Background())
   274  }
   275  
   276  func (i RoomMap) ToRoomMapOutputWithContext(ctx context.Context) RoomMapOutput {
   277  	return pulumi.ToOutputWithContext(ctx, i).(RoomMapOutput)
   278  }
   279  
   280  type RoomOutput struct{ *pulumi.OutputState }
   281  
   282  func (RoomOutput) ElementType() reflect.Type {
   283  	return reflect.TypeOf((**Room)(nil)).Elem()
   284  }
   285  
   286  func (o RoomOutput) ToRoomOutput() RoomOutput {
   287  	return o
   288  }
   289  
   290  func (o RoomOutput) ToRoomOutputWithContext(ctx context.Context) RoomOutput {
   291  	return o
   292  }
   293  
   294  // ARN of the Room.
   295  func (o RoomOutput) Arn() pulumi.StringOutput {
   296  	return o.ApplyT(func(v *Room) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   297  }
   298  
   299  // List of Logging Configuration
   300  // ARNs to attach to the room.
   301  func (o RoomOutput) LoggingConfigurationIdentifiers() pulumi.StringArrayOutput {
   302  	return o.ApplyT(func(v *Room) pulumi.StringArrayOutput { return v.LoggingConfigurationIdentifiers }).(pulumi.StringArrayOutput)
   303  }
   304  
   305  // Maximum number of characters in a single
   306  // message. Messages are expected to be UTF-8 encoded and this limit applies
   307  // specifically to rune/code-point count, not number of bytes.
   308  func (o RoomOutput) MaximumMessageLength() pulumi.IntOutput {
   309  	return o.ApplyT(func(v *Room) pulumi.IntOutput { return v.MaximumMessageLength }).(pulumi.IntOutput)
   310  }
   311  
   312  // Maximum number of messages per
   313  // second that can be sent to the room (by all clients).
   314  func (o RoomOutput) MaximumMessageRatePerSecond() pulumi.IntOutput {
   315  	return o.ApplyT(func(v *Room) pulumi.IntOutput { return v.MaximumMessageRatePerSecond }).(pulumi.IntOutput)
   316  }
   317  
   318  // Configuration information for optional
   319  // review of messages.
   320  func (o RoomOutput) MessageReviewHandler() RoomMessageReviewHandlerPtrOutput {
   321  	return o.ApplyT(func(v *Room) RoomMessageReviewHandlerPtrOutput { return v.MessageReviewHandler }).(RoomMessageReviewHandlerPtrOutput)
   322  }
   323  
   324  // Room name.
   325  func (o RoomOutput) Name() pulumi.StringOutput {
   326  	return o.ApplyT(func(v *Room) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   327  }
   328  
   329  // 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.
   330  func (o RoomOutput) Tags() pulumi.StringMapOutput {
   331  	return o.ApplyT(func(v *Room) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   332  }
   333  
   334  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   335  //
   336  // Deprecated: Please use `tags` instead.
   337  func (o RoomOutput) TagsAll() pulumi.StringMapOutput {
   338  	return o.ApplyT(func(v *Room) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   339  }
   340  
   341  type RoomArrayOutput struct{ *pulumi.OutputState }
   342  
   343  func (RoomArrayOutput) ElementType() reflect.Type {
   344  	return reflect.TypeOf((*[]*Room)(nil)).Elem()
   345  }
   346  
   347  func (o RoomArrayOutput) ToRoomArrayOutput() RoomArrayOutput {
   348  	return o
   349  }
   350  
   351  func (o RoomArrayOutput) ToRoomArrayOutputWithContext(ctx context.Context) RoomArrayOutput {
   352  	return o
   353  }
   354  
   355  func (o RoomArrayOutput) Index(i pulumi.IntInput) RoomOutput {
   356  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Room {
   357  		return vs[0].([]*Room)[vs[1].(int)]
   358  	}).(RoomOutput)
   359  }
   360  
   361  type RoomMapOutput struct{ *pulumi.OutputState }
   362  
   363  func (RoomMapOutput) ElementType() reflect.Type {
   364  	return reflect.TypeOf((*map[string]*Room)(nil)).Elem()
   365  }
   366  
   367  func (o RoomMapOutput) ToRoomMapOutput() RoomMapOutput {
   368  	return o
   369  }
   370  
   371  func (o RoomMapOutput) ToRoomMapOutputWithContext(ctx context.Context) RoomMapOutput {
   372  	return o
   373  }
   374  
   375  func (o RoomMapOutput) MapIndex(k pulumi.StringInput) RoomOutput {
   376  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Room {
   377  		return vs[0].(map[string]*Room)[vs[1].(string)]
   378  	}).(RoomOutput)
   379  }
   380  
   381  func init() {
   382  	pulumi.RegisterInputType(reflect.TypeOf((*RoomInput)(nil)).Elem(), &Room{})
   383  	pulumi.RegisterInputType(reflect.TypeOf((*RoomArrayInput)(nil)).Elem(), RoomArray{})
   384  	pulumi.RegisterInputType(reflect.TypeOf((*RoomMapInput)(nil)).Elem(), RoomMap{})
   385  	pulumi.RegisterOutputType(RoomOutput{})
   386  	pulumi.RegisterOutputType(RoomArrayOutput{})
   387  	pulumi.RegisterOutputType(RoomMapOutput{})
   388  }