github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/devopsguru/eventSourcesConfig.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 devopsguru 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 // ## Example Usage 15 // 16 // ### Basic Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/devopsguru" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := devopsguru.NewEventSourcesConfig(ctx, "example", &devopsguru.EventSourcesConfigArgs{ 32 // EventSources: devopsguru.EventSourcesConfigEventSourceArray{ 33 // &devopsguru.EventSourcesConfigEventSourceArgs{ 34 // AmazonCodeGuruProfilers: devopsguru.EventSourcesConfigEventSourceAmazonCodeGuruProfilerArray{ 35 // &devopsguru.EventSourcesConfigEventSourceAmazonCodeGuruProfilerArgs{ 36 // Status: pulumi.String("ENABLED"), 37 // }, 38 // }, 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 DevOps Guru Event Sources Config using the `id`. For example: 55 // 56 // ```sh 57 // $ pulumi import aws:devopsguru/eventSourcesConfig:EventSourcesConfig example us-east-1 58 // ``` 59 type EventSourcesConfig struct { 60 pulumi.CustomResourceState 61 62 // Configuration information about the integration of DevOps Guru as the Consumer via EventBridge with another AWS Service. See `eventSources` below. 63 EventSources EventSourcesConfigEventSourceArrayOutput `pulumi:"eventSources"` 64 } 65 66 // NewEventSourcesConfig registers a new resource with the given unique name, arguments, and options. 67 func NewEventSourcesConfig(ctx *pulumi.Context, 68 name string, args *EventSourcesConfigArgs, opts ...pulumi.ResourceOption) (*EventSourcesConfig, error) { 69 if args == nil { 70 args = &EventSourcesConfigArgs{} 71 } 72 73 opts = internal.PkgResourceDefaultOpts(opts) 74 var resource EventSourcesConfig 75 err := ctx.RegisterResource("aws:devopsguru/eventSourcesConfig:EventSourcesConfig", name, args, &resource, opts...) 76 if err != nil { 77 return nil, err 78 } 79 return &resource, nil 80 } 81 82 // GetEventSourcesConfig gets an existing EventSourcesConfig resource's state with the given name, ID, and optional 83 // state properties that are used to uniquely qualify the lookup (nil if not required). 84 func GetEventSourcesConfig(ctx *pulumi.Context, 85 name string, id pulumi.IDInput, state *EventSourcesConfigState, opts ...pulumi.ResourceOption) (*EventSourcesConfig, error) { 86 var resource EventSourcesConfig 87 err := ctx.ReadResource("aws:devopsguru/eventSourcesConfig:EventSourcesConfig", name, id, state, &resource, opts...) 88 if err != nil { 89 return nil, err 90 } 91 return &resource, nil 92 } 93 94 // Input properties used for looking up and filtering EventSourcesConfig resources. 95 type eventSourcesConfigState struct { 96 // Configuration information about the integration of DevOps Guru as the Consumer via EventBridge with another AWS Service. See `eventSources` below. 97 EventSources []EventSourcesConfigEventSource `pulumi:"eventSources"` 98 } 99 100 type EventSourcesConfigState struct { 101 // Configuration information about the integration of DevOps Guru as the Consumer via EventBridge with another AWS Service. See `eventSources` below. 102 EventSources EventSourcesConfigEventSourceArrayInput 103 } 104 105 func (EventSourcesConfigState) ElementType() reflect.Type { 106 return reflect.TypeOf((*eventSourcesConfigState)(nil)).Elem() 107 } 108 109 type eventSourcesConfigArgs struct { 110 // Configuration information about the integration of DevOps Guru as the Consumer via EventBridge with another AWS Service. See `eventSources` below. 111 EventSources []EventSourcesConfigEventSource `pulumi:"eventSources"` 112 } 113 114 // The set of arguments for constructing a EventSourcesConfig resource. 115 type EventSourcesConfigArgs struct { 116 // Configuration information about the integration of DevOps Guru as the Consumer via EventBridge with another AWS Service. See `eventSources` below. 117 EventSources EventSourcesConfigEventSourceArrayInput 118 } 119 120 func (EventSourcesConfigArgs) ElementType() reflect.Type { 121 return reflect.TypeOf((*eventSourcesConfigArgs)(nil)).Elem() 122 } 123 124 type EventSourcesConfigInput interface { 125 pulumi.Input 126 127 ToEventSourcesConfigOutput() EventSourcesConfigOutput 128 ToEventSourcesConfigOutputWithContext(ctx context.Context) EventSourcesConfigOutput 129 } 130 131 func (*EventSourcesConfig) ElementType() reflect.Type { 132 return reflect.TypeOf((**EventSourcesConfig)(nil)).Elem() 133 } 134 135 func (i *EventSourcesConfig) ToEventSourcesConfigOutput() EventSourcesConfigOutput { 136 return i.ToEventSourcesConfigOutputWithContext(context.Background()) 137 } 138 139 func (i *EventSourcesConfig) ToEventSourcesConfigOutputWithContext(ctx context.Context) EventSourcesConfigOutput { 140 return pulumi.ToOutputWithContext(ctx, i).(EventSourcesConfigOutput) 141 } 142 143 // EventSourcesConfigArrayInput is an input type that accepts EventSourcesConfigArray and EventSourcesConfigArrayOutput values. 144 // You can construct a concrete instance of `EventSourcesConfigArrayInput` via: 145 // 146 // EventSourcesConfigArray{ EventSourcesConfigArgs{...} } 147 type EventSourcesConfigArrayInput interface { 148 pulumi.Input 149 150 ToEventSourcesConfigArrayOutput() EventSourcesConfigArrayOutput 151 ToEventSourcesConfigArrayOutputWithContext(context.Context) EventSourcesConfigArrayOutput 152 } 153 154 type EventSourcesConfigArray []EventSourcesConfigInput 155 156 func (EventSourcesConfigArray) ElementType() reflect.Type { 157 return reflect.TypeOf((*[]*EventSourcesConfig)(nil)).Elem() 158 } 159 160 func (i EventSourcesConfigArray) ToEventSourcesConfigArrayOutput() EventSourcesConfigArrayOutput { 161 return i.ToEventSourcesConfigArrayOutputWithContext(context.Background()) 162 } 163 164 func (i EventSourcesConfigArray) ToEventSourcesConfigArrayOutputWithContext(ctx context.Context) EventSourcesConfigArrayOutput { 165 return pulumi.ToOutputWithContext(ctx, i).(EventSourcesConfigArrayOutput) 166 } 167 168 // EventSourcesConfigMapInput is an input type that accepts EventSourcesConfigMap and EventSourcesConfigMapOutput values. 169 // You can construct a concrete instance of `EventSourcesConfigMapInput` via: 170 // 171 // EventSourcesConfigMap{ "key": EventSourcesConfigArgs{...} } 172 type EventSourcesConfigMapInput interface { 173 pulumi.Input 174 175 ToEventSourcesConfigMapOutput() EventSourcesConfigMapOutput 176 ToEventSourcesConfigMapOutputWithContext(context.Context) EventSourcesConfigMapOutput 177 } 178 179 type EventSourcesConfigMap map[string]EventSourcesConfigInput 180 181 func (EventSourcesConfigMap) ElementType() reflect.Type { 182 return reflect.TypeOf((*map[string]*EventSourcesConfig)(nil)).Elem() 183 } 184 185 func (i EventSourcesConfigMap) ToEventSourcesConfigMapOutput() EventSourcesConfigMapOutput { 186 return i.ToEventSourcesConfigMapOutputWithContext(context.Background()) 187 } 188 189 func (i EventSourcesConfigMap) ToEventSourcesConfigMapOutputWithContext(ctx context.Context) EventSourcesConfigMapOutput { 190 return pulumi.ToOutputWithContext(ctx, i).(EventSourcesConfigMapOutput) 191 } 192 193 type EventSourcesConfigOutput struct{ *pulumi.OutputState } 194 195 func (EventSourcesConfigOutput) ElementType() reflect.Type { 196 return reflect.TypeOf((**EventSourcesConfig)(nil)).Elem() 197 } 198 199 func (o EventSourcesConfigOutput) ToEventSourcesConfigOutput() EventSourcesConfigOutput { 200 return o 201 } 202 203 func (o EventSourcesConfigOutput) ToEventSourcesConfigOutputWithContext(ctx context.Context) EventSourcesConfigOutput { 204 return o 205 } 206 207 // Configuration information about the integration of DevOps Guru as the Consumer via EventBridge with another AWS Service. See `eventSources` below. 208 func (o EventSourcesConfigOutput) EventSources() EventSourcesConfigEventSourceArrayOutput { 209 return o.ApplyT(func(v *EventSourcesConfig) EventSourcesConfigEventSourceArrayOutput { return v.EventSources }).(EventSourcesConfigEventSourceArrayOutput) 210 } 211 212 type EventSourcesConfigArrayOutput struct{ *pulumi.OutputState } 213 214 func (EventSourcesConfigArrayOutput) ElementType() reflect.Type { 215 return reflect.TypeOf((*[]*EventSourcesConfig)(nil)).Elem() 216 } 217 218 func (o EventSourcesConfigArrayOutput) ToEventSourcesConfigArrayOutput() EventSourcesConfigArrayOutput { 219 return o 220 } 221 222 func (o EventSourcesConfigArrayOutput) ToEventSourcesConfigArrayOutputWithContext(ctx context.Context) EventSourcesConfigArrayOutput { 223 return o 224 } 225 226 func (o EventSourcesConfigArrayOutput) Index(i pulumi.IntInput) EventSourcesConfigOutput { 227 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EventSourcesConfig { 228 return vs[0].([]*EventSourcesConfig)[vs[1].(int)] 229 }).(EventSourcesConfigOutput) 230 } 231 232 type EventSourcesConfigMapOutput struct{ *pulumi.OutputState } 233 234 func (EventSourcesConfigMapOutput) ElementType() reflect.Type { 235 return reflect.TypeOf((*map[string]*EventSourcesConfig)(nil)).Elem() 236 } 237 238 func (o EventSourcesConfigMapOutput) ToEventSourcesConfigMapOutput() EventSourcesConfigMapOutput { 239 return o 240 } 241 242 func (o EventSourcesConfigMapOutput) ToEventSourcesConfigMapOutputWithContext(ctx context.Context) EventSourcesConfigMapOutput { 243 return o 244 } 245 246 func (o EventSourcesConfigMapOutput) MapIndex(k pulumi.StringInput) EventSourcesConfigOutput { 247 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EventSourcesConfig { 248 return vs[0].(map[string]*EventSourcesConfig)[vs[1].(string)] 249 }).(EventSourcesConfigOutput) 250 } 251 252 func init() { 253 pulumi.RegisterInputType(reflect.TypeOf((*EventSourcesConfigInput)(nil)).Elem(), &EventSourcesConfig{}) 254 pulumi.RegisterInputType(reflect.TypeOf((*EventSourcesConfigArrayInput)(nil)).Elem(), EventSourcesConfigArray{}) 255 pulumi.RegisterInputType(reflect.TypeOf((*EventSourcesConfigMapInput)(nil)).Elem(), EventSourcesConfigMap{}) 256 pulumi.RegisterOutputType(EventSourcesConfigOutput{}) 257 pulumi.RegisterOutputType(EventSourcesConfigArrayOutput{}) 258 pulumi.RegisterOutputType(EventSourcesConfigMapOutput{}) 259 }