github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2transitgateway/multicastGroupSource.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 ec2transitgateway 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 // Registers sources (network interfaces) with the transit gateway multicast group. 16 // A multicast source is a network interface attached to a supported instance that sends multicast traffic. 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/ec2transitgateway" 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 := ec2transitgateway.NewMulticastGroupSource(ctx, "example", &ec2transitgateway.MulticastGroupSourceArgs{ 34 // GroupIpAddress: pulumi.String("224.0.0.1"), 35 // NetworkInterfaceId: pulumi.Any(exampleAwsNetworkInterface.Id), 36 // TransitGatewayMulticastDomainId: pulumi.Any(exampleAwsEc2TransitGatewayMulticastDomain.Id), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 type MulticastGroupSource struct { 48 pulumi.CustomResourceState 49 50 // The IP address assigned to the transit gateway multicast group. 51 GroupIpAddress pulumi.StringOutput `pulumi:"groupIpAddress"` 52 // The group members' network interface ID to register with the transit gateway multicast group. 53 NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` 54 // The ID of the transit gateway multicast domain. 55 TransitGatewayMulticastDomainId pulumi.StringOutput `pulumi:"transitGatewayMulticastDomainId"` 56 } 57 58 // NewMulticastGroupSource registers a new resource with the given unique name, arguments, and options. 59 func NewMulticastGroupSource(ctx *pulumi.Context, 60 name string, args *MulticastGroupSourceArgs, opts ...pulumi.ResourceOption) (*MulticastGroupSource, error) { 61 if args == nil { 62 return nil, errors.New("missing one or more required arguments") 63 } 64 65 if args.GroupIpAddress == nil { 66 return nil, errors.New("invalid value for required argument 'GroupIpAddress'") 67 } 68 if args.NetworkInterfaceId == nil { 69 return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'") 70 } 71 if args.TransitGatewayMulticastDomainId == nil { 72 return nil, errors.New("invalid value for required argument 'TransitGatewayMulticastDomainId'") 73 } 74 opts = internal.PkgResourceDefaultOpts(opts) 75 var resource MulticastGroupSource 76 err := ctx.RegisterResource("aws:ec2transitgateway/multicastGroupSource:MulticastGroupSource", name, args, &resource, opts...) 77 if err != nil { 78 return nil, err 79 } 80 return &resource, nil 81 } 82 83 // GetMulticastGroupSource gets an existing MulticastGroupSource resource's state with the given name, ID, and optional 84 // state properties that are used to uniquely qualify the lookup (nil if not required). 85 func GetMulticastGroupSource(ctx *pulumi.Context, 86 name string, id pulumi.IDInput, state *MulticastGroupSourceState, opts ...pulumi.ResourceOption) (*MulticastGroupSource, error) { 87 var resource MulticastGroupSource 88 err := ctx.ReadResource("aws:ec2transitgateway/multicastGroupSource:MulticastGroupSource", name, id, state, &resource, opts...) 89 if err != nil { 90 return nil, err 91 } 92 return &resource, nil 93 } 94 95 // Input properties used for looking up and filtering MulticastGroupSource resources. 96 type multicastGroupSourceState struct { 97 // The IP address assigned to the transit gateway multicast group. 98 GroupIpAddress *string `pulumi:"groupIpAddress"` 99 // The group members' network interface ID to register with the transit gateway multicast group. 100 NetworkInterfaceId *string `pulumi:"networkInterfaceId"` 101 // The ID of the transit gateway multicast domain. 102 TransitGatewayMulticastDomainId *string `pulumi:"transitGatewayMulticastDomainId"` 103 } 104 105 type MulticastGroupSourceState struct { 106 // The IP address assigned to the transit gateway multicast group. 107 GroupIpAddress pulumi.StringPtrInput 108 // The group members' network interface ID to register with the transit gateway multicast group. 109 NetworkInterfaceId pulumi.StringPtrInput 110 // The ID of the transit gateway multicast domain. 111 TransitGatewayMulticastDomainId pulumi.StringPtrInput 112 } 113 114 func (MulticastGroupSourceState) ElementType() reflect.Type { 115 return reflect.TypeOf((*multicastGroupSourceState)(nil)).Elem() 116 } 117 118 type multicastGroupSourceArgs struct { 119 // The IP address assigned to the transit gateway multicast group. 120 GroupIpAddress string `pulumi:"groupIpAddress"` 121 // The group members' network interface ID to register with the transit gateway multicast group. 122 NetworkInterfaceId string `pulumi:"networkInterfaceId"` 123 // The ID of the transit gateway multicast domain. 124 TransitGatewayMulticastDomainId string `pulumi:"transitGatewayMulticastDomainId"` 125 } 126 127 // The set of arguments for constructing a MulticastGroupSource resource. 128 type MulticastGroupSourceArgs struct { 129 // The IP address assigned to the transit gateway multicast group. 130 GroupIpAddress pulumi.StringInput 131 // The group members' network interface ID to register with the transit gateway multicast group. 132 NetworkInterfaceId pulumi.StringInput 133 // The ID of the transit gateway multicast domain. 134 TransitGatewayMulticastDomainId pulumi.StringInput 135 } 136 137 func (MulticastGroupSourceArgs) ElementType() reflect.Type { 138 return reflect.TypeOf((*multicastGroupSourceArgs)(nil)).Elem() 139 } 140 141 type MulticastGroupSourceInput interface { 142 pulumi.Input 143 144 ToMulticastGroupSourceOutput() MulticastGroupSourceOutput 145 ToMulticastGroupSourceOutputWithContext(ctx context.Context) MulticastGroupSourceOutput 146 } 147 148 func (*MulticastGroupSource) ElementType() reflect.Type { 149 return reflect.TypeOf((**MulticastGroupSource)(nil)).Elem() 150 } 151 152 func (i *MulticastGroupSource) ToMulticastGroupSourceOutput() MulticastGroupSourceOutput { 153 return i.ToMulticastGroupSourceOutputWithContext(context.Background()) 154 } 155 156 func (i *MulticastGroupSource) ToMulticastGroupSourceOutputWithContext(ctx context.Context) MulticastGroupSourceOutput { 157 return pulumi.ToOutputWithContext(ctx, i).(MulticastGroupSourceOutput) 158 } 159 160 // MulticastGroupSourceArrayInput is an input type that accepts MulticastGroupSourceArray and MulticastGroupSourceArrayOutput values. 161 // You can construct a concrete instance of `MulticastGroupSourceArrayInput` via: 162 // 163 // MulticastGroupSourceArray{ MulticastGroupSourceArgs{...} } 164 type MulticastGroupSourceArrayInput interface { 165 pulumi.Input 166 167 ToMulticastGroupSourceArrayOutput() MulticastGroupSourceArrayOutput 168 ToMulticastGroupSourceArrayOutputWithContext(context.Context) MulticastGroupSourceArrayOutput 169 } 170 171 type MulticastGroupSourceArray []MulticastGroupSourceInput 172 173 func (MulticastGroupSourceArray) ElementType() reflect.Type { 174 return reflect.TypeOf((*[]*MulticastGroupSource)(nil)).Elem() 175 } 176 177 func (i MulticastGroupSourceArray) ToMulticastGroupSourceArrayOutput() MulticastGroupSourceArrayOutput { 178 return i.ToMulticastGroupSourceArrayOutputWithContext(context.Background()) 179 } 180 181 func (i MulticastGroupSourceArray) ToMulticastGroupSourceArrayOutputWithContext(ctx context.Context) MulticastGroupSourceArrayOutput { 182 return pulumi.ToOutputWithContext(ctx, i).(MulticastGroupSourceArrayOutput) 183 } 184 185 // MulticastGroupSourceMapInput is an input type that accepts MulticastGroupSourceMap and MulticastGroupSourceMapOutput values. 186 // You can construct a concrete instance of `MulticastGroupSourceMapInput` via: 187 // 188 // MulticastGroupSourceMap{ "key": MulticastGroupSourceArgs{...} } 189 type MulticastGroupSourceMapInput interface { 190 pulumi.Input 191 192 ToMulticastGroupSourceMapOutput() MulticastGroupSourceMapOutput 193 ToMulticastGroupSourceMapOutputWithContext(context.Context) MulticastGroupSourceMapOutput 194 } 195 196 type MulticastGroupSourceMap map[string]MulticastGroupSourceInput 197 198 func (MulticastGroupSourceMap) ElementType() reflect.Type { 199 return reflect.TypeOf((*map[string]*MulticastGroupSource)(nil)).Elem() 200 } 201 202 func (i MulticastGroupSourceMap) ToMulticastGroupSourceMapOutput() MulticastGroupSourceMapOutput { 203 return i.ToMulticastGroupSourceMapOutputWithContext(context.Background()) 204 } 205 206 func (i MulticastGroupSourceMap) ToMulticastGroupSourceMapOutputWithContext(ctx context.Context) MulticastGroupSourceMapOutput { 207 return pulumi.ToOutputWithContext(ctx, i).(MulticastGroupSourceMapOutput) 208 } 209 210 type MulticastGroupSourceOutput struct{ *pulumi.OutputState } 211 212 func (MulticastGroupSourceOutput) ElementType() reflect.Type { 213 return reflect.TypeOf((**MulticastGroupSource)(nil)).Elem() 214 } 215 216 func (o MulticastGroupSourceOutput) ToMulticastGroupSourceOutput() MulticastGroupSourceOutput { 217 return o 218 } 219 220 func (o MulticastGroupSourceOutput) ToMulticastGroupSourceOutputWithContext(ctx context.Context) MulticastGroupSourceOutput { 221 return o 222 } 223 224 // The IP address assigned to the transit gateway multicast group. 225 func (o MulticastGroupSourceOutput) GroupIpAddress() pulumi.StringOutput { 226 return o.ApplyT(func(v *MulticastGroupSource) pulumi.StringOutput { return v.GroupIpAddress }).(pulumi.StringOutput) 227 } 228 229 // The group members' network interface ID to register with the transit gateway multicast group. 230 func (o MulticastGroupSourceOutput) NetworkInterfaceId() pulumi.StringOutput { 231 return o.ApplyT(func(v *MulticastGroupSource) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) 232 } 233 234 // The ID of the transit gateway multicast domain. 235 func (o MulticastGroupSourceOutput) TransitGatewayMulticastDomainId() pulumi.StringOutput { 236 return o.ApplyT(func(v *MulticastGroupSource) pulumi.StringOutput { return v.TransitGatewayMulticastDomainId }).(pulumi.StringOutput) 237 } 238 239 type MulticastGroupSourceArrayOutput struct{ *pulumi.OutputState } 240 241 func (MulticastGroupSourceArrayOutput) ElementType() reflect.Type { 242 return reflect.TypeOf((*[]*MulticastGroupSource)(nil)).Elem() 243 } 244 245 func (o MulticastGroupSourceArrayOutput) ToMulticastGroupSourceArrayOutput() MulticastGroupSourceArrayOutput { 246 return o 247 } 248 249 func (o MulticastGroupSourceArrayOutput) ToMulticastGroupSourceArrayOutputWithContext(ctx context.Context) MulticastGroupSourceArrayOutput { 250 return o 251 } 252 253 func (o MulticastGroupSourceArrayOutput) Index(i pulumi.IntInput) MulticastGroupSourceOutput { 254 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MulticastGroupSource { 255 return vs[0].([]*MulticastGroupSource)[vs[1].(int)] 256 }).(MulticastGroupSourceOutput) 257 } 258 259 type MulticastGroupSourceMapOutput struct{ *pulumi.OutputState } 260 261 func (MulticastGroupSourceMapOutput) ElementType() reflect.Type { 262 return reflect.TypeOf((*map[string]*MulticastGroupSource)(nil)).Elem() 263 } 264 265 func (o MulticastGroupSourceMapOutput) ToMulticastGroupSourceMapOutput() MulticastGroupSourceMapOutput { 266 return o 267 } 268 269 func (o MulticastGroupSourceMapOutput) ToMulticastGroupSourceMapOutputWithContext(ctx context.Context) MulticastGroupSourceMapOutput { 270 return o 271 } 272 273 func (o MulticastGroupSourceMapOutput) MapIndex(k pulumi.StringInput) MulticastGroupSourceOutput { 274 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MulticastGroupSource { 275 return vs[0].(map[string]*MulticastGroupSource)[vs[1].(string)] 276 }).(MulticastGroupSourceOutput) 277 } 278 279 func init() { 280 pulumi.RegisterInputType(reflect.TypeOf((*MulticastGroupSourceInput)(nil)).Elem(), &MulticastGroupSource{}) 281 pulumi.RegisterInputType(reflect.TypeOf((*MulticastGroupSourceArrayInput)(nil)).Elem(), MulticastGroupSourceArray{}) 282 pulumi.RegisterInputType(reflect.TypeOf((*MulticastGroupSourceMapInput)(nil)).Elem(), MulticastGroupSourceMap{}) 283 pulumi.RegisterOutputType(MulticastGroupSourceOutput{}) 284 pulumi.RegisterOutputType(MulticastGroupSourceArrayOutput{}) 285 pulumi.RegisterOutputType(MulticastGroupSourceMapOutput{}) 286 }