github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/qldb/stream.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 qldb 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 AWS Quantum Ledger Database (QLDB) Stream 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/qldb" 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 := qldb.NewStream(ctx, "example", &qldb.StreamArgs{ 33 // LedgerName: pulumi.String("existing-ledger-name"), 34 // StreamName: pulumi.String("sample-ledger-stream"), 35 // RoleArn: pulumi.String("sample-role-arn"), 36 // InclusiveStartTime: pulumi.String("2021-01-01T00:00:00Z"), 37 // KinesisConfiguration: &qldb.StreamKinesisConfigurationArgs{ 38 // AggregationEnabled: pulumi.Bool(false), 39 // StreamArn: pulumi.String("arn:aws:kinesis:us-east-1:xxxxxxxxxxxx:stream/example-kinesis-stream"), 40 // }, 41 // Tags: pulumi.StringMap{ 42 // "example": pulumi.String("tag"), 43 // }, 44 // }) 45 // if err != nil { 46 // return err 47 // } 48 // return nil 49 // }) 50 // } 51 // 52 // ``` 53 // <!--End PulumiCodeChooser --> 54 type Stream struct { 55 pulumi.CustomResourceState 56 57 // The ARN of the QLDB Stream. 58 Arn pulumi.StringOutput `pulumi:"arn"` 59 // The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it. It must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. 60 ExclusiveEndTime pulumi.StringPtrOutput `pulumi:"exclusiveEndTime"` 61 // The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. This cannot be in the future and must be before `exclusiveEndTime`. If you provide a value that is before the ledger's `CreationDateTime`, QLDB effectively defaults it to the ledger's `CreationDateTime`. 62 InclusiveStartTime pulumi.StringOutput `pulumi:"inclusiveStartTime"` 63 // The configuration settings of the Kinesis Data Streams destination for your stream request. Documented below. 64 KinesisConfiguration StreamKinesisConfigurationOutput `pulumi:"kinesisConfiguration"` 65 // The name of the QLDB ledger. 66 LedgerName pulumi.StringOutput `pulumi:"ledgerName"` 67 // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource. 68 RoleArn pulumi.StringOutput `pulumi:"roleArn"` 69 // The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream. Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in the [Amazon QLDB Developer Guide](https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming). 70 StreamName pulumi.StringOutput `pulumi:"streamName"` 71 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 72 Tags pulumi.StringMapOutput `pulumi:"tags"` 73 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 74 // 75 // Deprecated: Please use `tags` instead. 76 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 77 } 78 79 // NewStream registers a new resource with the given unique name, arguments, and options. 80 func NewStream(ctx *pulumi.Context, 81 name string, args *StreamArgs, opts ...pulumi.ResourceOption) (*Stream, error) { 82 if args == nil { 83 return nil, errors.New("missing one or more required arguments") 84 } 85 86 if args.InclusiveStartTime == nil { 87 return nil, errors.New("invalid value for required argument 'InclusiveStartTime'") 88 } 89 if args.KinesisConfiguration == nil { 90 return nil, errors.New("invalid value for required argument 'KinesisConfiguration'") 91 } 92 if args.LedgerName == nil { 93 return nil, errors.New("invalid value for required argument 'LedgerName'") 94 } 95 if args.RoleArn == nil { 96 return nil, errors.New("invalid value for required argument 'RoleArn'") 97 } 98 if args.StreamName == nil { 99 return nil, errors.New("invalid value for required argument 'StreamName'") 100 } 101 opts = internal.PkgResourceDefaultOpts(opts) 102 var resource Stream 103 err := ctx.RegisterResource("aws:qldb/stream:Stream", name, args, &resource, opts...) 104 if err != nil { 105 return nil, err 106 } 107 return &resource, nil 108 } 109 110 // GetStream gets an existing Stream resource's state with the given name, ID, and optional 111 // state properties that are used to uniquely qualify the lookup (nil if not required). 112 func GetStream(ctx *pulumi.Context, 113 name string, id pulumi.IDInput, state *StreamState, opts ...pulumi.ResourceOption) (*Stream, error) { 114 var resource Stream 115 err := ctx.ReadResource("aws:qldb/stream:Stream", name, id, state, &resource, opts...) 116 if err != nil { 117 return nil, err 118 } 119 return &resource, nil 120 } 121 122 // Input properties used for looking up and filtering Stream resources. 123 type streamState struct { 124 // The ARN of the QLDB Stream. 125 Arn *string `pulumi:"arn"` 126 // The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it. It must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. 127 ExclusiveEndTime *string `pulumi:"exclusiveEndTime"` 128 // The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. This cannot be in the future and must be before `exclusiveEndTime`. If you provide a value that is before the ledger's `CreationDateTime`, QLDB effectively defaults it to the ledger's `CreationDateTime`. 129 InclusiveStartTime *string `pulumi:"inclusiveStartTime"` 130 // The configuration settings of the Kinesis Data Streams destination for your stream request. Documented below. 131 KinesisConfiguration *StreamKinesisConfiguration `pulumi:"kinesisConfiguration"` 132 // The name of the QLDB ledger. 133 LedgerName *string `pulumi:"ledgerName"` 134 // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource. 135 RoleArn *string `pulumi:"roleArn"` 136 // The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream. Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in the [Amazon QLDB Developer Guide](https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming). 137 StreamName *string `pulumi:"streamName"` 138 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 139 Tags map[string]string `pulumi:"tags"` 140 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 141 // 142 // Deprecated: Please use `tags` instead. 143 TagsAll map[string]string `pulumi:"tagsAll"` 144 } 145 146 type StreamState struct { 147 // The ARN of the QLDB Stream. 148 Arn pulumi.StringPtrInput 149 // The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it. It must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. 150 ExclusiveEndTime pulumi.StringPtrInput 151 // The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. This cannot be in the future and must be before `exclusiveEndTime`. If you provide a value that is before the ledger's `CreationDateTime`, QLDB effectively defaults it to the ledger's `CreationDateTime`. 152 InclusiveStartTime pulumi.StringPtrInput 153 // The configuration settings of the Kinesis Data Streams destination for your stream request. Documented below. 154 KinesisConfiguration StreamKinesisConfigurationPtrInput 155 // The name of the QLDB ledger. 156 LedgerName pulumi.StringPtrInput 157 // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource. 158 RoleArn pulumi.StringPtrInput 159 // The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream. Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in the [Amazon QLDB Developer Guide](https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming). 160 StreamName pulumi.StringPtrInput 161 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 162 Tags pulumi.StringMapInput 163 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 164 // 165 // Deprecated: Please use `tags` instead. 166 TagsAll pulumi.StringMapInput 167 } 168 169 func (StreamState) ElementType() reflect.Type { 170 return reflect.TypeOf((*streamState)(nil)).Elem() 171 } 172 173 type streamArgs struct { 174 // The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it. It must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. 175 ExclusiveEndTime *string `pulumi:"exclusiveEndTime"` 176 // The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. This cannot be in the future and must be before `exclusiveEndTime`. If you provide a value that is before the ledger's `CreationDateTime`, QLDB effectively defaults it to the ledger's `CreationDateTime`. 177 InclusiveStartTime string `pulumi:"inclusiveStartTime"` 178 // The configuration settings of the Kinesis Data Streams destination for your stream request. Documented below. 179 KinesisConfiguration StreamKinesisConfiguration `pulumi:"kinesisConfiguration"` 180 // The name of the QLDB ledger. 181 LedgerName string `pulumi:"ledgerName"` 182 // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource. 183 RoleArn string `pulumi:"roleArn"` 184 // The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream. Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in the [Amazon QLDB Developer Guide](https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming). 185 StreamName string `pulumi:"streamName"` 186 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 187 Tags map[string]string `pulumi:"tags"` 188 } 189 190 // The set of arguments for constructing a Stream resource. 191 type StreamArgs struct { 192 // The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it. It must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. 193 ExclusiveEndTime pulumi.StringPtrInput 194 // The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. This cannot be in the future and must be before `exclusiveEndTime`. If you provide a value that is before the ledger's `CreationDateTime`, QLDB effectively defaults it to the ledger's `CreationDateTime`. 195 InclusiveStartTime pulumi.StringInput 196 // The configuration settings of the Kinesis Data Streams destination for your stream request. Documented below. 197 KinesisConfiguration StreamKinesisConfigurationInput 198 // The name of the QLDB ledger. 199 LedgerName pulumi.StringInput 200 // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource. 201 RoleArn pulumi.StringInput 202 // The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream. Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in the [Amazon QLDB Developer Guide](https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming). 203 StreamName pulumi.StringInput 204 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 205 Tags pulumi.StringMapInput 206 } 207 208 func (StreamArgs) ElementType() reflect.Type { 209 return reflect.TypeOf((*streamArgs)(nil)).Elem() 210 } 211 212 type StreamInput interface { 213 pulumi.Input 214 215 ToStreamOutput() StreamOutput 216 ToStreamOutputWithContext(ctx context.Context) StreamOutput 217 } 218 219 func (*Stream) ElementType() reflect.Type { 220 return reflect.TypeOf((**Stream)(nil)).Elem() 221 } 222 223 func (i *Stream) ToStreamOutput() StreamOutput { 224 return i.ToStreamOutputWithContext(context.Background()) 225 } 226 227 func (i *Stream) ToStreamOutputWithContext(ctx context.Context) StreamOutput { 228 return pulumi.ToOutputWithContext(ctx, i).(StreamOutput) 229 } 230 231 // StreamArrayInput is an input type that accepts StreamArray and StreamArrayOutput values. 232 // You can construct a concrete instance of `StreamArrayInput` via: 233 // 234 // StreamArray{ StreamArgs{...} } 235 type StreamArrayInput interface { 236 pulumi.Input 237 238 ToStreamArrayOutput() StreamArrayOutput 239 ToStreamArrayOutputWithContext(context.Context) StreamArrayOutput 240 } 241 242 type StreamArray []StreamInput 243 244 func (StreamArray) ElementType() reflect.Type { 245 return reflect.TypeOf((*[]*Stream)(nil)).Elem() 246 } 247 248 func (i StreamArray) ToStreamArrayOutput() StreamArrayOutput { 249 return i.ToStreamArrayOutputWithContext(context.Background()) 250 } 251 252 func (i StreamArray) ToStreamArrayOutputWithContext(ctx context.Context) StreamArrayOutput { 253 return pulumi.ToOutputWithContext(ctx, i).(StreamArrayOutput) 254 } 255 256 // StreamMapInput is an input type that accepts StreamMap and StreamMapOutput values. 257 // You can construct a concrete instance of `StreamMapInput` via: 258 // 259 // StreamMap{ "key": StreamArgs{...} } 260 type StreamMapInput interface { 261 pulumi.Input 262 263 ToStreamMapOutput() StreamMapOutput 264 ToStreamMapOutputWithContext(context.Context) StreamMapOutput 265 } 266 267 type StreamMap map[string]StreamInput 268 269 func (StreamMap) ElementType() reflect.Type { 270 return reflect.TypeOf((*map[string]*Stream)(nil)).Elem() 271 } 272 273 func (i StreamMap) ToStreamMapOutput() StreamMapOutput { 274 return i.ToStreamMapOutputWithContext(context.Background()) 275 } 276 277 func (i StreamMap) ToStreamMapOutputWithContext(ctx context.Context) StreamMapOutput { 278 return pulumi.ToOutputWithContext(ctx, i).(StreamMapOutput) 279 } 280 281 type StreamOutput struct{ *pulumi.OutputState } 282 283 func (StreamOutput) ElementType() reflect.Type { 284 return reflect.TypeOf((**Stream)(nil)).Elem() 285 } 286 287 func (o StreamOutput) ToStreamOutput() StreamOutput { 288 return o 289 } 290 291 func (o StreamOutput) ToStreamOutputWithContext(ctx context.Context) StreamOutput { 292 return o 293 } 294 295 // The ARN of the QLDB Stream. 296 func (o StreamOutput) Arn() pulumi.StringOutput { 297 return o.ApplyT(func(v *Stream) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 298 } 299 300 // The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it. It must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. 301 func (o StreamOutput) ExclusiveEndTime() pulumi.StringPtrOutput { 302 return o.ApplyT(func(v *Stream) pulumi.StringPtrOutput { return v.ExclusiveEndTime }).(pulumi.StringPtrOutput) 303 } 304 305 // The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: `"2019-06-13T21:36:34Z"`. This cannot be in the future and must be before `exclusiveEndTime`. If you provide a value that is before the ledger's `CreationDateTime`, QLDB effectively defaults it to the ledger's `CreationDateTime`. 306 func (o StreamOutput) InclusiveStartTime() pulumi.StringOutput { 307 return o.ApplyT(func(v *Stream) pulumi.StringOutput { return v.InclusiveStartTime }).(pulumi.StringOutput) 308 } 309 310 // The configuration settings of the Kinesis Data Streams destination for your stream request. Documented below. 311 func (o StreamOutput) KinesisConfiguration() StreamKinesisConfigurationOutput { 312 return o.ApplyT(func(v *Stream) StreamKinesisConfigurationOutput { return v.KinesisConfiguration }).(StreamKinesisConfigurationOutput) 313 } 314 315 // The name of the QLDB ledger. 316 func (o StreamOutput) LedgerName() pulumi.StringOutput { 317 return o.ApplyT(func(v *Stream) pulumi.StringOutput { return v.LedgerName }).(pulumi.StringOutput) 318 } 319 320 // The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource. 321 func (o StreamOutput) RoleArn() pulumi.StringOutput { 322 return o.ApplyT(func(v *Stream) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) 323 } 324 325 // The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream. Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in the [Amazon QLDB Developer Guide](https://docs.aws.amazon.com/qldb/latest/developerguide/limits.html#limits.naming). 326 func (o StreamOutput) StreamName() pulumi.StringOutput { 327 return o.ApplyT(func(v *Stream) pulumi.StringOutput { return v.StreamName }).(pulumi.StringOutput) 328 } 329 330 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 331 func (o StreamOutput) Tags() pulumi.StringMapOutput { 332 return o.ApplyT(func(v *Stream) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 333 } 334 335 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 336 // 337 // Deprecated: Please use `tags` instead. 338 func (o StreamOutput) TagsAll() pulumi.StringMapOutput { 339 return o.ApplyT(func(v *Stream) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 340 } 341 342 type StreamArrayOutput struct{ *pulumi.OutputState } 343 344 func (StreamArrayOutput) ElementType() reflect.Type { 345 return reflect.TypeOf((*[]*Stream)(nil)).Elem() 346 } 347 348 func (o StreamArrayOutput) ToStreamArrayOutput() StreamArrayOutput { 349 return o 350 } 351 352 func (o StreamArrayOutput) ToStreamArrayOutputWithContext(ctx context.Context) StreamArrayOutput { 353 return o 354 } 355 356 func (o StreamArrayOutput) Index(i pulumi.IntInput) StreamOutput { 357 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Stream { 358 return vs[0].([]*Stream)[vs[1].(int)] 359 }).(StreamOutput) 360 } 361 362 type StreamMapOutput struct{ *pulumi.OutputState } 363 364 func (StreamMapOutput) ElementType() reflect.Type { 365 return reflect.TypeOf((*map[string]*Stream)(nil)).Elem() 366 } 367 368 func (o StreamMapOutput) ToStreamMapOutput() StreamMapOutput { 369 return o 370 } 371 372 func (o StreamMapOutput) ToStreamMapOutputWithContext(ctx context.Context) StreamMapOutput { 373 return o 374 } 375 376 func (o StreamMapOutput) MapIndex(k pulumi.StringInput) StreamOutput { 377 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Stream { 378 return vs[0].(map[string]*Stream)[vs[1].(string)] 379 }).(StreamOutput) 380 } 381 382 func init() { 383 pulumi.RegisterInputType(reflect.TypeOf((*StreamInput)(nil)).Elem(), &Stream{}) 384 pulumi.RegisterInputType(reflect.TypeOf((*StreamArrayInput)(nil)).Elem(), StreamArray{}) 385 pulumi.RegisterInputType(reflect.TypeOf((*StreamMapInput)(nil)).Elem(), StreamMap{}) 386 pulumi.RegisterOutputType(StreamOutput{}) 387 pulumi.RegisterOutputType(StreamArrayOutput{}) 388 pulumi.RegisterOutputType(StreamMapOutput{}) 389 }