github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/quicksight/ingestion.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 quicksight 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 QuickSight Ingestion. 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/quicksight" 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 := quicksight.NewIngestion(ctx, "example", &quicksight.IngestionArgs{ 35 // DataSetId: pulumi.Any(exampleAwsQuicksightDataSet.DataSetId), 36 // IngestionId: pulumi.String("example-id"), 37 // IngestionType: pulumi.String("FULL_REFRESH"), 38 // }) 39 // if err != nil { 40 // return err 41 // } 42 // return nil 43 // }) 44 // } 45 // 46 // ``` 47 // <!--End PulumiCodeChooser --> 48 // 49 // ## Import 50 // 51 // Using `pulumi import`, import QuickSight Ingestion using the AWS account ID, data set ID, and ingestion ID separated by commas (`,`). For example: 52 // 53 // ```sh 54 // $ pulumi import aws:quicksight/ingestion:Ingestion example 123456789012,example-dataset-id,example-ingestion-id 55 // ``` 56 type Ingestion struct { 57 pulumi.CustomResourceState 58 59 // ARN of the Ingestion. 60 Arn pulumi.StringOutput `pulumi:"arn"` 61 // AWS account ID. 62 AwsAccountId pulumi.StringOutput `pulumi:"awsAccountId"` 63 // ID of the dataset used in the ingestion. 64 DataSetId pulumi.StringOutput `pulumi:"dataSetId"` 65 // ID for the ingestion. 66 IngestionId pulumi.StringOutput `pulumi:"ingestionId"` 67 // Ingestion status. 68 IngestionStatus pulumi.StringOutput `pulumi:"ingestionStatus"` 69 // Type of ingestion to be created. Valid values are `INCREMENTAL_REFRESH` and `FULL_REFRESH`. 70 // 71 // The following arguments are optional: 72 IngestionType pulumi.StringOutput `pulumi:"ingestionType"` 73 } 74 75 // NewIngestion registers a new resource with the given unique name, arguments, and options. 76 func NewIngestion(ctx *pulumi.Context, 77 name string, args *IngestionArgs, opts ...pulumi.ResourceOption) (*Ingestion, error) { 78 if args == nil { 79 return nil, errors.New("missing one or more required arguments") 80 } 81 82 if args.DataSetId == nil { 83 return nil, errors.New("invalid value for required argument 'DataSetId'") 84 } 85 if args.IngestionId == nil { 86 return nil, errors.New("invalid value for required argument 'IngestionId'") 87 } 88 if args.IngestionType == nil { 89 return nil, errors.New("invalid value for required argument 'IngestionType'") 90 } 91 opts = internal.PkgResourceDefaultOpts(opts) 92 var resource Ingestion 93 err := ctx.RegisterResource("aws:quicksight/ingestion:Ingestion", name, args, &resource, opts...) 94 if err != nil { 95 return nil, err 96 } 97 return &resource, nil 98 } 99 100 // GetIngestion gets an existing Ingestion resource's state with the given name, ID, and optional 101 // state properties that are used to uniquely qualify the lookup (nil if not required). 102 func GetIngestion(ctx *pulumi.Context, 103 name string, id pulumi.IDInput, state *IngestionState, opts ...pulumi.ResourceOption) (*Ingestion, error) { 104 var resource Ingestion 105 err := ctx.ReadResource("aws:quicksight/ingestion:Ingestion", name, id, state, &resource, opts...) 106 if err != nil { 107 return nil, err 108 } 109 return &resource, nil 110 } 111 112 // Input properties used for looking up and filtering Ingestion resources. 113 type ingestionState struct { 114 // ARN of the Ingestion. 115 Arn *string `pulumi:"arn"` 116 // AWS account ID. 117 AwsAccountId *string `pulumi:"awsAccountId"` 118 // ID of the dataset used in the ingestion. 119 DataSetId *string `pulumi:"dataSetId"` 120 // ID for the ingestion. 121 IngestionId *string `pulumi:"ingestionId"` 122 // Ingestion status. 123 IngestionStatus *string `pulumi:"ingestionStatus"` 124 // Type of ingestion to be created. Valid values are `INCREMENTAL_REFRESH` and `FULL_REFRESH`. 125 // 126 // The following arguments are optional: 127 IngestionType *string `pulumi:"ingestionType"` 128 } 129 130 type IngestionState struct { 131 // ARN of the Ingestion. 132 Arn pulumi.StringPtrInput 133 // AWS account ID. 134 AwsAccountId pulumi.StringPtrInput 135 // ID of the dataset used in the ingestion. 136 DataSetId pulumi.StringPtrInput 137 // ID for the ingestion. 138 IngestionId pulumi.StringPtrInput 139 // Ingestion status. 140 IngestionStatus pulumi.StringPtrInput 141 // Type of ingestion to be created. Valid values are `INCREMENTAL_REFRESH` and `FULL_REFRESH`. 142 // 143 // The following arguments are optional: 144 IngestionType pulumi.StringPtrInput 145 } 146 147 func (IngestionState) ElementType() reflect.Type { 148 return reflect.TypeOf((*ingestionState)(nil)).Elem() 149 } 150 151 type ingestionArgs struct { 152 // AWS account ID. 153 AwsAccountId *string `pulumi:"awsAccountId"` 154 // ID of the dataset used in the ingestion. 155 DataSetId string `pulumi:"dataSetId"` 156 // ID for the ingestion. 157 IngestionId string `pulumi:"ingestionId"` 158 // Type of ingestion to be created. Valid values are `INCREMENTAL_REFRESH` and `FULL_REFRESH`. 159 // 160 // The following arguments are optional: 161 IngestionType string `pulumi:"ingestionType"` 162 } 163 164 // The set of arguments for constructing a Ingestion resource. 165 type IngestionArgs struct { 166 // AWS account ID. 167 AwsAccountId pulumi.StringPtrInput 168 // ID of the dataset used in the ingestion. 169 DataSetId pulumi.StringInput 170 // ID for the ingestion. 171 IngestionId pulumi.StringInput 172 // Type of ingestion to be created. Valid values are `INCREMENTAL_REFRESH` and `FULL_REFRESH`. 173 // 174 // The following arguments are optional: 175 IngestionType pulumi.StringInput 176 } 177 178 func (IngestionArgs) ElementType() reflect.Type { 179 return reflect.TypeOf((*ingestionArgs)(nil)).Elem() 180 } 181 182 type IngestionInput interface { 183 pulumi.Input 184 185 ToIngestionOutput() IngestionOutput 186 ToIngestionOutputWithContext(ctx context.Context) IngestionOutput 187 } 188 189 func (*Ingestion) ElementType() reflect.Type { 190 return reflect.TypeOf((**Ingestion)(nil)).Elem() 191 } 192 193 func (i *Ingestion) ToIngestionOutput() IngestionOutput { 194 return i.ToIngestionOutputWithContext(context.Background()) 195 } 196 197 func (i *Ingestion) ToIngestionOutputWithContext(ctx context.Context) IngestionOutput { 198 return pulumi.ToOutputWithContext(ctx, i).(IngestionOutput) 199 } 200 201 // IngestionArrayInput is an input type that accepts IngestionArray and IngestionArrayOutput values. 202 // You can construct a concrete instance of `IngestionArrayInput` via: 203 // 204 // IngestionArray{ IngestionArgs{...} } 205 type IngestionArrayInput interface { 206 pulumi.Input 207 208 ToIngestionArrayOutput() IngestionArrayOutput 209 ToIngestionArrayOutputWithContext(context.Context) IngestionArrayOutput 210 } 211 212 type IngestionArray []IngestionInput 213 214 func (IngestionArray) ElementType() reflect.Type { 215 return reflect.TypeOf((*[]*Ingestion)(nil)).Elem() 216 } 217 218 func (i IngestionArray) ToIngestionArrayOutput() IngestionArrayOutput { 219 return i.ToIngestionArrayOutputWithContext(context.Background()) 220 } 221 222 func (i IngestionArray) ToIngestionArrayOutputWithContext(ctx context.Context) IngestionArrayOutput { 223 return pulumi.ToOutputWithContext(ctx, i).(IngestionArrayOutput) 224 } 225 226 // IngestionMapInput is an input type that accepts IngestionMap and IngestionMapOutput values. 227 // You can construct a concrete instance of `IngestionMapInput` via: 228 // 229 // IngestionMap{ "key": IngestionArgs{...} } 230 type IngestionMapInput interface { 231 pulumi.Input 232 233 ToIngestionMapOutput() IngestionMapOutput 234 ToIngestionMapOutputWithContext(context.Context) IngestionMapOutput 235 } 236 237 type IngestionMap map[string]IngestionInput 238 239 func (IngestionMap) ElementType() reflect.Type { 240 return reflect.TypeOf((*map[string]*Ingestion)(nil)).Elem() 241 } 242 243 func (i IngestionMap) ToIngestionMapOutput() IngestionMapOutput { 244 return i.ToIngestionMapOutputWithContext(context.Background()) 245 } 246 247 func (i IngestionMap) ToIngestionMapOutputWithContext(ctx context.Context) IngestionMapOutput { 248 return pulumi.ToOutputWithContext(ctx, i).(IngestionMapOutput) 249 } 250 251 type IngestionOutput struct{ *pulumi.OutputState } 252 253 func (IngestionOutput) ElementType() reflect.Type { 254 return reflect.TypeOf((**Ingestion)(nil)).Elem() 255 } 256 257 func (o IngestionOutput) ToIngestionOutput() IngestionOutput { 258 return o 259 } 260 261 func (o IngestionOutput) ToIngestionOutputWithContext(ctx context.Context) IngestionOutput { 262 return o 263 } 264 265 // ARN of the Ingestion. 266 func (o IngestionOutput) Arn() pulumi.StringOutput { 267 return o.ApplyT(func(v *Ingestion) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 268 } 269 270 // AWS account ID. 271 func (o IngestionOutput) AwsAccountId() pulumi.StringOutput { 272 return o.ApplyT(func(v *Ingestion) pulumi.StringOutput { return v.AwsAccountId }).(pulumi.StringOutput) 273 } 274 275 // ID of the dataset used in the ingestion. 276 func (o IngestionOutput) DataSetId() pulumi.StringOutput { 277 return o.ApplyT(func(v *Ingestion) pulumi.StringOutput { return v.DataSetId }).(pulumi.StringOutput) 278 } 279 280 // ID for the ingestion. 281 func (o IngestionOutput) IngestionId() pulumi.StringOutput { 282 return o.ApplyT(func(v *Ingestion) pulumi.StringOutput { return v.IngestionId }).(pulumi.StringOutput) 283 } 284 285 // Ingestion status. 286 func (o IngestionOutput) IngestionStatus() pulumi.StringOutput { 287 return o.ApplyT(func(v *Ingestion) pulumi.StringOutput { return v.IngestionStatus }).(pulumi.StringOutput) 288 } 289 290 // Type of ingestion to be created. Valid values are `INCREMENTAL_REFRESH` and `FULL_REFRESH`. 291 // 292 // The following arguments are optional: 293 func (o IngestionOutput) IngestionType() pulumi.StringOutput { 294 return o.ApplyT(func(v *Ingestion) pulumi.StringOutput { return v.IngestionType }).(pulumi.StringOutput) 295 } 296 297 type IngestionArrayOutput struct{ *pulumi.OutputState } 298 299 func (IngestionArrayOutput) ElementType() reflect.Type { 300 return reflect.TypeOf((*[]*Ingestion)(nil)).Elem() 301 } 302 303 func (o IngestionArrayOutput) ToIngestionArrayOutput() IngestionArrayOutput { 304 return o 305 } 306 307 func (o IngestionArrayOutput) ToIngestionArrayOutputWithContext(ctx context.Context) IngestionArrayOutput { 308 return o 309 } 310 311 func (o IngestionArrayOutput) Index(i pulumi.IntInput) IngestionOutput { 312 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Ingestion { 313 return vs[0].([]*Ingestion)[vs[1].(int)] 314 }).(IngestionOutput) 315 } 316 317 type IngestionMapOutput struct{ *pulumi.OutputState } 318 319 func (IngestionMapOutput) ElementType() reflect.Type { 320 return reflect.TypeOf((*map[string]*Ingestion)(nil)).Elem() 321 } 322 323 func (o IngestionMapOutput) ToIngestionMapOutput() IngestionMapOutput { 324 return o 325 } 326 327 func (o IngestionMapOutput) ToIngestionMapOutputWithContext(ctx context.Context) IngestionMapOutput { 328 return o 329 } 330 331 func (o IngestionMapOutput) MapIndex(k pulumi.StringInput) IngestionOutput { 332 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Ingestion { 333 return vs[0].(map[string]*Ingestion)[vs[1].(string)] 334 }).(IngestionOutput) 335 } 336 337 func init() { 338 pulumi.RegisterInputType(reflect.TypeOf((*IngestionInput)(nil)).Elem(), &Ingestion{}) 339 pulumi.RegisterInputType(reflect.TypeOf((*IngestionArrayInput)(nil)).Elem(), IngestionArray{}) 340 pulumi.RegisterInputType(reflect.TypeOf((*IngestionMapInput)(nil)).Elem(), IngestionMap{}) 341 pulumi.RegisterOutputType(IngestionOutput{}) 342 pulumi.RegisterOutputType(IngestionArrayOutput{}) 343 pulumi.RegisterOutputType(IngestionMapOutput{}) 344 }