github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/kinesis/videoStream.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 kinesis
     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 Kinesis Video Stream resource. Amazon Kinesis Video Streams makes it easy to securely stream video from connected devices to AWS for analytics, machine learning (ML), playback, and other processing.
    15  //
    16  // For more details, see the [Amazon Kinesis Documentation](https://aws.amazon.com/documentation/kinesis/).
    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/kinesis"
    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 := kinesis.NewVideoStream(ctx, "default", &kinesis.VideoStreamArgs{
    34  //				Name:                 pulumi.String("kinesis-video-stream"),
    35  //				DataRetentionInHours: pulumi.Int(1),
    36  //				DeviceName:           pulumi.String("kinesis-video-device-name"),
    37  //				MediaType:            pulumi.String("video/h264"),
    38  //				Tags: pulumi.StringMap{
    39  //					"Name": pulumi.String("kinesis-video-stream"),
    40  //				},
    41  //			})
    42  //			if err != nil {
    43  //				return err
    44  //			}
    45  //			return nil
    46  //		})
    47  //	}
    48  //
    49  // ```
    50  // <!--End PulumiCodeChooser -->
    51  //
    52  // ## Import
    53  //
    54  // Using `pulumi import`, import Kinesis Streams using the `arn`. For example:
    55  //
    56  // ```sh
    57  // $ pulumi import aws:kinesis/videoStream:VideoStream test_stream arn:aws:kinesisvideo:us-west-2:123456789012:stream/pulumi-kinesis-test/1554978910975
    58  // ```
    59  type VideoStream struct {
    60  	pulumi.CustomResourceState
    61  
    62  	// The Amazon Resource Name (ARN) specifying the Stream (same as `id`)
    63  	Arn pulumi.StringOutput `pulumi:"arn"`
    64  	// A time stamp that indicates when the stream was created.
    65  	CreationTime pulumi.StringOutput `pulumi:"creationTime"`
    66  	// The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is `0`, indicating that the stream does not persist data.
    67  	DataRetentionInHours pulumi.IntPtrOutput `pulumi:"dataRetentionInHours"`
    68  	// The name of the device that is writing to the stream. **In the current implementation, Kinesis Video Streams does not use this name.**
    69  	DeviceName pulumi.StringPtrOutput `pulumi:"deviceName"`
    70  	// The ID of the AWS Key Management Service (AWS KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (`aws/kinesisvideo`) is used.
    71  	KmsKeyId pulumi.StringOutput `pulumi:"kmsKeyId"`
    72  	// The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see [Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml). If you choose to specify the MediaType, see [Naming Requirements](https://tools.ietf.org/html/rfc6838#section-4.2) for guidelines.
    73  	MediaType pulumi.StringPtrOutput `pulumi:"mediaType"`
    74  	// A name to identify the stream. This is unique to the
    75  	// AWS account and region the Stream is created in.
    76  	Name pulumi.StringOutput `pulumi:"name"`
    77  	// 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.
    78  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    79  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    80  	//
    81  	// Deprecated: Please use `tags` instead.
    82  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    83  	// The version of the stream.
    84  	Version pulumi.StringOutput `pulumi:"version"`
    85  }
    86  
    87  // NewVideoStream registers a new resource with the given unique name, arguments, and options.
    88  func NewVideoStream(ctx *pulumi.Context,
    89  	name string, args *VideoStreamArgs, opts ...pulumi.ResourceOption) (*VideoStream, error) {
    90  	if args == nil {
    91  		args = &VideoStreamArgs{}
    92  	}
    93  
    94  	opts = internal.PkgResourceDefaultOpts(opts)
    95  	var resource VideoStream
    96  	err := ctx.RegisterResource("aws:kinesis/videoStream:VideoStream", name, args, &resource, opts...)
    97  	if err != nil {
    98  		return nil, err
    99  	}
   100  	return &resource, nil
   101  }
   102  
   103  // GetVideoStream gets an existing VideoStream resource's state with the given name, ID, and optional
   104  // state properties that are used to uniquely qualify the lookup (nil if not required).
   105  func GetVideoStream(ctx *pulumi.Context,
   106  	name string, id pulumi.IDInput, state *VideoStreamState, opts ...pulumi.ResourceOption) (*VideoStream, error) {
   107  	var resource VideoStream
   108  	err := ctx.ReadResource("aws:kinesis/videoStream:VideoStream", name, id, state, &resource, opts...)
   109  	if err != nil {
   110  		return nil, err
   111  	}
   112  	return &resource, nil
   113  }
   114  
   115  // Input properties used for looking up and filtering VideoStream resources.
   116  type videoStreamState struct {
   117  	// The Amazon Resource Name (ARN) specifying the Stream (same as `id`)
   118  	Arn *string `pulumi:"arn"`
   119  	// A time stamp that indicates when the stream was created.
   120  	CreationTime *string `pulumi:"creationTime"`
   121  	// The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is `0`, indicating that the stream does not persist data.
   122  	DataRetentionInHours *int `pulumi:"dataRetentionInHours"`
   123  	// The name of the device that is writing to the stream. **In the current implementation, Kinesis Video Streams does not use this name.**
   124  	DeviceName *string `pulumi:"deviceName"`
   125  	// The ID of the AWS Key Management Service (AWS KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (`aws/kinesisvideo`) is used.
   126  	KmsKeyId *string `pulumi:"kmsKeyId"`
   127  	// The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see [Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml). If you choose to specify the MediaType, see [Naming Requirements](https://tools.ietf.org/html/rfc6838#section-4.2) for guidelines.
   128  	MediaType *string `pulumi:"mediaType"`
   129  	// A name to identify the stream. This is unique to the
   130  	// AWS account and region the Stream is created in.
   131  	Name *string `pulumi:"name"`
   132  	// 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.
   133  	Tags map[string]string `pulumi:"tags"`
   134  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   135  	//
   136  	// Deprecated: Please use `tags` instead.
   137  	TagsAll map[string]string `pulumi:"tagsAll"`
   138  	// The version of the stream.
   139  	Version *string `pulumi:"version"`
   140  }
   141  
   142  type VideoStreamState struct {
   143  	// The Amazon Resource Name (ARN) specifying the Stream (same as `id`)
   144  	Arn pulumi.StringPtrInput
   145  	// A time stamp that indicates when the stream was created.
   146  	CreationTime pulumi.StringPtrInput
   147  	// The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is `0`, indicating that the stream does not persist data.
   148  	DataRetentionInHours pulumi.IntPtrInput
   149  	// The name of the device that is writing to the stream. **In the current implementation, Kinesis Video Streams does not use this name.**
   150  	DeviceName pulumi.StringPtrInput
   151  	// The ID of the AWS Key Management Service (AWS KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (`aws/kinesisvideo`) is used.
   152  	KmsKeyId pulumi.StringPtrInput
   153  	// The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see [Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml). If you choose to specify the MediaType, see [Naming Requirements](https://tools.ietf.org/html/rfc6838#section-4.2) for guidelines.
   154  	MediaType pulumi.StringPtrInput
   155  	// A name to identify the stream. This is unique to the
   156  	// AWS account and region the Stream is created in.
   157  	Name pulumi.StringPtrInput
   158  	// 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.
   159  	Tags pulumi.StringMapInput
   160  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   161  	//
   162  	// Deprecated: Please use `tags` instead.
   163  	TagsAll pulumi.StringMapInput
   164  	// The version of the stream.
   165  	Version pulumi.StringPtrInput
   166  }
   167  
   168  func (VideoStreamState) ElementType() reflect.Type {
   169  	return reflect.TypeOf((*videoStreamState)(nil)).Elem()
   170  }
   171  
   172  type videoStreamArgs struct {
   173  	// The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is `0`, indicating that the stream does not persist data.
   174  	DataRetentionInHours *int `pulumi:"dataRetentionInHours"`
   175  	// The name of the device that is writing to the stream. **In the current implementation, Kinesis Video Streams does not use this name.**
   176  	DeviceName *string `pulumi:"deviceName"`
   177  	// The ID of the AWS Key Management Service (AWS KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (`aws/kinesisvideo`) is used.
   178  	KmsKeyId *string `pulumi:"kmsKeyId"`
   179  	// The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see [Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml). If you choose to specify the MediaType, see [Naming Requirements](https://tools.ietf.org/html/rfc6838#section-4.2) for guidelines.
   180  	MediaType *string `pulumi:"mediaType"`
   181  	// A name to identify the stream. This is unique to the
   182  	// AWS account and region the Stream is created in.
   183  	Name *string `pulumi:"name"`
   184  	// 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.
   185  	Tags map[string]string `pulumi:"tags"`
   186  }
   187  
   188  // The set of arguments for constructing a VideoStream resource.
   189  type VideoStreamArgs struct {
   190  	// The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is `0`, indicating that the stream does not persist data.
   191  	DataRetentionInHours pulumi.IntPtrInput
   192  	// The name of the device that is writing to the stream. **In the current implementation, Kinesis Video Streams does not use this name.**
   193  	DeviceName pulumi.StringPtrInput
   194  	// The ID of the AWS Key Management Service (AWS KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (`aws/kinesisvideo`) is used.
   195  	KmsKeyId pulumi.StringPtrInput
   196  	// The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see [Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml). If you choose to specify the MediaType, see [Naming Requirements](https://tools.ietf.org/html/rfc6838#section-4.2) for guidelines.
   197  	MediaType pulumi.StringPtrInput
   198  	// A name to identify the stream. This is unique to the
   199  	// AWS account and region the Stream is created in.
   200  	Name pulumi.StringPtrInput
   201  	// 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.
   202  	Tags pulumi.StringMapInput
   203  }
   204  
   205  func (VideoStreamArgs) ElementType() reflect.Type {
   206  	return reflect.TypeOf((*videoStreamArgs)(nil)).Elem()
   207  }
   208  
   209  type VideoStreamInput interface {
   210  	pulumi.Input
   211  
   212  	ToVideoStreamOutput() VideoStreamOutput
   213  	ToVideoStreamOutputWithContext(ctx context.Context) VideoStreamOutput
   214  }
   215  
   216  func (*VideoStream) ElementType() reflect.Type {
   217  	return reflect.TypeOf((**VideoStream)(nil)).Elem()
   218  }
   219  
   220  func (i *VideoStream) ToVideoStreamOutput() VideoStreamOutput {
   221  	return i.ToVideoStreamOutputWithContext(context.Background())
   222  }
   223  
   224  func (i *VideoStream) ToVideoStreamOutputWithContext(ctx context.Context) VideoStreamOutput {
   225  	return pulumi.ToOutputWithContext(ctx, i).(VideoStreamOutput)
   226  }
   227  
   228  // VideoStreamArrayInput is an input type that accepts VideoStreamArray and VideoStreamArrayOutput values.
   229  // You can construct a concrete instance of `VideoStreamArrayInput` via:
   230  //
   231  //	VideoStreamArray{ VideoStreamArgs{...} }
   232  type VideoStreamArrayInput interface {
   233  	pulumi.Input
   234  
   235  	ToVideoStreamArrayOutput() VideoStreamArrayOutput
   236  	ToVideoStreamArrayOutputWithContext(context.Context) VideoStreamArrayOutput
   237  }
   238  
   239  type VideoStreamArray []VideoStreamInput
   240  
   241  func (VideoStreamArray) ElementType() reflect.Type {
   242  	return reflect.TypeOf((*[]*VideoStream)(nil)).Elem()
   243  }
   244  
   245  func (i VideoStreamArray) ToVideoStreamArrayOutput() VideoStreamArrayOutput {
   246  	return i.ToVideoStreamArrayOutputWithContext(context.Background())
   247  }
   248  
   249  func (i VideoStreamArray) ToVideoStreamArrayOutputWithContext(ctx context.Context) VideoStreamArrayOutput {
   250  	return pulumi.ToOutputWithContext(ctx, i).(VideoStreamArrayOutput)
   251  }
   252  
   253  // VideoStreamMapInput is an input type that accepts VideoStreamMap and VideoStreamMapOutput values.
   254  // You can construct a concrete instance of `VideoStreamMapInput` via:
   255  //
   256  //	VideoStreamMap{ "key": VideoStreamArgs{...} }
   257  type VideoStreamMapInput interface {
   258  	pulumi.Input
   259  
   260  	ToVideoStreamMapOutput() VideoStreamMapOutput
   261  	ToVideoStreamMapOutputWithContext(context.Context) VideoStreamMapOutput
   262  }
   263  
   264  type VideoStreamMap map[string]VideoStreamInput
   265  
   266  func (VideoStreamMap) ElementType() reflect.Type {
   267  	return reflect.TypeOf((*map[string]*VideoStream)(nil)).Elem()
   268  }
   269  
   270  func (i VideoStreamMap) ToVideoStreamMapOutput() VideoStreamMapOutput {
   271  	return i.ToVideoStreamMapOutputWithContext(context.Background())
   272  }
   273  
   274  func (i VideoStreamMap) ToVideoStreamMapOutputWithContext(ctx context.Context) VideoStreamMapOutput {
   275  	return pulumi.ToOutputWithContext(ctx, i).(VideoStreamMapOutput)
   276  }
   277  
   278  type VideoStreamOutput struct{ *pulumi.OutputState }
   279  
   280  func (VideoStreamOutput) ElementType() reflect.Type {
   281  	return reflect.TypeOf((**VideoStream)(nil)).Elem()
   282  }
   283  
   284  func (o VideoStreamOutput) ToVideoStreamOutput() VideoStreamOutput {
   285  	return o
   286  }
   287  
   288  func (o VideoStreamOutput) ToVideoStreamOutputWithContext(ctx context.Context) VideoStreamOutput {
   289  	return o
   290  }
   291  
   292  // The Amazon Resource Name (ARN) specifying the Stream (same as `id`)
   293  func (o VideoStreamOutput) Arn() pulumi.StringOutput {
   294  	return o.ApplyT(func(v *VideoStream) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   295  }
   296  
   297  // A time stamp that indicates when the stream was created.
   298  func (o VideoStreamOutput) CreationTime() pulumi.StringOutput {
   299  	return o.ApplyT(func(v *VideoStream) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput)
   300  }
   301  
   302  // The number of hours that you want to retain the data in the stream. Kinesis Video Streams retains the data in a data store that is associated with the stream. The default value is `0`, indicating that the stream does not persist data.
   303  func (o VideoStreamOutput) DataRetentionInHours() pulumi.IntPtrOutput {
   304  	return o.ApplyT(func(v *VideoStream) pulumi.IntPtrOutput { return v.DataRetentionInHours }).(pulumi.IntPtrOutput)
   305  }
   306  
   307  // The name of the device that is writing to the stream. **In the current implementation, Kinesis Video Streams does not use this name.**
   308  func (o VideoStreamOutput) DeviceName() pulumi.StringPtrOutput {
   309  	return o.ApplyT(func(v *VideoStream) pulumi.StringPtrOutput { return v.DeviceName }).(pulumi.StringPtrOutput)
   310  }
   311  
   312  // The ID of the AWS Key Management Service (AWS KMS) key that you want Kinesis Video Streams to use to encrypt stream data. If no key ID is specified, the default, Kinesis Video-managed key (`aws/kinesisvideo`) is used.
   313  func (o VideoStreamOutput) KmsKeyId() pulumi.StringOutput {
   314  	return o.ApplyT(func(v *VideoStream) pulumi.StringOutput { return v.KmsKeyId }).(pulumi.StringOutput)
   315  }
   316  
   317  // The media type of the stream. Consumers of the stream can use this information when processing the stream. For more information about media types, see [Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml). If you choose to specify the MediaType, see [Naming Requirements](https://tools.ietf.org/html/rfc6838#section-4.2) for guidelines.
   318  func (o VideoStreamOutput) MediaType() pulumi.StringPtrOutput {
   319  	return o.ApplyT(func(v *VideoStream) pulumi.StringPtrOutput { return v.MediaType }).(pulumi.StringPtrOutput)
   320  }
   321  
   322  // A name to identify the stream. This is unique to the
   323  // AWS account and region the Stream is created in.
   324  func (o VideoStreamOutput) Name() pulumi.StringOutput {
   325  	return o.ApplyT(func(v *VideoStream) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   326  }
   327  
   328  // 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.
   329  func (o VideoStreamOutput) Tags() pulumi.StringMapOutput {
   330  	return o.ApplyT(func(v *VideoStream) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   331  }
   332  
   333  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   334  //
   335  // Deprecated: Please use `tags` instead.
   336  func (o VideoStreamOutput) TagsAll() pulumi.StringMapOutput {
   337  	return o.ApplyT(func(v *VideoStream) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   338  }
   339  
   340  // The version of the stream.
   341  func (o VideoStreamOutput) Version() pulumi.StringOutput {
   342  	return o.ApplyT(func(v *VideoStream) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput)
   343  }
   344  
   345  type VideoStreamArrayOutput struct{ *pulumi.OutputState }
   346  
   347  func (VideoStreamArrayOutput) ElementType() reflect.Type {
   348  	return reflect.TypeOf((*[]*VideoStream)(nil)).Elem()
   349  }
   350  
   351  func (o VideoStreamArrayOutput) ToVideoStreamArrayOutput() VideoStreamArrayOutput {
   352  	return o
   353  }
   354  
   355  func (o VideoStreamArrayOutput) ToVideoStreamArrayOutputWithContext(ctx context.Context) VideoStreamArrayOutput {
   356  	return o
   357  }
   358  
   359  func (o VideoStreamArrayOutput) Index(i pulumi.IntInput) VideoStreamOutput {
   360  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VideoStream {
   361  		return vs[0].([]*VideoStream)[vs[1].(int)]
   362  	}).(VideoStreamOutput)
   363  }
   364  
   365  type VideoStreamMapOutput struct{ *pulumi.OutputState }
   366  
   367  func (VideoStreamMapOutput) ElementType() reflect.Type {
   368  	return reflect.TypeOf((*map[string]*VideoStream)(nil)).Elem()
   369  }
   370  
   371  func (o VideoStreamMapOutput) ToVideoStreamMapOutput() VideoStreamMapOutput {
   372  	return o
   373  }
   374  
   375  func (o VideoStreamMapOutput) ToVideoStreamMapOutputWithContext(ctx context.Context) VideoStreamMapOutput {
   376  	return o
   377  }
   378  
   379  func (o VideoStreamMapOutput) MapIndex(k pulumi.StringInput) VideoStreamOutput {
   380  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VideoStream {
   381  		return vs[0].(map[string]*VideoStream)[vs[1].(string)]
   382  	}).(VideoStreamOutput)
   383  }
   384  
   385  func init() {
   386  	pulumi.RegisterInputType(reflect.TypeOf((*VideoStreamInput)(nil)).Elem(), &VideoStream{})
   387  	pulumi.RegisterInputType(reflect.TypeOf((*VideoStreamArrayInput)(nil)).Elem(), VideoStreamArray{})
   388  	pulumi.RegisterInputType(reflect.TypeOf((*VideoStreamMapInput)(nil)).Elem(), VideoStreamMap{})
   389  	pulumi.RegisterOutputType(VideoStreamOutput{})
   390  	pulumi.RegisterOutputType(VideoStreamArrayOutput{})
   391  	pulumi.RegisterOutputType(VideoStreamMapOutput{})
   392  }