github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/medialive/input.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 medialive 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 MediaLive Input. 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/medialive" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // example, err := medialive.NewInputSecurityGroup(ctx, "example", &medialive.InputSecurityGroupArgs{ 35 // WhitelistRules: medialive.InputSecurityGroupWhitelistRuleArray{ 36 // &medialive.InputSecurityGroupWhitelistRuleArgs{ 37 // Cidr: pulumi.String("10.0.0.8/32"), 38 // }, 39 // }, 40 // Tags: pulumi.StringMap{ 41 // "ENVIRONMENT": pulumi.String("prod"), 42 // }, 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // _, err = medialive.NewInput(ctx, "example", &medialive.InputArgs{ 48 // Name: pulumi.String("example-input"), 49 // InputSecurityGroups: pulumi.StringArray{ 50 // example.ID(), 51 // }, 52 // Type: pulumi.String("UDP_PUSH"), 53 // Tags: pulumi.StringMap{ 54 // "ENVIRONMENT": pulumi.String("prod"), 55 // }, 56 // }) 57 // if err != nil { 58 // return err 59 // } 60 // return nil 61 // }) 62 // } 63 // 64 // ``` 65 // <!--End PulumiCodeChooser --> 66 // 67 // ## Import 68 // 69 // Using `pulumi import`, import MediaLive Input using the `id`. For example: 70 // 71 // ```sh 72 // $ pulumi import aws:medialive/input:Input example 12345678 73 // ``` 74 type Input struct { 75 pulumi.CustomResourceState 76 77 // ARN of the Input. 78 Arn pulumi.StringOutput `pulumi:"arn"` 79 // Channels attached to Input. 80 AttachedChannels pulumi.StringArrayOutput `pulumi:"attachedChannels"` 81 // Destination settings for PUSH type inputs. See Destinations for more details. 82 Destinations InputDestinationArrayOutput `pulumi:"destinations"` 83 // The input class. 84 InputClass pulumi.StringOutput `pulumi:"inputClass"` 85 // Settings for the devices. See Input Devices for more details. 86 InputDevices InputInputDeviceArrayOutput `pulumi:"inputDevices"` 87 // A list of IDs for all Inputs which are partners of this one. 88 InputPartnerIds pulumi.StringArrayOutput `pulumi:"inputPartnerIds"` 89 // List of input security groups. 90 InputSecurityGroups pulumi.StringArrayOutput `pulumi:"inputSecurityGroups"` 91 // Source type of the input. 92 InputSourceType pulumi.StringOutput `pulumi:"inputSourceType"` 93 // A list of the MediaConnect Flows. See Media Connect Flows for more details. 94 MediaConnectFlows InputMediaConnectFlowArrayOutput `pulumi:"mediaConnectFlows"` 95 // Name of the input. 96 Name pulumi.StringOutput `pulumi:"name"` 97 // The ARN of the role this input assumes during and after creation. 98 RoleArn pulumi.StringOutput `pulumi:"roleArn"` 99 // The source URLs for a PULL-type input. See Sources for more details. 100 Sources InputSourceArrayOutput `pulumi:"sources"` 101 // A map of tags to assign to the Input. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 102 Tags pulumi.StringMapOutput `pulumi:"tags"` 103 // Deprecated: Please use `tags` instead. 104 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 105 // The different types of inputs that AWS Elemental MediaLive supports. 106 // 107 // The following arguments are optional: 108 Type pulumi.StringOutput `pulumi:"type"` 109 // Settings for a private VPC Input. See VPC for more details. 110 Vpc InputVpcPtrOutput `pulumi:"vpc"` 111 } 112 113 // NewInput registers a new resource with the given unique name, arguments, and options. 114 func NewInput(ctx *pulumi.Context, 115 name string, args *InputArgs, opts ...pulumi.ResourceOption) (*Input, error) { 116 if args == nil { 117 return nil, errors.New("missing one or more required arguments") 118 } 119 120 if args.Type == nil { 121 return nil, errors.New("invalid value for required argument 'Type'") 122 } 123 opts = internal.PkgResourceDefaultOpts(opts) 124 var resource Input 125 err := ctx.RegisterResource("aws:medialive/input:Input", name, args, &resource, opts...) 126 if err != nil { 127 return nil, err 128 } 129 return &resource, nil 130 } 131 132 // GetInput gets an existing Input resource's state with the given name, ID, and optional 133 // state properties that are used to uniquely qualify the lookup (nil if not required). 134 func GetInput(ctx *pulumi.Context, 135 name string, id pulumi.IDInput, state *InputState, opts ...pulumi.ResourceOption) (*Input, error) { 136 var resource Input 137 err := ctx.ReadResource("aws:medialive/input:Input", name, id, state, &resource, opts...) 138 if err != nil { 139 return nil, err 140 } 141 return &resource, nil 142 } 143 144 // Input properties used for looking up and filtering Input resources. 145 type inputState struct { 146 // ARN of the Input. 147 Arn *string `pulumi:"arn"` 148 // Channels attached to Input. 149 AttachedChannels []string `pulumi:"attachedChannels"` 150 // Destination settings for PUSH type inputs. See Destinations for more details. 151 Destinations []InputDestination `pulumi:"destinations"` 152 // The input class. 153 InputClass *string `pulumi:"inputClass"` 154 // Settings for the devices. See Input Devices for more details. 155 InputDevices []InputInputDevice `pulumi:"inputDevices"` 156 // A list of IDs for all Inputs which are partners of this one. 157 InputPartnerIds []string `pulumi:"inputPartnerIds"` 158 // List of input security groups. 159 InputSecurityGroups []string `pulumi:"inputSecurityGroups"` 160 // Source type of the input. 161 InputSourceType *string `pulumi:"inputSourceType"` 162 // A list of the MediaConnect Flows. See Media Connect Flows for more details. 163 MediaConnectFlows []InputMediaConnectFlow `pulumi:"mediaConnectFlows"` 164 // Name of the input. 165 Name *string `pulumi:"name"` 166 // The ARN of the role this input assumes during and after creation. 167 RoleArn *string `pulumi:"roleArn"` 168 // The source URLs for a PULL-type input. See Sources for more details. 169 Sources []InputSource `pulumi:"sources"` 170 // A map of tags to assign to the Input. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 171 Tags map[string]string `pulumi:"tags"` 172 // Deprecated: Please use `tags` instead. 173 TagsAll map[string]string `pulumi:"tagsAll"` 174 // The different types of inputs that AWS Elemental MediaLive supports. 175 // 176 // The following arguments are optional: 177 Type *string `pulumi:"type"` 178 // Settings for a private VPC Input. See VPC for more details. 179 Vpc *InputVpc `pulumi:"vpc"` 180 } 181 182 type InputState struct { 183 // ARN of the Input. 184 Arn pulumi.StringPtrInput 185 // Channels attached to Input. 186 AttachedChannels pulumi.StringArrayInput 187 // Destination settings for PUSH type inputs. See Destinations for more details. 188 Destinations InputDestinationArrayInput 189 // The input class. 190 InputClass pulumi.StringPtrInput 191 // Settings for the devices. See Input Devices for more details. 192 InputDevices InputInputDeviceArrayInput 193 // A list of IDs for all Inputs which are partners of this one. 194 InputPartnerIds pulumi.StringArrayInput 195 // List of input security groups. 196 InputSecurityGroups pulumi.StringArrayInput 197 // Source type of the input. 198 InputSourceType pulumi.StringPtrInput 199 // A list of the MediaConnect Flows. See Media Connect Flows for more details. 200 MediaConnectFlows InputMediaConnectFlowArrayInput 201 // Name of the input. 202 Name pulumi.StringPtrInput 203 // The ARN of the role this input assumes during and after creation. 204 RoleArn pulumi.StringPtrInput 205 // The source URLs for a PULL-type input. See Sources for more details. 206 Sources InputSourceArrayInput 207 // A map of tags to assign to the Input. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 208 Tags pulumi.StringMapInput 209 // Deprecated: Please use `tags` instead. 210 TagsAll pulumi.StringMapInput 211 // The different types of inputs that AWS Elemental MediaLive supports. 212 // 213 // The following arguments are optional: 214 Type pulumi.StringPtrInput 215 // Settings for a private VPC Input. See VPC for more details. 216 Vpc InputVpcPtrInput 217 } 218 219 func (InputState) ElementType() reflect.Type { 220 return reflect.TypeOf((*inputState)(nil)).Elem() 221 } 222 223 type inputArgs struct { 224 // Destination settings for PUSH type inputs. See Destinations for more details. 225 Destinations []InputDestination `pulumi:"destinations"` 226 // Settings for the devices. See Input Devices for more details. 227 InputDevices []InputInputDevice `pulumi:"inputDevices"` 228 // List of input security groups. 229 InputSecurityGroups []string `pulumi:"inputSecurityGroups"` 230 // A list of the MediaConnect Flows. See Media Connect Flows for more details. 231 MediaConnectFlows []InputMediaConnectFlow `pulumi:"mediaConnectFlows"` 232 // Name of the input. 233 Name *string `pulumi:"name"` 234 // The ARN of the role this input assumes during and after creation. 235 RoleArn *string `pulumi:"roleArn"` 236 // The source URLs for a PULL-type input. See Sources for more details. 237 Sources []InputSource `pulumi:"sources"` 238 // A map of tags to assign to the Input. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 239 Tags map[string]string `pulumi:"tags"` 240 // The different types of inputs that AWS Elemental MediaLive supports. 241 // 242 // The following arguments are optional: 243 Type string `pulumi:"type"` 244 // Settings for a private VPC Input. See VPC for more details. 245 Vpc *InputVpc `pulumi:"vpc"` 246 } 247 248 // The set of arguments for constructing a Input resource. 249 type InputArgs struct { 250 // Destination settings for PUSH type inputs. See Destinations for more details. 251 Destinations InputDestinationArrayInput 252 // Settings for the devices. See Input Devices for more details. 253 InputDevices InputInputDeviceArrayInput 254 // List of input security groups. 255 InputSecurityGroups pulumi.StringArrayInput 256 // A list of the MediaConnect Flows. See Media Connect Flows for more details. 257 MediaConnectFlows InputMediaConnectFlowArrayInput 258 // Name of the input. 259 Name pulumi.StringPtrInput 260 // The ARN of the role this input assumes during and after creation. 261 RoleArn pulumi.StringPtrInput 262 // The source URLs for a PULL-type input. See Sources for more details. 263 Sources InputSourceArrayInput 264 // A map of tags to assign to the Input. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 265 Tags pulumi.StringMapInput 266 // The different types of inputs that AWS Elemental MediaLive supports. 267 // 268 // The following arguments are optional: 269 Type pulumi.StringInput 270 // Settings for a private VPC Input. See VPC for more details. 271 Vpc InputVpcPtrInput 272 } 273 274 func (InputArgs) ElementType() reflect.Type { 275 return reflect.TypeOf((*inputArgs)(nil)).Elem() 276 } 277 278 type InputInput interface { 279 pulumi.Input 280 281 ToInputOutput() InputOutput 282 ToInputOutputWithContext(ctx context.Context) InputOutput 283 } 284 285 func (*Input) ElementType() reflect.Type { 286 return reflect.TypeOf((**Input)(nil)).Elem() 287 } 288 289 func (i *Input) ToInputOutput() InputOutput { 290 return i.ToInputOutputWithContext(context.Background()) 291 } 292 293 func (i *Input) ToInputOutputWithContext(ctx context.Context) InputOutput { 294 return pulumi.ToOutputWithContext(ctx, i).(InputOutput) 295 } 296 297 // InputArrayInput is an input type that accepts InputArray and InputArrayOutput values. 298 // You can construct a concrete instance of `InputArrayInput` via: 299 // 300 // InputArray{ InputArgs{...} } 301 type InputArrayInput interface { 302 pulumi.Input 303 304 ToInputArrayOutput() InputArrayOutput 305 ToInputArrayOutputWithContext(context.Context) InputArrayOutput 306 } 307 308 type InputArray []InputInput 309 310 func (InputArray) ElementType() reflect.Type { 311 return reflect.TypeOf((*[]*Input)(nil)).Elem() 312 } 313 314 func (i InputArray) ToInputArrayOutput() InputArrayOutput { 315 return i.ToInputArrayOutputWithContext(context.Background()) 316 } 317 318 func (i InputArray) ToInputArrayOutputWithContext(ctx context.Context) InputArrayOutput { 319 return pulumi.ToOutputWithContext(ctx, i).(InputArrayOutput) 320 } 321 322 // InputMapInput is an input type that accepts InputMap and InputMapOutput values. 323 // You can construct a concrete instance of `InputMapInput` via: 324 // 325 // InputMap{ "key": InputArgs{...} } 326 type InputMapInput interface { 327 pulumi.Input 328 329 ToInputMapOutput() InputMapOutput 330 ToInputMapOutputWithContext(context.Context) InputMapOutput 331 } 332 333 type InputMap map[string]InputInput 334 335 func (InputMap) ElementType() reflect.Type { 336 return reflect.TypeOf((*map[string]*Input)(nil)).Elem() 337 } 338 339 func (i InputMap) ToInputMapOutput() InputMapOutput { 340 return i.ToInputMapOutputWithContext(context.Background()) 341 } 342 343 func (i InputMap) ToInputMapOutputWithContext(ctx context.Context) InputMapOutput { 344 return pulumi.ToOutputWithContext(ctx, i).(InputMapOutput) 345 } 346 347 type InputOutput struct{ *pulumi.OutputState } 348 349 func (InputOutput) ElementType() reflect.Type { 350 return reflect.TypeOf((**Input)(nil)).Elem() 351 } 352 353 func (o InputOutput) ToInputOutput() InputOutput { 354 return o 355 } 356 357 func (o InputOutput) ToInputOutputWithContext(ctx context.Context) InputOutput { 358 return o 359 } 360 361 // ARN of the Input. 362 func (o InputOutput) Arn() pulumi.StringOutput { 363 return o.ApplyT(func(v *Input) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 364 } 365 366 // Channels attached to Input. 367 func (o InputOutput) AttachedChannels() pulumi.StringArrayOutput { 368 return o.ApplyT(func(v *Input) pulumi.StringArrayOutput { return v.AttachedChannels }).(pulumi.StringArrayOutput) 369 } 370 371 // Destination settings for PUSH type inputs. See Destinations for more details. 372 func (o InputOutput) Destinations() InputDestinationArrayOutput { 373 return o.ApplyT(func(v *Input) InputDestinationArrayOutput { return v.Destinations }).(InputDestinationArrayOutput) 374 } 375 376 // The input class. 377 func (o InputOutput) InputClass() pulumi.StringOutput { 378 return o.ApplyT(func(v *Input) pulumi.StringOutput { return v.InputClass }).(pulumi.StringOutput) 379 } 380 381 // Settings for the devices. See Input Devices for more details. 382 func (o InputOutput) InputDevices() InputInputDeviceArrayOutput { 383 return o.ApplyT(func(v *Input) InputInputDeviceArrayOutput { return v.InputDevices }).(InputInputDeviceArrayOutput) 384 } 385 386 // A list of IDs for all Inputs which are partners of this one. 387 func (o InputOutput) InputPartnerIds() pulumi.StringArrayOutput { 388 return o.ApplyT(func(v *Input) pulumi.StringArrayOutput { return v.InputPartnerIds }).(pulumi.StringArrayOutput) 389 } 390 391 // List of input security groups. 392 func (o InputOutput) InputSecurityGroups() pulumi.StringArrayOutput { 393 return o.ApplyT(func(v *Input) pulumi.StringArrayOutput { return v.InputSecurityGroups }).(pulumi.StringArrayOutput) 394 } 395 396 // Source type of the input. 397 func (o InputOutput) InputSourceType() pulumi.StringOutput { 398 return o.ApplyT(func(v *Input) pulumi.StringOutput { return v.InputSourceType }).(pulumi.StringOutput) 399 } 400 401 // A list of the MediaConnect Flows. See Media Connect Flows for more details. 402 func (o InputOutput) MediaConnectFlows() InputMediaConnectFlowArrayOutput { 403 return o.ApplyT(func(v *Input) InputMediaConnectFlowArrayOutput { return v.MediaConnectFlows }).(InputMediaConnectFlowArrayOutput) 404 } 405 406 // Name of the input. 407 func (o InputOutput) Name() pulumi.StringOutput { 408 return o.ApplyT(func(v *Input) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 409 } 410 411 // The ARN of the role this input assumes during and after creation. 412 func (o InputOutput) RoleArn() pulumi.StringOutput { 413 return o.ApplyT(func(v *Input) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) 414 } 415 416 // The source URLs for a PULL-type input. See Sources for more details. 417 func (o InputOutput) Sources() InputSourceArrayOutput { 418 return o.ApplyT(func(v *Input) InputSourceArrayOutput { return v.Sources }).(InputSourceArrayOutput) 419 } 420 421 // A map of tags to assign to the Input. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 422 func (o InputOutput) Tags() pulumi.StringMapOutput { 423 return o.ApplyT(func(v *Input) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 424 } 425 426 // Deprecated: Please use `tags` instead. 427 func (o InputOutput) TagsAll() pulumi.StringMapOutput { 428 return o.ApplyT(func(v *Input) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 429 } 430 431 // The different types of inputs that AWS Elemental MediaLive supports. 432 // 433 // The following arguments are optional: 434 func (o InputOutput) Type() pulumi.StringOutput { 435 return o.ApplyT(func(v *Input) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput) 436 } 437 438 // Settings for a private VPC Input. See VPC for more details. 439 func (o InputOutput) Vpc() InputVpcPtrOutput { 440 return o.ApplyT(func(v *Input) InputVpcPtrOutput { return v.Vpc }).(InputVpcPtrOutput) 441 } 442 443 type InputArrayOutput struct{ *pulumi.OutputState } 444 445 func (InputArrayOutput) ElementType() reflect.Type { 446 return reflect.TypeOf((*[]*Input)(nil)).Elem() 447 } 448 449 func (o InputArrayOutput) ToInputArrayOutput() InputArrayOutput { 450 return o 451 } 452 453 func (o InputArrayOutput) ToInputArrayOutputWithContext(ctx context.Context) InputArrayOutput { 454 return o 455 } 456 457 func (o InputArrayOutput) Index(i pulumi.IntInput) InputOutput { 458 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Input { 459 return vs[0].([]*Input)[vs[1].(int)] 460 }).(InputOutput) 461 } 462 463 type InputMapOutput struct{ *pulumi.OutputState } 464 465 func (InputMapOutput) ElementType() reflect.Type { 466 return reflect.TypeOf((*map[string]*Input)(nil)).Elem() 467 } 468 469 func (o InputMapOutput) ToInputMapOutput() InputMapOutput { 470 return o 471 } 472 473 func (o InputMapOutput) ToInputMapOutputWithContext(ctx context.Context) InputMapOutput { 474 return o 475 } 476 477 func (o InputMapOutput) MapIndex(k pulumi.StringInput) InputOutput { 478 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Input { 479 return vs[0].(map[string]*Input)[vs[1].(string)] 480 }).(InputOutput) 481 } 482 483 func init() { 484 pulumi.RegisterInputType(reflect.TypeOf((*InputInput)(nil)).Elem(), &Input{}) 485 pulumi.RegisterInputType(reflect.TypeOf((*InputArrayInput)(nil)).Elem(), InputArray{}) 486 pulumi.RegisterInputType(reflect.TypeOf((*InputMapInput)(nil)).Elem(), InputMap{}) 487 pulumi.RegisterOutputType(InputOutput{}) 488 pulumi.RegisterOutputType(InputArrayOutput{}) 489 pulumi.RegisterOutputType(InputMapOutput{}) 490 }