github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appintegrations/dataIntegration.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 appintegrations 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 // Provides an Amazon AppIntegrations Data Integration resource. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appintegrations" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := appintegrations.NewDataIntegration(ctx, "example", &appintegrations.DataIntegrationArgs{ 33 // Name: pulumi.String("example"), 34 // Description: pulumi.String("example"), 35 // KmsKey: pulumi.Any(test.Arn), 36 // SourceUri: pulumi.String("Salesforce://AppFlow/example"), 37 // ScheduleConfig: &appintegrations.DataIntegrationScheduleConfigArgs{ 38 // FirstExecutionFrom: pulumi.String("1439788442681"), 39 // Object: pulumi.String("Account"), 40 // ScheduleExpression: pulumi.String("rate(1 hour)"), 41 // }, 42 // Tags: pulumi.StringMap{ 43 // "Key1": pulumi.String("Value1"), 44 // }, 45 // }) 46 // if err != nil { 47 // return err 48 // } 49 // return nil 50 // }) 51 // } 52 // 53 // ``` 54 // <!--End PulumiCodeChooser --> 55 // 56 // ## Import 57 // 58 // Using `pulumi import`, import Amazon AppIntegrations Data Integrations using the `id`. For example: 59 // 60 // ```sh 61 // $ pulumi import aws:appintegrations/dataIntegration:DataIntegration example 12345678-1234-1234-1234-123456789123 62 // ``` 63 type DataIntegration struct { 64 pulumi.CustomResourceState 65 66 // The Amazon Resource Name (ARN) of the Data Integration. 67 Arn pulumi.StringOutput `pulumi:"arn"` 68 // Specifies the description of the Data Integration. 69 Description pulumi.StringPtrOutput `pulumi:"description"` 70 // Specifies the KMS key Amazon Resource Name (ARN) for the Data Integration. 71 KmsKey pulumi.StringOutput `pulumi:"kmsKey"` 72 // Specifies the name of the Data Integration. 73 Name pulumi.StringOutput `pulumi:"name"` 74 // A block that defines the name of the data and how often it should be pulled from the source. The Schedule Config block is documented below. 75 ScheduleConfig DataIntegrationScheduleConfigOutput `pulumi:"scheduleConfig"` 76 // Specifies the URI of the data source. Create an AppFlow Connector Profile and reference the name of the profile in the URL. An example of this value for Salesforce is `Salesforce://AppFlow/example` where `example` is the name of the AppFlow Connector Profile. 77 SourceUri pulumi.StringOutput `pulumi:"sourceUri"` 78 // Tags to apply to the Data Integration. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 79 Tags pulumi.StringMapOutput `pulumi:"tags"` 80 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 81 // 82 // Deprecated: Please use `tags` instead. 83 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 84 } 85 86 // NewDataIntegration registers a new resource with the given unique name, arguments, and options. 87 func NewDataIntegration(ctx *pulumi.Context, 88 name string, args *DataIntegrationArgs, opts ...pulumi.ResourceOption) (*DataIntegration, error) { 89 if args == nil { 90 return nil, errors.New("missing one or more required arguments") 91 } 92 93 if args.KmsKey == nil { 94 return nil, errors.New("invalid value for required argument 'KmsKey'") 95 } 96 if args.ScheduleConfig == nil { 97 return nil, errors.New("invalid value for required argument 'ScheduleConfig'") 98 } 99 if args.SourceUri == nil { 100 return nil, errors.New("invalid value for required argument 'SourceUri'") 101 } 102 opts = internal.PkgResourceDefaultOpts(opts) 103 var resource DataIntegration 104 err := ctx.RegisterResource("aws:appintegrations/dataIntegration:DataIntegration", name, args, &resource, opts...) 105 if err != nil { 106 return nil, err 107 } 108 return &resource, nil 109 } 110 111 // GetDataIntegration gets an existing DataIntegration resource's state with the given name, ID, and optional 112 // state properties that are used to uniquely qualify the lookup (nil if not required). 113 func GetDataIntegration(ctx *pulumi.Context, 114 name string, id pulumi.IDInput, state *DataIntegrationState, opts ...pulumi.ResourceOption) (*DataIntegration, error) { 115 var resource DataIntegration 116 err := ctx.ReadResource("aws:appintegrations/dataIntegration:DataIntegration", name, id, state, &resource, opts...) 117 if err != nil { 118 return nil, err 119 } 120 return &resource, nil 121 } 122 123 // Input properties used for looking up and filtering DataIntegration resources. 124 type dataIntegrationState struct { 125 // The Amazon Resource Name (ARN) of the Data Integration. 126 Arn *string `pulumi:"arn"` 127 // Specifies the description of the Data Integration. 128 Description *string `pulumi:"description"` 129 // Specifies the KMS key Amazon Resource Name (ARN) for the Data Integration. 130 KmsKey *string `pulumi:"kmsKey"` 131 // Specifies the name of the Data Integration. 132 Name *string `pulumi:"name"` 133 // A block that defines the name of the data and how often it should be pulled from the source. The Schedule Config block is documented below. 134 ScheduleConfig *DataIntegrationScheduleConfig `pulumi:"scheduleConfig"` 135 // Specifies the URI of the data source. Create an AppFlow Connector Profile and reference the name of the profile in the URL. An example of this value for Salesforce is `Salesforce://AppFlow/example` where `example` is the name of the AppFlow Connector Profile. 136 SourceUri *string `pulumi:"sourceUri"` 137 // Tags to apply to the Data Integration. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 138 Tags map[string]string `pulumi:"tags"` 139 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 140 // 141 // Deprecated: Please use `tags` instead. 142 TagsAll map[string]string `pulumi:"tagsAll"` 143 } 144 145 type DataIntegrationState struct { 146 // The Amazon Resource Name (ARN) of the Data Integration. 147 Arn pulumi.StringPtrInput 148 // Specifies the description of the Data Integration. 149 Description pulumi.StringPtrInput 150 // Specifies the KMS key Amazon Resource Name (ARN) for the Data Integration. 151 KmsKey pulumi.StringPtrInput 152 // Specifies the name of the Data Integration. 153 Name pulumi.StringPtrInput 154 // A block that defines the name of the data and how often it should be pulled from the source. The Schedule Config block is documented below. 155 ScheduleConfig DataIntegrationScheduleConfigPtrInput 156 // Specifies the URI of the data source. Create an AppFlow Connector Profile and reference the name of the profile in the URL. An example of this value for Salesforce is `Salesforce://AppFlow/example` where `example` is the name of the AppFlow Connector Profile. 157 SourceUri pulumi.StringPtrInput 158 // Tags to apply to the Data Integration. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 159 Tags pulumi.StringMapInput 160 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 161 // 162 // Deprecated: Please use `tags` instead. 163 TagsAll pulumi.StringMapInput 164 } 165 166 func (DataIntegrationState) ElementType() reflect.Type { 167 return reflect.TypeOf((*dataIntegrationState)(nil)).Elem() 168 } 169 170 type dataIntegrationArgs struct { 171 // Specifies the description of the Data Integration. 172 Description *string `pulumi:"description"` 173 // Specifies the KMS key Amazon Resource Name (ARN) for the Data Integration. 174 KmsKey string `pulumi:"kmsKey"` 175 // Specifies the name of the Data Integration. 176 Name *string `pulumi:"name"` 177 // A block that defines the name of the data and how often it should be pulled from the source. The Schedule Config block is documented below. 178 ScheduleConfig DataIntegrationScheduleConfig `pulumi:"scheduleConfig"` 179 // Specifies the URI of the data source. Create an AppFlow Connector Profile and reference the name of the profile in the URL. An example of this value for Salesforce is `Salesforce://AppFlow/example` where `example` is the name of the AppFlow Connector Profile. 180 SourceUri string `pulumi:"sourceUri"` 181 // Tags to apply to the Data Integration. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 182 Tags map[string]string `pulumi:"tags"` 183 } 184 185 // The set of arguments for constructing a DataIntegration resource. 186 type DataIntegrationArgs struct { 187 // Specifies the description of the Data Integration. 188 Description pulumi.StringPtrInput 189 // Specifies the KMS key Amazon Resource Name (ARN) for the Data Integration. 190 KmsKey pulumi.StringInput 191 // Specifies the name of the Data Integration. 192 Name pulumi.StringPtrInput 193 // A block that defines the name of the data and how often it should be pulled from the source. The Schedule Config block is documented below. 194 ScheduleConfig DataIntegrationScheduleConfigInput 195 // Specifies the URI of the data source. Create an AppFlow Connector Profile and reference the name of the profile in the URL. An example of this value for Salesforce is `Salesforce://AppFlow/example` where `example` is the name of the AppFlow Connector Profile. 196 SourceUri pulumi.StringInput 197 // Tags to apply to the Data Integration. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 198 Tags pulumi.StringMapInput 199 } 200 201 func (DataIntegrationArgs) ElementType() reflect.Type { 202 return reflect.TypeOf((*dataIntegrationArgs)(nil)).Elem() 203 } 204 205 type DataIntegrationInput interface { 206 pulumi.Input 207 208 ToDataIntegrationOutput() DataIntegrationOutput 209 ToDataIntegrationOutputWithContext(ctx context.Context) DataIntegrationOutput 210 } 211 212 func (*DataIntegration) ElementType() reflect.Type { 213 return reflect.TypeOf((**DataIntegration)(nil)).Elem() 214 } 215 216 func (i *DataIntegration) ToDataIntegrationOutput() DataIntegrationOutput { 217 return i.ToDataIntegrationOutputWithContext(context.Background()) 218 } 219 220 func (i *DataIntegration) ToDataIntegrationOutputWithContext(ctx context.Context) DataIntegrationOutput { 221 return pulumi.ToOutputWithContext(ctx, i).(DataIntegrationOutput) 222 } 223 224 // DataIntegrationArrayInput is an input type that accepts DataIntegrationArray and DataIntegrationArrayOutput values. 225 // You can construct a concrete instance of `DataIntegrationArrayInput` via: 226 // 227 // DataIntegrationArray{ DataIntegrationArgs{...} } 228 type DataIntegrationArrayInput interface { 229 pulumi.Input 230 231 ToDataIntegrationArrayOutput() DataIntegrationArrayOutput 232 ToDataIntegrationArrayOutputWithContext(context.Context) DataIntegrationArrayOutput 233 } 234 235 type DataIntegrationArray []DataIntegrationInput 236 237 func (DataIntegrationArray) ElementType() reflect.Type { 238 return reflect.TypeOf((*[]*DataIntegration)(nil)).Elem() 239 } 240 241 func (i DataIntegrationArray) ToDataIntegrationArrayOutput() DataIntegrationArrayOutput { 242 return i.ToDataIntegrationArrayOutputWithContext(context.Background()) 243 } 244 245 func (i DataIntegrationArray) ToDataIntegrationArrayOutputWithContext(ctx context.Context) DataIntegrationArrayOutput { 246 return pulumi.ToOutputWithContext(ctx, i).(DataIntegrationArrayOutput) 247 } 248 249 // DataIntegrationMapInput is an input type that accepts DataIntegrationMap and DataIntegrationMapOutput values. 250 // You can construct a concrete instance of `DataIntegrationMapInput` via: 251 // 252 // DataIntegrationMap{ "key": DataIntegrationArgs{...} } 253 type DataIntegrationMapInput interface { 254 pulumi.Input 255 256 ToDataIntegrationMapOutput() DataIntegrationMapOutput 257 ToDataIntegrationMapOutputWithContext(context.Context) DataIntegrationMapOutput 258 } 259 260 type DataIntegrationMap map[string]DataIntegrationInput 261 262 func (DataIntegrationMap) ElementType() reflect.Type { 263 return reflect.TypeOf((*map[string]*DataIntegration)(nil)).Elem() 264 } 265 266 func (i DataIntegrationMap) ToDataIntegrationMapOutput() DataIntegrationMapOutput { 267 return i.ToDataIntegrationMapOutputWithContext(context.Background()) 268 } 269 270 func (i DataIntegrationMap) ToDataIntegrationMapOutputWithContext(ctx context.Context) DataIntegrationMapOutput { 271 return pulumi.ToOutputWithContext(ctx, i).(DataIntegrationMapOutput) 272 } 273 274 type DataIntegrationOutput struct{ *pulumi.OutputState } 275 276 func (DataIntegrationOutput) ElementType() reflect.Type { 277 return reflect.TypeOf((**DataIntegration)(nil)).Elem() 278 } 279 280 func (o DataIntegrationOutput) ToDataIntegrationOutput() DataIntegrationOutput { 281 return o 282 } 283 284 func (o DataIntegrationOutput) ToDataIntegrationOutputWithContext(ctx context.Context) DataIntegrationOutput { 285 return o 286 } 287 288 // The Amazon Resource Name (ARN) of the Data Integration. 289 func (o DataIntegrationOutput) Arn() pulumi.StringOutput { 290 return o.ApplyT(func(v *DataIntegration) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 291 } 292 293 // Specifies the description of the Data Integration. 294 func (o DataIntegrationOutput) Description() pulumi.StringPtrOutput { 295 return o.ApplyT(func(v *DataIntegration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 296 } 297 298 // Specifies the KMS key Amazon Resource Name (ARN) for the Data Integration. 299 func (o DataIntegrationOutput) KmsKey() pulumi.StringOutput { 300 return o.ApplyT(func(v *DataIntegration) pulumi.StringOutput { return v.KmsKey }).(pulumi.StringOutput) 301 } 302 303 // Specifies the name of the Data Integration. 304 func (o DataIntegrationOutput) Name() pulumi.StringOutput { 305 return o.ApplyT(func(v *DataIntegration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 306 } 307 308 // A block that defines the name of the data and how often it should be pulled from the source. The Schedule Config block is documented below. 309 func (o DataIntegrationOutput) ScheduleConfig() DataIntegrationScheduleConfigOutput { 310 return o.ApplyT(func(v *DataIntegration) DataIntegrationScheduleConfigOutput { return v.ScheduleConfig }).(DataIntegrationScheduleConfigOutput) 311 } 312 313 // Specifies the URI of the data source. Create an AppFlow Connector Profile and reference the name of the profile in the URL. An example of this value for Salesforce is `Salesforce://AppFlow/example` where `example` is the name of the AppFlow Connector Profile. 314 func (o DataIntegrationOutput) SourceUri() pulumi.StringOutput { 315 return o.ApplyT(func(v *DataIntegration) pulumi.StringOutput { return v.SourceUri }).(pulumi.StringOutput) 316 } 317 318 // Tags to apply to the Data Integration. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 319 func (o DataIntegrationOutput) Tags() pulumi.StringMapOutput { 320 return o.ApplyT(func(v *DataIntegration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 321 } 322 323 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 324 // 325 // Deprecated: Please use `tags` instead. 326 func (o DataIntegrationOutput) TagsAll() pulumi.StringMapOutput { 327 return o.ApplyT(func(v *DataIntegration) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 328 } 329 330 type DataIntegrationArrayOutput struct{ *pulumi.OutputState } 331 332 func (DataIntegrationArrayOutput) ElementType() reflect.Type { 333 return reflect.TypeOf((*[]*DataIntegration)(nil)).Elem() 334 } 335 336 func (o DataIntegrationArrayOutput) ToDataIntegrationArrayOutput() DataIntegrationArrayOutput { 337 return o 338 } 339 340 func (o DataIntegrationArrayOutput) ToDataIntegrationArrayOutputWithContext(ctx context.Context) DataIntegrationArrayOutput { 341 return o 342 } 343 344 func (o DataIntegrationArrayOutput) Index(i pulumi.IntInput) DataIntegrationOutput { 345 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DataIntegration { 346 return vs[0].([]*DataIntegration)[vs[1].(int)] 347 }).(DataIntegrationOutput) 348 } 349 350 type DataIntegrationMapOutput struct{ *pulumi.OutputState } 351 352 func (DataIntegrationMapOutput) ElementType() reflect.Type { 353 return reflect.TypeOf((*map[string]*DataIntegration)(nil)).Elem() 354 } 355 356 func (o DataIntegrationMapOutput) ToDataIntegrationMapOutput() DataIntegrationMapOutput { 357 return o 358 } 359 360 func (o DataIntegrationMapOutput) ToDataIntegrationMapOutputWithContext(ctx context.Context) DataIntegrationMapOutput { 361 return o 362 } 363 364 func (o DataIntegrationMapOutput) MapIndex(k pulumi.StringInput) DataIntegrationOutput { 365 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DataIntegration { 366 return vs[0].(map[string]*DataIntegration)[vs[1].(string)] 367 }).(DataIntegrationOutput) 368 } 369 370 func init() { 371 pulumi.RegisterInputType(reflect.TypeOf((*DataIntegrationInput)(nil)).Elem(), &DataIntegration{}) 372 pulumi.RegisterInputType(reflect.TypeOf((*DataIntegrationArrayInput)(nil)).Elem(), DataIntegrationArray{}) 373 pulumi.RegisterInputType(reflect.TypeOf((*DataIntegrationMapInput)(nil)).Elem(), DataIntegrationMap{}) 374 pulumi.RegisterOutputType(DataIntegrationOutput{}) 375 pulumi.RegisterOutputType(DataIntegrationArrayOutput{}) 376 pulumi.RegisterOutputType(DataIntegrationMapOutput{}) 377 }