github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/iot/eventConfigurations.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 iot 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 // Manages IoT event configurations. 16 // 17 // > **NOTE:** Deleting this resource does not disable the event configurations, the resource in simply removed from state instead. 18 // 19 // ## Example Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot" 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 := iot.NewEventConfigurations(ctx, "example", &iot.EventConfigurationsArgs{ 35 // EventConfigurations: pulumi.BoolMap{ 36 // "THING": pulumi.Bool(true), 37 // "THING_GROUP": pulumi.Bool(false), 38 // "THING_TYPE": pulumi.Bool(false), 39 // "THING_GROUP_MEMBERSHIP": pulumi.Bool(false), 40 // "THING_GROUP_HIERARCHY": pulumi.Bool(false), 41 // "THING_TYPE_ASSOCIATION": pulumi.Bool(false), 42 // "JOB": pulumi.Bool(false), 43 // "JOB_EXECUTION": pulumi.Bool(false), 44 // "POLICY": pulumi.Bool(false), 45 // "CERTIFICATE": pulumi.Bool(true), 46 // "CA_CERTIFICATE": pulumi.Bool(false), 47 // }, 48 // }) 49 // if err != nil { 50 // return err 51 // } 52 // return nil 53 // }) 54 // } 55 // 56 // ``` 57 // <!--End PulumiCodeChooser --> 58 // 59 // ## Import 60 // 61 // Using `pulumi import`, import IoT Event Configurations using the AWS Region. For example: 62 // 63 // ```sh 64 // $ pulumi import aws:iot/eventConfigurations:EventConfigurations example us-west-2 65 // ``` 66 type EventConfigurations struct { 67 pulumi.CustomResourceState 68 69 // Map. The new event configuration values. You can use only these strings as keys: `THING_GROUP_HIERARCHY`, `THING_GROUP_MEMBERSHIP`, `THING_TYPE`, `THING_TYPE_ASSOCIATION`, `THING_GROUP`, `THING`, `POLICY`, `CA_CERTIFICATE`, `JOB_EXECUTION`, `CERTIFICATE`, `JOB`. Use boolean for values of mapping. 70 EventConfigurations pulumi.BoolMapOutput `pulumi:"eventConfigurations"` 71 } 72 73 // NewEventConfigurations registers a new resource with the given unique name, arguments, and options. 74 func NewEventConfigurations(ctx *pulumi.Context, 75 name string, args *EventConfigurationsArgs, opts ...pulumi.ResourceOption) (*EventConfigurations, error) { 76 if args == nil { 77 return nil, errors.New("missing one or more required arguments") 78 } 79 80 if args.EventConfigurations == nil { 81 return nil, errors.New("invalid value for required argument 'EventConfigurations'") 82 } 83 opts = internal.PkgResourceDefaultOpts(opts) 84 var resource EventConfigurations 85 err := ctx.RegisterResource("aws:iot/eventConfigurations:EventConfigurations", name, args, &resource, opts...) 86 if err != nil { 87 return nil, err 88 } 89 return &resource, nil 90 } 91 92 // GetEventConfigurations gets an existing EventConfigurations resource's state with the given name, ID, and optional 93 // state properties that are used to uniquely qualify the lookup (nil if not required). 94 func GetEventConfigurations(ctx *pulumi.Context, 95 name string, id pulumi.IDInput, state *EventConfigurationsState, opts ...pulumi.ResourceOption) (*EventConfigurations, error) { 96 var resource EventConfigurations 97 err := ctx.ReadResource("aws:iot/eventConfigurations:EventConfigurations", name, id, state, &resource, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return &resource, nil 102 } 103 104 // Input properties used for looking up and filtering EventConfigurations resources. 105 type eventConfigurationsState struct { 106 // Map. The new event configuration values. You can use only these strings as keys: `THING_GROUP_HIERARCHY`, `THING_GROUP_MEMBERSHIP`, `THING_TYPE`, `THING_TYPE_ASSOCIATION`, `THING_GROUP`, `THING`, `POLICY`, `CA_CERTIFICATE`, `JOB_EXECUTION`, `CERTIFICATE`, `JOB`. Use boolean for values of mapping. 107 EventConfigurations map[string]bool `pulumi:"eventConfigurations"` 108 } 109 110 type EventConfigurationsState struct { 111 // Map. The new event configuration values. You can use only these strings as keys: `THING_GROUP_HIERARCHY`, `THING_GROUP_MEMBERSHIP`, `THING_TYPE`, `THING_TYPE_ASSOCIATION`, `THING_GROUP`, `THING`, `POLICY`, `CA_CERTIFICATE`, `JOB_EXECUTION`, `CERTIFICATE`, `JOB`. Use boolean for values of mapping. 112 EventConfigurations pulumi.BoolMapInput 113 } 114 115 func (EventConfigurationsState) ElementType() reflect.Type { 116 return reflect.TypeOf((*eventConfigurationsState)(nil)).Elem() 117 } 118 119 type eventConfigurationsArgs struct { 120 // Map. The new event configuration values. You can use only these strings as keys: `THING_GROUP_HIERARCHY`, `THING_GROUP_MEMBERSHIP`, `THING_TYPE`, `THING_TYPE_ASSOCIATION`, `THING_GROUP`, `THING`, `POLICY`, `CA_CERTIFICATE`, `JOB_EXECUTION`, `CERTIFICATE`, `JOB`. Use boolean for values of mapping. 121 EventConfigurations map[string]bool `pulumi:"eventConfigurations"` 122 } 123 124 // The set of arguments for constructing a EventConfigurations resource. 125 type EventConfigurationsArgs struct { 126 // Map. The new event configuration values. You can use only these strings as keys: `THING_GROUP_HIERARCHY`, `THING_GROUP_MEMBERSHIP`, `THING_TYPE`, `THING_TYPE_ASSOCIATION`, `THING_GROUP`, `THING`, `POLICY`, `CA_CERTIFICATE`, `JOB_EXECUTION`, `CERTIFICATE`, `JOB`. Use boolean for values of mapping. 127 EventConfigurations pulumi.BoolMapInput 128 } 129 130 func (EventConfigurationsArgs) ElementType() reflect.Type { 131 return reflect.TypeOf((*eventConfigurationsArgs)(nil)).Elem() 132 } 133 134 type EventConfigurationsInput interface { 135 pulumi.Input 136 137 ToEventConfigurationsOutput() EventConfigurationsOutput 138 ToEventConfigurationsOutputWithContext(ctx context.Context) EventConfigurationsOutput 139 } 140 141 func (*EventConfigurations) ElementType() reflect.Type { 142 return reflect.TypeOf((**EventConfigurations)(nil)).Elem() 143 } 144 145 func (i *EventConfigurations) ToEventConfigurationsOutput() EventConfigurationsOutput { 146 return i.ToEventConfigurationsOutputWithContext(context.Background()) 147 } 148 149 func (i *EventConfigurations) ToEventConfigurationsOutputWithContext(ctx context.Context) EventConfigurationsOutput { 150 return pulumi.ToOutputWithContext(ctx, i).(EventConfigurationsOutput) 151 } 152 153 // EventConfigurationsArrayInput is an input type that accepts EventConfigurationsArray and EventConfigurationsArrayOutput values. 154 // You can construct a concrete instance of `EventConfigurationsArrayInput` via: 155 // 156 // EventConfigurationsArray{ EventConfigurationsArgs{...} } 157 type EventConfigurationsArrayInput interface { 158 pulumi.Input 159 160 ToEventConfigurationsArrayOutput() EventConfigurationsArrayOutput 161 ToEventConfigurationsArrayOutputWithContext(context.Context) EventConfigurationsArrayOutput 162 } 163 164 type EventConfigurationsArray []EventConfigurationsInput 165 166 func (EventConfigurationsArray) ElementType() reflect.Type { 167 return reflect.TypeOf((*[]*EventConfigurations)(nil)).Elem() 168 } 169 170 func (i EventConfigurationsArray) ToEventConfigurationsArrayOutput() EventConfigurationsArrayOutput { 171 return i.ToEventConfigurationsArrayOutputWithContext(context.Background()) 172 } 173 174 func (i EventConfigurationsArray) ToEventConfigurationsArrayOutputWithContext(ctx context.Context) EventConfigurationsArrayOutput { 175 return pulumi.ToOutputWithContext(ctx, i).(EventConfigurationsArrayOutput) 176 } 177 178 // EventConfigurationsMapInput is an input type that accepts EventConfigurationsMap and EventConfigurationsMapOutput values. 179 // You can construct a concrete instance of `EventConfigurationsMapInput` via: 180 // 181 // EventConfigurationsMap{ "key": EventConfigurationsArgs{...} } 182 type EventConfigurationsMapInput interface { 183 pulumi.Input 184 185 ToEventConfigurationsMapOutput() EventConfigurationsMapOutput 186 ToEventConfigurationsMapOutputWithContext(context.Context) EventConfigurationsMapOutput 187 } 188 189 type EventConfigurationsMap map[string]EventConfigurationsInput 190 191 func (EventConfigurationsMap) ElementType() reflect.Type { 192 return reflect.TypeOf((*map[string]*EventConfigurations)(nil)).Elem() 193 } 194 195 func (i EventConfigurationsMap) ToEventConfigurationsMapOutput() EventConfigurationsMapOutput { 196 return i.ToEventConfigurationsMapOutputWithContext(context.Background()) 197 } 198 199 func (i EventConfigurationsMap) ToEventConfigurationsMapOutputWithContext(ctx context.Context) EventConfigurationsMapOutput { 200 return pulumi.ToOutputWithContext(ctx, i).(EventConfigurationsMapOutput) 201 } 202 203 type EventConfigurationsOutput struct{ *pulumi.OutputState } 204 205 func (EventConfigurationsOutput) ElementType() reflect.Type { 206 return reflect.TypeOf((**EventConfigurations)(nil)).Elem() 207 } 208 209 func (o EventConfigurationsOutput) ToEventConfigurationsOutput() EventConfigurationsOutput { 210 return o 211 } 212 213 func (o EventConfigurationsOutput) ToEventConfigurationsOutputWithContext(ctx context.Context) EventConfigurationsOutput { 214 return o 215 } 216 217 // Map. The new event configuration values. You can use only these strings as keys: `THING_GROUP_HIERARCHY`, `THING_GROUP_MEMBERSHIP`, `THING_TYPE`, `THING_TYPE_ASSOCIATION`, `THING_GROUP`, `THING`, `POLICY`, `CA_CERTIFICATE`, `JOB_EXECUTION`, `CERTIFICATE`, `JOB`. Use boolean for values of mapping. 218 func (o EventConfigurationsOutput) EventConfigurations() pulumi.BoolMapOutput { 219 return o.ApplyT(func(v *EventConfigurations) pulumi.BoolMapOutput { return v.EventConfigurations }).(pulumi.BoolMapOutput) 220 } 221 222 type EventConfigurationsArrayOutput struct{ *pulumi.OutputState } 223 224 func (EventConfigurationsArrayOutput) ElementType() reflect.Type { 225 return reflect.TypeOf((*[]*EventConfigurations)(nil)).Elem() 226 } 227 228 func (o EventConfigurationsArrayOutput) ToEventConfigurationsArrayOutput() EventConfigurationsArrayOutput { 229 return o 230 } 231 232 func (o EventConfigurationsArrayOutput) ToEventConfigurationsArrayOutputWithContext(ctx context.Context) EventConfigurationsArrayOutput { 233 return o 234 } 235 236 func (o EventConfigurationsArrayOutput) Index(i pulumi.IntInput) EventConfigurationsOutput { 237 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventConfigurations { 238 return vs[0].([]*EventConfigurations)[vs[1].(int)] 239 }).(EventConfigurationsOutput) 240 } 241 242 type EventConfigurationsMapOutput struct{ *pulumi.OutputState } 243 244 func (EventConfigurationsMapOutput) ElementType() reflect.Type { 245 return reflect.TypeOf((*map[string]*EventConfigurations)(nil)).Elem() 246 } 247 248 func (o EventConfigurationsMapOutput) ToEventConfigurationsMapOutput() EventConfigurationsMapOutput { 249 return o 250 } 251 252 func (o EventConfigurationsMapOutput) ToEventConfigurationsMapOutputWithContext(ctx context.Context) EventConfigurationsMapOutput { 253 return o 254 } 255 256 func (o EventConfigurationsMapOutput) MapIndex(k pulumi.StringInput) EventConfigurationsOutput { 257 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventConfigurations { 258 return vs[0].(map[string]*EventConfigurations)[vs[1].(string)] 259 }).(EventConfigurationsOutput) 260 } 261 262 func init() { 263 pulumi.RegisterInputType(reflect.TypeOf((*EventConfigurationsInput)(nil)).Elem(), &EventConfigurations{}) 264 pulumi.RegisterInputType(reflect.TypeOf((*EventConfigurationsArrayInput)(nil)).Elem(), EventConfigurationsArray{}) 265 pulumi.RegisterInputType(reflect.TypeOf((*EventConfigurationsMapInput)(nil)).Elem(), EventConfigurationsMap{}) 266 pulumi.RegisterOutputType(EventConfigurationsOutput{}) 267 pulumi.RegisterOutputType(EventConfigurationsArrayOutput{}) 268 pulumi.RegisterOutputType(EventConfigurationsMapOutput{}) 269 }