github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/rds/snapshot.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 rds 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 an RDS database instance snapshot. For managing RDS database cluster snapshots, see the `rds.ClusterSnapshot` 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/rds" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // bar, err := rds.NewInstance(ctx, "bar", &rds.InstanceArgs{ 33 // AllocatedStorage: pulumi.Int(10), 34 // Engine: pulumi.String("mysql"), 35 // EngineVersion: pulumi.String("5.6.21"), 36 // InstanceClass: pulumi.String(rds.InstanceType_T2_Micro), 37 // DbName: pulumi.String("baz"), 38 // Password: pulumi.String("barbarbarbar"), 39 // Username: pulumi.String("foo"), 40 // MaintenanceWindow: pulumi.String("Fri:09:00-Fri:09:30"), 41 // BackupRetentionPeriod: pulumi.Int(0), 42 // ParameterGroupName: pulumi.String("default.mysql5.6"), 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // _, err = rds.NewSnapshot(ctx, "test", &rds.SnapshotArgs{ 48 // DbInstanceIdentifier: bar.Identifier, 49 // DbSnapshotIdentifier: pulumi.String("testsnapshot1234"), 50 // }) 51 // if err != nil { 52 // return err 53 // } 54 // return nil 55 // }) 56 // } 57 // 58 // ``` 59 // <!--End PulumiCodeChooser --> 60 // 61 // ## Import 62 // 63 // Using `pulumi import`, import `aws_db_snapshot` using the snapshot identifier. For example: 64 // 65 // ```sh 66 // $ pulumi import aws:rds/snapshot:Snapshot example my-snapshot 67 // ``` 68 type Snapshot struct { 69 pulumi.CustomResourceState 70 71 // Specifies the allocated storage size in gigabytes (GB). 72 AllocatedStorage pulumi.IntOutput `pulumi:"allocatedStorage"` 73 // Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot. 74 AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` 75 // The DB Instance Identifier from which to take the snapshot. 76 DbInstanceIdentifier pulumi.StringOutput `pulumi:"dbInstanceIdentifier"` 77 // The Amazon Resource Name (ARN) for the DB snapshot. 78 DbSnapshotArn pulumi.StringOutput `pulumi:"dbSnapshotArn"` 79 // The Identifier for the snapshot. 80 DbSnapshotIdentifier pulumi.StringOutput `pulumi:"dbSnapshotIdentifier"` 81 // Specifies whether the DB snapshot is encrypted. 82 Encrypted pulumi.BoolOutput `pulumi:"encrypted"` 83 // Specifies the name of the database engine. 84 Engine pulumi.StringOutput `pulumi:"engine"` 85 // Specifies the version of the database engine. 86 EngineVersion pulumi.StringOutput `pulumi:"engineVersion"` 87 // Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot. 88 Iops pulumi.IntOutput `pulumi:"iops"` 89 // The ARN for the KMS encryption key. 90 KmsKeyId pulumi.StringOutput `pulumi:"kmsKeyId"` 91 // License model information for the restored DB instance. 92 LicenseModel pulumi.StringOutput `pulumi:"licenseModel"` 93 // Provides the option group name for the DB snapshot. 94 OptionGroupName pulumi.StringOutput `pulumi:"optionGroupName"` 95 Port pulumi.IntOutput `pulumi:"port"` 96 // List of AWS Account ids to share snapshot with, use `all` to make snaphot public. 97 SharedAccounts pulumi.StringArrayOutput `pulumi:"sharedAccounts"` 98 SnapshotType pulumi.StringOutput `pulumi:"snapshotType"` 99 // The DB snapshot Arn that the DB snapshot was copied from. It only has value in case of cross customer or cross region copy. 100 SourceDbSnapshotIdentifier pulumi.StringOutput `pulumi:"sourceDbSnapshotIdentifier"` 101 // The region that the DB snapshot was created in or copied from. 102 SourceRegion pulumi.StringOutput `pulumi:"sourceRegion"` 103 // Specifies the status of this DB snapshot. 104 Status pulumi.StringOutput `pulumi:"status"` 105 // Specifies the storage type associated with DB snapshot. 106 StorageType pulumi.StringOutput `pulumi:"storageType"` 107 // 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. 108 Tags pulumi.StringMapOutput `pulumi:"tags"` 109 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 110 // 111 // Deprecated: Please use `tags` instead. 112 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 113 // Provides the VPC ID associated with the DB snapshot. 114 VpcId pulumi.StringOutput `pulumi:"vpcId"` 115 } 116 117 // NewSnapshot registers a new resource with the given unique name, arguments, and options. 118 func NewSnapshot(ctx *pulumi.Context, 119 name string, args *SnapshotArgs, opts ...pulumi.ResourceOption) (*Snapshot, error) { 120 if args == nil { 121 return nil, errors.New("missing one or more required arguments") 122 } 123 124 if args.DbInstanceIdentifier == nil { 125 return nil, errors.New("invalid value for required argument 'DbInstanceIdentifier'") 126 } 127 if args.DbSnapshotIdentifier == nil { 128 return nil, errors.New("invalid value for required argument 'DbSnapshotIdentifier'") 129 } 130 opts = internal.PkgResourceDefaultOpts(opts) 131 var resource Snapshot 132 err := ctx.RegisterResource("aws:rds/snapshot:Snapshot", name, args, &resource, opts...) 133 if err != nil { 134 return nil, err 135 } 136 return &resource, nil 137 } 138 139 // GetSnapshot gets an existing Snapshot resource's state with the given name, ID, and optional 140 // state properties that are used to uniquely qualify the lookup (nil if not required). 141 func GetSnapshot(ctx *pulumi.Context, 142 name string, id pulumi.IDInput, state *SnapshotState, opts ...pulumi.ResourceOption) (*Snapshot, error) { 143 var resource Snapshot 144 err := ctx.ReadResource("aws:rds/snapshot:Snapshot", name, id, state, &resource, opts...) 145 if err != nil { 146 return nil, err 147 } 148 return &resource, nil 149 } 150 151 // Input properties used for looking up and filtering Snapshot resources. 152 type snapshotState struct { 153 // Specifies the allocated storage size in gigabytes (GB). 154 AllocatedStorage *int `pulumi:"allocatedStorage"` 155 // Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot. 156 AvailabilityZone *string `pulumi:"availabilityZone"` 157 // The DB Instance Identifier from which to take the snapshot. 158 DbInstanceIdentifier *string `pulumi:"dbInstanceIdentifier"` 159 // The Amazon Resource Name (ARN) for the DB snapshot. 160 DbSnapshotArn *string `pulumi:"dbSnapshotArn"` 161 // The Identifier for the snapshot. 162 DbSnapshotIdentifier *string `pulumi:"dbSnapshotIdentifier"` 163 // Specifies whether the DB snapshot is encrypted. 164 Encrypted *bool `pulumi:"encrypted"` 165 // Specifies the name of the database engine. 166 Engine *string `pulumi:"engine"` 167 // Specifies the version of the database engine. 168 EngineVersion *string `pulumi:"engineVersion"` 169 // Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot. 170 Iops *int `pulumi:"iops"` 171 // The ARN for the KMS encryption key. 172 KmsKeyId *string `pulumi:"kmsKeyId"` 173 // License model information for the restored DB instance. 174 LicenseModel *string `pulumi:"licenseModel"` 175 // Provides the option group name for the DB snapshot. 176 OptionGroupName *string `pulumi:"optionGroupName"` 177 Port *int `pulumi:"port"` 178 // List of AWS Account ids to share snapshot with, use `all` to make snaphot public. 179 SharedAccounts []string `pulumi:"sharedAccounts"` 180 SnapshotType *string `pulumi:"snapshotType"` 181 // The DB snapshot Arn that the DB snapshot was copied from. It only has value in case of cross customer or cross region copy. 182 SourceDbSnapshotIdentifier *string `pulumi:"sourceDbSnapshotIdentifier"` 183 // The region that the DB snapshot was created in or copied from. 184 SourceRegion *string `pulumi:"sourceRegion"` 185 // Specifies the status of this DB snapshot. 186 Status *string `pulumi:"status"` 187 // Specifies the storage type associated with DB snapshot. 188 StorageType *string `pulumi:"storageType"` 189 // 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. 190 Tags map[string]string `pulumi:"tags"` 191 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 192 // 193 // Deprecated: Please use `tags` instead. 194 TagsAll map[string]string `pulumi:"tagsAll"` 195 // Provides the VPC ID associated with the DB snapshot. 196 VpcId *string `pulumi:"vpcId"` 197 } 198 199 type SnapshotState struct { 200 // Specifies the allocated storage size in gigabytes (GB). 201 AllocatedStorage pulumi.IntPtrInput 202 // Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot. 203 AvailabilityZone pulumi.StringPtrInput 204 // The DB Instance Identifier from which to take the snapshot. 205 DbInstanceIdentifier pulumi.StringPtrInput 206 // The Amazon Resource Name (ARN) for the DB snapshot. 207 DbSnapshotArn pulumi.StringPtrInput 208 // The Identifier for the snapshot. 209 DbSnapshotIdentifier pulumi.StringPtrInput 210 // Specifies whether the DB snapshot is encrypted. 211 Encrypted pulumi.BoolPtrInput 212 // Specifies the name of the database engine. 213 Engine pulumi.StringPtrInput 214 // Specifies the version of the database engine. 215 EngineVersion pulumi.StringPtrInput 216 // Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot. 217 Iops pulumi.IntPtrInput 218 // The ARN for the KMS encryption key. 219 KmsKeyId pulumi.StringPtrInput 220 // License model information for the restored DB instance. 221 LicenseModel pulumi.StringPtrInput 222 // Provides the option group name for the DB snapshot. 223 OptionGroupName pulumi.StringPtrInput 224 Port pulumi.IntPtrInput 225 // List of AWS Account ids to share snapshot with, use `all` to make snaphot public. 226 SharedAccounts pulumi.StringArrayInput 227 SnapshotType pulumi.StringPtrInput 228 // The DB snapshot Arn that the DB snapshot was copied from. It only has value in case of cross customer or cross region copy. 229 SourceDbSnapshotIdentifier pulumi.StringPtrInput 230 // The region that the DB snapshot was created in or copied from. 231 SourceRegion pulumi.StringPtrInput 232 // Specifies the status of this DB snapshot. 233 Status pulumi.StringPtrInput 234 // Specifies the storage type associated with DB snapshot. 235 StorageType pulumi.StringPtrInput 236 // 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. 237 Tags pulumi.StringMapInput 238 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 239 // 240 // Deprecated: Please use `tags` instead. 241 TagsAll pulumi.StringMapInput 242 // Provides the VPC ID associated with the DB snapshot. 243 VpcId pulumi.StringPtrInput 244 } 245 246 func (SnapshotState) ElementType() reflect.Type { 247 return reflect.TypeOf((*snapshotState)(nil)).Elem() 248 } 249 250 type snapshotArgs struct { 251 // The DB Instance Identifier from which to take the snapshot. 252 DbInstanceIdentifier string `pulumi:"dbInstanceIdentifier"` 253 // The Identifier for the snapshot. 254 DbSnapshotIdentifier string `pulumi:"dbSnapshotIdentifier"` 255 // List of AWS Account ids to share snapshot with, use `all` to make snaphot public. 256 SharedAccounts []string `pulumi:"sharedAccounts"` 257 // 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. 258 Tags map[string]string `pulumi:"tags"` 259 } 260 261 // The set of arguments for constructing a Snapshot resource. 262 type SnapshotArgs struct { 263 // The DB Instance Identifier from which to take the snapshot. 264 DbInstanceIdentifier pulumi.StringInput 265 // The Identifier for the snapshot. 266 DbSnapshotIdentifier pulumi.StringInput 267 // List of AWS Account ids to share snapshot with, use `all` to make snaphot public. 268 SharedAccounts pulumi.StringArrayInput 269 // 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. 270 Tags pulumi.StringMapInput 271 } 272 273 func (SnapshotArgs) ElementType() reflect.Type { 274 return reflect.TypeOf((*snapshotArgs)(nil)).Elem() 275 } 276 277 type SnapshotInput interface { 278 pulumi.Input 279 280 ToSnapshotOutput() SnapshotOutput 281 ToSnapshotOutputWithContext(ctx context.Context) SnapshotOutput 282 } 283 284 func (*Snapshot) ElementType() reflect.Type { 285 return reflect.TypeOf((**Snapshot)(nil)).Elem() 286 } 287 288 func (i *Snapshot) ToSnapshotOutput() SnapshotOutput { 289 return i.ToSnapshotOutputWithContext(context.Background()) 290 } 291 292 func (i *Snapshot) ToSnapshotOutputWithContext(ctx context.Context) SnapshotOutput { 293 return pulumi.ToOutputWithContext(ctx, i).(SnapshotOutput) 294 } 295 296 // SnapshotArrayInput is an input type that accepts SnapshotArray and SnapshotArrayOutput values. 297 // You can construct a concrete instance of `SnapshotArrayInput` via: 298 // 299 // SnapshotArray{ SnapshotArgs{...} } 300 type SnapshotArrayInput interface { 301 pulumi.Input 302 303 ToSnapshotArrayOutput() SnapshotArrayOutput 304 ToSnapshotArrayOutputWithContext(context.Context) SnapshotArrayOutput 305 } 306 307 type SnapshotArray []SnapshotInput 308 309 func (SnapshotArray) ElementType() reflect.Type { 310 return reflect.TypeOf((*[]*Snapshot)(nil)).Elem() 311 } 312 313 func (i SnapshotArray) ToSnapshotArrayOutput() SnapshotArrayOutput { 314 return i.ToSnapshotArrayOutputWithContext(context.Background()) 315 } 316 317 func (i SnapshotArray) ToSnapshotArrayOutputWithContext(ctx context.Context) SnapshotArrayOutput { 318 return pulumi.ToOutputWithContext(ctx, i).(SnapshotArrayOutput) 319 } 320 321 // SnapshotMapInput is an input type that accepts SnapshotMap and SnapshotMapOutput values. 322 // You can construct a concrete instance of `SnapshotMapInput` via: 323 // 324 // SnapshotMap{ "key": SnapshotArgs{...} } 325 type SnapshotMapInput interface { 326 pulumi.Input 327 328 ToSnapshotMapOutput() SnapshotMapOutput 329 ToSnapshotMapOutputWithContext(context.Context) SnapshotMapOutput 330 } 331 332 type SnapshotMap map[string]SnapshotInput 333 334 func (SnapshotMap) ElementType() reflect.Type { 335 return reflect.TypeOf((*map[string]*Snapshot)(nil)).Elem() 336 } 337 338 func (i SnapshotMap) ToSnapshotMapOutput() SnapshotMapOutput { 339 return i.ToSnapshotMapOutputWithContext(context.Background()) 340 } 341 342 func (i SnapshotMap) ToSnapshotMapOutputWithContext(ctx context.Context) SnapshotMapOutput { 343 return pulumi.ToOutputWithContext(ctx, i).(SnapshotMapOutput) 344 } 345 346 type SnapshotOutput struct{ *pulumi.OutputState } 347 348 func (SnapshotOutput) ElementType() reflect.Type { 349 return reflect.TypeOf((**Snapshot)(nil)).Elem() 350 } 351 352 func (o SnapshotOutput) ToSnapshotOutput() SnapshotOutput { 353 return o 354 } 355 356 func (o SnapshotOutput) ToSnapshotOutputWithContext(ctx context.Context) SnapshotOutput { 357 return o 358 } 359 360 // Specifies the allocated storage size in gigabytes (GB). 361 func (o SnapshotOutput) AllocatedStorage() pulumi.IntOutput { 362 return o.ApplyT(func(v *Snapshot) pulumi.IntOutput { return v.AllocatedStorage }).(pulumi.IntOutput) 363 } 364 365 // Specifies the name of the Availability Zone the DB instance was located in at the time of the DB snapshot. 366 func (o SnapshotOutput) AvailabilityZone() pulumi.StringOutput { 367 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.AvailabilityZone }).(pulumi.StringOutput) 368 } 369 370 // The DB Instance Identifier from which to take the snapshot. 371 func (o SnapshotOutput) DbInstanceIdentifier() pulumi.StringOutput { 372 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.DbInstanceIdentifier }).(pulumi.StringOutput) 373 } 374 375 // The Amazon Resource Name (ARN) for the DB snapshot. 376 func (o SnapshotOutput) DbSnapshotArn() pulumi.StringOutput { 377 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.DbSnapshotArn }).(pulumi.StringOutput) 378 } 379 380 // The Identifier for the snapshot. 381 func (o SnapshotOutput) DbSnapshotIdentifier() pulumi.StringOutput { 382 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.DbSnapshotIdentifier }).(pulumi.StringOutput) 383 } 384 385 // Specifies whether the DB snapshot is encrypted. 386 func (o SnapshotOutput) Encrypted() pulumi.BoolOutput { 387 return o.ApplyT(func(v *Snapshot) pulumi.BoolOutput { return v.Encrypted }).(pulumi.BoolOutput) 388 } 389 390 // Specifies the name of the database engine. 391 func (o SnapshotOutput) Engine() pulumi.StringOutput { 392 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.Engine }).(pulumi.StringOutput) 393 } 394 395 // Specifies the version of the database engine. 396 func (o SnapshotOutput) EngineVersion() pulumi.StringOutput { 397 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput) 398 } 399 400 // Specifies the Provisioned IOPS (I/O operations per second) value of the DB instance at the time of the snapshot. 401 func (o SnapshotOutput) Iops() pulumi.IntOutput { 402 return o.ApplyT(func(v *Snapshot) pulumi.IntOutput { return v.Iops }).(pulumi.IntOutput) 403 } 404 405 // The ARN for the KMS encryption key. 406 func (o SnapshotOutput) KmsKeyId() pulumi.StringOutput { 407 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.KmsKeyId }).(pulumi.StringOutput) 408 } 409 410 // License model information for the restored DB instance. 411 func (o SnapshotOutput) LicenseModel() pulumi.StringOutput { 412 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.LicenseModel }).(pulumi.StringOutput) 413 } 414 415 // Provides the option group name for the DB snapshot. 416 func (o SnapshotOutput) OptionGroupName() pulumi.StringOutput { 417 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.OptionGroupName }).(pulumi.StringOutput) 418 } 419 420 func (o SnapshotOutput) Port() pulumi.IntOutput { 421 return o.ApplyT(func(v *Snapshot) pulumi.IntOutput { return v.Port }).(pulumi.IntOutput) 422 } 423 424 // List of AWS Account ids to share snapshot with, use `all` to make snaphot public. 425 func (o SnapshotOutput) SharedAccounts() pulumi.StringArrayOutput { 426 return o.ApplyT(func(v *Snapshot) pulumi.StringArrayOutput { return v.SharedAccounts }).(pulumi.StringArrayOutput) 427 } 428 429 func (o SnapshotOutput) SnapshotType() pulumi.StringOutput { 430 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.SnapshotType }).(pulumi.StringOutput) 431 } 432 433 // The DB snapshot Arn that the DB snapshot was copied from. It only has value in case of cross customer or cross region copy. 434 func (o SnapshotOutput) SourceDbSnapshotIdentifier() pulumi.StringOutput { 435 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.SourceDbSnapshotIdentifier }).(pulumi.StringOutput) 436 } 437 438 // The region that the DB snapshot was created in or copied from. 439 func (o SnapshotOutput) SourceRegion() pulumi.StringOutput { 440 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.SourceRegion }).(pulumi.StringOutput) 441 } 442 443 // Specifies the status of this DB snapshot. 444 func (o SnapshotOutput) Status() pulumi.StringOutput { 445 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 446 } 447 448 // Specifies the storage type associated with DB snapshot. 449 func (o SnapshotOutput) StorageType() pulumi.StringOutput { 450 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.StorageType }).(pulumi.StringOutput) 451 } 452 453 // 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. 454 func (o SnapshotOutput) Tags() pulumi.StringMapOutput { 455 return o.ApplyT(func(v *Snapshot) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 456 } 457 458 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 459 // 460 // Deprecated: Please use `tags` instead. 461 func (o SnapshotOutput) TagsAll() pulumi.StringMapOutput { 462 return o.ApplyT(func(v *Snapshot) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 463 } 464 465 // Provides the VPC ID associated with the DB snapshot. 466 func (o SnapshotOutput) VpcId() pulumi.StringOutput { 467 return o.ApplyT(func(v *Snapshot) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput) 468 } 469 470 type SnapshotArrayOutput struct{ *pulumi.OutputState } 471 472 func (SnapshotArrayOutput) ElementType() reflect.Type { 473 return reflect.TypeOf((*[]*Snapshot)(nil)).Elem() 474 } 475 476 func (o SnapshotArrayOutput) ToSnapshotArrayOutput() SnapshotArrayOutput { 477 return o 478 } 479 480 func (o SnapshotArrayOutput) ToSnapshotArrayOutputWithContext(ctx context.Context) SnapshotArrayOutput { 481 return o 482 } 483 484 func (o SnapshotArrayOutput) Index(i pulumi.IntInput) SnapshotOutput { 485 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Snapshot { 486 return vs[0].([]*Snapshot)[vs[1].(int)] 487 }).(SnapshotOutput) 488 } 489 490 type SnapshotMapOutput struct{ *pulumi.OutputState } 491 492 func (SnapshotMapOutput) ElementType() reflect.Type { 493 return reflect.TypeOf((*map[string]*Snapshot)(nil)).Elem() 494 } 495 496 func (o SnapshotMapOutput) ToSnapshotMapOutput() SnapshotMapOutput { 497 return o 498 } 499 500 func (o SnapshotMapOutput) ToSnapshotMapOutputWithContext(ctx context.Context) SnapshotMapOutput { 501 return o 502 } 503 504 func (o SnapshotMapOutput) MapIndex(k pulumi.StringInput) SnapshotOutput { 505 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Snapshot { 506 return vs[0].(map[string]*Snapshot)[vs[1].(string)] 507 }).(SnapshotOutput) 508 } 509 510 func init() { 511 pulumi.RegisterInputType(reflect.TypeOf((*SnapshotInput)(nil)).Elem(), &Snapshot{}) 512 pulumi.RegisterInputType(reflect.TypeOf((*SnapshotArrayInput)(nil)).Elem(), SnapshotArray{}) 513 pulumi.RegisterInputType(reflect.TypeOf((*SnapshotMapInput)(nil)).Elem(), SnapshotMap{}) 514 pulumi.RegisterOutputType(SnapshotOutput{}) 515 pulumi.RegisterOutputType(SnapshotArrayOutput{}) 516 pulumi.RegisterOutputType(SnapshotMapOutput{}) 517 }