github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ivs/recordingConfiguration.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 ivs 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 IVS (Interactive Video) Recording Configuration. 16 // 17 // ## Example Usage 18 // 19 // ### Basic Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ivs" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := ivs.NewRecordingConfiguration(ctx, "example", &ivs.RecordingConfigurationArgs{ 35 // Name: pulumi.String("recording_configuration-1"), 36 // DestinationConfiguration: &ivs.RecordingConfigurationDestinationConfigurationArgs{ 37 // S3: &ivs.RecordingConfigurationDestinationConfigurationS3Args{ 38 // BucketName: pulumi.String("ivs-stream-archive"), 39 // }, 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 IVS (Interactive Video) Recording Configuration using the ARN. For example: 55 // 56 // ```sh 57 // $ pulumi import aws:ivs/recordingConfiguration:RecordingConfiguration example arn:aws:ivs:us-west-2:326937407773:recording-configuration/KAk1sHBl2L47 58 // ``` 59 type RecordingConfiguration struct { 60 pulumi.CustomResourceState 61 62 // ARN of the Recording Configuration. 63 Arn pulumi.StringOutput `pulumi:"arn"` 64 // Object containing destination configuration for where recorded video will be stored. 65 DestinationConfiguration RecordingConfigurationDestinationConfigurationOutput `pulumi:"destinationConfiguration"` 66 // Recording Configuration name. 67 Name pulumi.StringOutput `pulumi:"name"` 68 // If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. 69 RecordingReconnectWindowSeconds pulumi.IntOutput `pulumi:"recordingReconnectWindowSeconds"` 70 // The current state of the Recording Configuration. 71 State pulumi.StringOutput `pulumi:"state"` 72 // 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. 73 Tags pulumi.StringMapOutput `pulumi:"tags"` 74 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 75 // 76 // Deprecated: Please use `tags` instead. 77 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 78 // Object containing information to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session. 79 ThumbnailConfiguration RecordingConfigurationThumbnailConfigurationOutput `pulumi:"thumbnailConfiguration"` 80 } 81 82 // NewRecordingConfiguration registers a new resource with the given unique name, arguments, and options. 83 func NewRecordingConfiguration(ctx *pulumi.Context, 84 name string, args *RecordingConfigurationArgs, opts ...pulumi.ResourceOption) (*RecordingConfiguration, error) { 85 if args == nil { 86 return nil, errors.New("missing one or more required arguments") 87 } 88 89 if args.DestinationConfiguration == nil { 90 return nil, errors.New("invalid value for required argument 'DestinationConfiguration'") 91 } 92 opts = internal.PkgResourceDefaultOpts(opts) 93 var resource RecordingConfiguration 94 err := ctx.RegisterResource("aws:ivs/recordingConfiguration:RecordingConfiguration", name, args, &resource, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return &resource, nil 99 } 100 101 // GetRecordingConfiguration gets an existing RecordingConfiguration resource's state with the given name, ID, and optional 102 // state properties that are used to uniquely qualify the lookup (nil if not required). 103 func GetRecordingConfiguration(ctx *pulumi.Context, 104 name string, id pulumi.IDInput, state *RecordingConfigurationState, opts ...pulumi.ResourceOption) (*RecordingConfiguration, error) { 105 var resource RecordingConfiguration 106 err := ctx.ReadResource("aws:ivs/recordingConfiguration:RecordingConfiguration", name, id, state, &resource, opts...) 107 if err != nil { 108 return nil, err 109 } 110 return &resource, nil 111 } 112 113 // Input properties used for looking up and filtering RecordingConfiguration resources. 114 type recordingConfigurationState struct { 115 // ARN of the Recording Configuration. 116 Arn *string `pulumi:"arn"` 117 // Object containing destination configuration for where recorded video will be stored. 118 DestinationConfiguration *RecordingConfigurationDestinationConfiguration `pulumi:"destinationConfiguration"` 119 // Recording Configuration name. 120 Name *string `pulumi:"name"` 121 // If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. 122 RecordingReconnectWindowSeconds *int `pulumi:"recordingReconnectWindowSeconds"` 123 // The current state of the Recording Configuration. 124 State *string `pulumi:"state"` 125 // 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. 126 Tags map[string]string `pulumi:"tags"` 127 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 128 // 129 // Deprecated: Please use `tags` instead. 130 TagsAll map[string]string `pulumi:"tagsAll"` 131 // Object containing information to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session. 132 ThumbnailConfiguration *RecordingConfigurationThumbnailConfiguration `pulumi:"thumbnailConfiguration"` 133 } 134 135 type RecordingConfigurationState struct { 136 // ARN of the Recording Configuration. 137 Arn pulumi.StringPtrInput 138 // Object containing destination configuration for where recorded video will be stored. 139 DestinationConfiguration RecordingConfigurationDestinationConfigurationPtrInput 140 // Recording Configuration name. 141 Name pulumi.StringPtrInput 142 // If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. 143 RecordingReconnectWindowSeconds pulumi.IntPtrInput 144 // The current state of the Recording Configuration. 145 State pulumi.StringPtrInput 146 // 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. 147 Tags pulumi.StringMapInput 148 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 149 // 150 // Deprecated: Please use `tags` instead. 151 TagsAll pulumi.StringMapInput 152 // Object containing information to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session. 153 ThumbnailConfiguration RecordingConfigurationThumbnailConfigurationPtrInput 154 } 155 156 func (RecordingConfigurationState) ElementType() reflect.Type { 157 return reflect.TypeOf((*recordingConfigurationState)(nil)).Elem() 158 } 159 160 type recordingConfigurationArgs struct { 161 // Object containing destination configuration for where recorded video will be stored. 162 DestinationConfiguration RecordingConfigurationDestinationConfiguration `pulumi:"destinationConfiguration"` 163 // Recording Configuration name. 164 Name *string `pulumi:"name"` 165 // If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. 166 RecordingReconnectWindowSeconds *int `pulumi:"recordingReconnectWindowSeconds"` 167 // 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. 168 Tags map[string]string `pulumi:"tags"` 169 // Object containing information to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session. 170 ThumbnailConfiguration *RecordingConfigurationThumbnailConfiguration `pulumi:"thumbnailConfiguration"` 171 } 172 173 // The set of arguments for constructing a RecordingConfiguration resource. 174 type RecordingConfigurationArgs struct { 175 // Object containing destination configuration for where recorded video will be stored. 176 DestinationConfiguration RecordingConfigurationDestinationConfigurationInput 177 // Recording Configuration name. 178 Name pulumi.StringPtrInput 179 // If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. 180 RecordingReconnectWindowSeconds pulumi.IntPtrInput 181 // 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. 182 Tags pulumi.StringMapInput 183 // Object containing information to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session. 184 ThumbnailConfiguration RecordingConfigurationThumbnailConfigurationPtrInput 185 } 186 187 func (RecordingConfigurationArgs) ElementType() reflect.Type { 188 return reflect.TypeOf((*recordingConfigurationArgs)(nil)).Elem() 189 } 190 191 type RecordingConfigurationInput interface { 192 pulumi.Input 193 194 ToRecordingConfigurationOutput() RecordingConfigurationOutput 195 ToRecordingConfigurationOutputWithContext(ctx context.Context) RecordingConfigurationOutput 196 } 197 198 func (*RecordingConfiguration) ElementType() reflect.Type { 199 return reflect.TypeOf((**RecordingConfiguration)(nil)).Elem() 200 } 201 202 func (i *RecordingConfiguration) ToRecordingConfigurationOutput() RecordingConfigurationOutput { 203 return i.ToRecordingConfigurationOutputWithContext(context.Background()) 204 } 205 206 func (i *RecordingConfiguration) ToRecordingConfigurationOutputWithContext(ctx context.Context) RecordingConfigurationOutput { 207 return pulumi.ToOutputWithContext(ctx, i).(RecordingConfigurationOutput) 208 } 209 210 // RecordingConfigurationArrayInput is an input type that accepts RecordingConfigurationArray and RecordingConfigurationArrayOutput values. 211 // You can construct a concrete instance of `RecordingConfigurationArrayInput` via: 212 // 213 // RecordingConfigurationArray{ RecordingConfigurationArgs{...} } 214 type RecordingConfigurationArrayInput interface { 215 pulumi.Input 216 217 ToRecordingConfigurationArrayOutput() RecordingConfigurationArrayOutput 218 ToRecordingConfigurationArrayOutputWithContext(context.Context) RecordingConfigurationArrayOutput 219 } 220 221 type RecordingConfigurationArray []RecordingConfigurationInput 222 223 func (RecordingConfigurationArray) ElementType() reflect.Type { 224 return reflect.TypeOf((*[]*RecordingConfiguration)(nil)).Elem() 225 } 226 227 func (i RecordingConfigurationArray) ToRecordingConfigurationArrayOutput() RecordingConfigurationArrayOutput { 228 return i.ToRecordingConfigurationArrayOutputWithContext(context.Background()) 229 } 230 231 func (i RecordingConfigurationArray) ToRecordingConfigurationArrayOutputWithContext(ctx context.Context) RecordingConfigurationArrayOutput { 232 return pulumi.ToOutputWithContext(ctx, i).(RecordingConfigurationArrayOutput) 233 } 234 235 // RecordingConfigurationMapInput is an input type that accepts RecordingConfigurationMap and RecordingConfigurationMapOutput values. 236 // You can construct a concrete instance of `RecordingConfigurationMapInput` via: 237 // 238 // RecordingConfigurationMap{ "key": RecordingConfigurationArgs{...} } 239 type RecordingConfigurationMapInput interface { 240 pulumi.Input 241 242 ToRecordingConfigurationMapOutput() RecordingConfigurationMapOutput 243 ToRecordingConfigurationMapOutputWithContext(context.Context) RecordingConfigurationMapOutput 244 } 245 246 type RecordingConfigurationMap map[string]RecordingConfigurationInput 247 248 func (RecordingConfigurationMap) ElementType() reflect.Type { 249 return reflect.TypeOf((*map[string]*RecordingConfiguration)(nil)).Elem() 250 } 251 252 func (i RecordingConfigurationMap) ToRecordingConfigurationMapOutput() RecordingConfigurationMapOutput { 253 return i.ToRecordingConfigurationMapOutputWithContext(context.Background()) 254 } 255 256 func (i RecordingConfigurationMap) ToRecordingConfigurationMapOutputWithContext(ctx context.Context) RecordingConfigurationMapOutput { 257 return pulumi.ToOutputWithContext(ctx, i).(RecordingConfigurationMapOutput) 258 } 259 260 type RecordingConfigurationOutput struct{ *pulumi.OutputState } 261 262 func (RecordingConfigurationOutput) ElementType() reflect.Type { 263 return reflect.TypeOf((**RecordingConfiguration)(nil)).Elem() 264 } 265 266 func (o RecordingConfigurationOutput) ToRecordingConfigurationOutput() RecordingConfigurationOutput { 267 return o 268 } 269 270 func (o RecordingConfigurationOutput) ToRecordingConfigurationOutputWithContext(ctx context.Context) RecordingConfigurationOutput { 271 return o 272 } 273 274 // ARN of the Recording Configuration. 275 func (o RecordingConfigurationOutput) Arn() pulumi.StringOutput { 276 return o.ApplyT(func(v *RecordingConfiguration) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 277 } 278 279 // Object containing destination configuration for where recorded video will be stored. 280 func (o RecordingConfigurationOutput) DestinationConfiguration() RecordingConfigurationDestinationConfigurationOutput { 281 return o.ApplyT(func(v *RecordingConfiguration) RecordingConfigurationDestinationConfigurationOutput { 282 return v.DestinationConfiguration 283 }).(RecordingConfigurationDestinationConfigurationOutput) 284 } 285 286 // Recording Configuration name. 287 func (o RecordingConfigurationOutput) Name() pulumi.StringOutput { 288 return o.ApplyT(func(v *RecordingConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 289 } 290 291 // If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. 292 func (o RecordingConfigurationOutput) RecordingReconnectWindowSeconds() pulumi.IntOutput { 293 return o.ApplyT(func(v *RecordingConfiguration) pulumi.IntOutput { return v.RecordingReconnectWindowSeconds }).(pulumi.IntOutput) 294 } 295 296 // The current state of the Recording Configuration. 297 func (o RecordingConfigurationOutput) State() pulumi.StringOutput { 298 return o.ApplyT(func(v *RecordingConfiguration) pulumi.StringOutput { return v.State }).(pulumi.StringOutput) 299 } 300 301 // 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. 302 func (o RecordingConfigurationOutput) Tags() pulumi.StringMapOutput { 303 return o.ApplyT(func(v *RecordingConfiguration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 304 } 305 306 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 307 // 308 // Deprecated: Please use `tags` instead. 309 func (o RecordingConfigurationOutput) TagsAll() pulumi.StringMapOutput { 310 return o.ApplyT(func(v *RecordingConfiguration) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 311 } 312 313 // Object containing information to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session. 314 func (o RecordingConfigurationOutput) ThumbnailConfiguration() RecordingConfigurationThumbnailConfigurationOutput { 315 return o.ApplyT(func(v *RecordingConfiguration) RecordingConfigurationThumbnailConfigurationOutput { 316 return v.ThumbnailConfiguration 317 }).(RecordingConfigurationThumbnailConfigurationOutput) 318 } 319 320 type RecordingConfigurationArrayOutput struct{ *pulumi.OutputState } 321 322 func (RecordingConfigurationArrayOutput) ElementType() reflect.Type { 323 return reflect.TypeOf((*[]*RecordingConfiguration)(nil)).Elem() 324 } 325 326 func (o RecordingConfigurationArrayOutput) ToRecordingConfigurationArrayOutput() RecordingConfigurationArrayOutput { 327 return o 328 } 329 330 func (o RecordingConfigurationArrayOutput) ToRecordingConfigurationArrayOutputWithContext(ctx context.Context) RecordingConfigurationArrayOutput { 331 return o 332 } 333 334 func (o RecordingConfigurationArrayOutput) Index(i pulumi.IntInput) RecordingConfigurationOutput { 335 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RecordingConfiguration { 336 return vs[0].([]*RecordingConfiguration)[vs[1].(int)] 337 }).(RecordingConfigurationOutput) 338 } 339 340 type RecordingConfigurationMapOutput struct{ *pulumi.OutputState } 341 342 func (RecordingConfigurationMapOutput) ElementType() reflect.Type { 343 return reflect.TypeOf((*map[string]*RecordingConfiguration)(nil)).Elem() 344 } 345 346 func (o RecordingConfigurationMapOutput) ToRecordingConfigurationMapOutput() RecordingConfigurationMapOutput { 347 return o 348 } 349 350 func (o RecordingConfigurationMapOutput) ToRecordingConfigurationMapOutputWithContext(ctx context.Context) RecordingConfigurationMapOutput { 351 return o 352 } 353 354 func (o RecordingConfigurationMapOutput) MapIndex(k pulumi.StringInput) RecordingConfigurationOutput { 355 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RecordingConfiguration { 356 return vs[0].(map[string]*RecordingConfiguration)[vs[1].(string)] 357 }).(RecordingConfigurationOutput) 358 } 359 360 func init() { 361 pulumi.RegisterInputType(reflect.TypeOf((*RecordingConfigurationInput)(nil)).Elem(), &RecordingConfiguration{}) 362 pulumi.RegisterInputType(reflect.TypeOf((*RecordingConfigurationArrayInput)(nil)).Elem(), RecordingConfigurationArray{}) 363 pulumi.RegisterInputType(reflect.TypeOf((*RecordingConfigurationMapInput)(nil)).Elem(), RecordingConfigurationMap{}) 364 pulumi.RegisterOutputType(RecordingConfigurationOutput{}) 365 pulumi.RegisterOutputType(RecordingConfigurationArrayOutput{}) 366 pulumi.RegisterOutputType(RecordingConfigurationMapOutput{}) 367 }