github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/storagegateway/cachesIscsiVolume.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 storagegateway 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 AWS Storage Gateway cached iSCSI volume. 16 // 17 // > **NOTE:** The gateway must have cache added (e.g., via the `storagegateway.Cache` resource) before creating volumes otherwise the Storage Gateway API will return an error. 18 // 19 // > **NOTE:** The gateway must have an upload buffer added (e.g., via the `storagegateway.UploadBuffer` resource) before the volume is operational to clients, however the Storage Gateway API will allow volume creation without error in that case and return volume status as `UPLOAD BUFFER NOT CONFIGURED`. 20 // 21 // ## Example Usage 22 // 23 // > **NOTE:** These examples are referencing the `storagegateway.Cache` resource `gatewayArn` attribute to ensure this provider properly adds cache before creating the volume. If you are not using this method, you may need to declare an expicit dependency (e.g. via `dependsOn = [aws_storagegateway_cache.example]`) to ensure proper ordering. 24 // 25 // ### Create Empty Cached iSCSI Volume 26 // 27 // <!--Start PulumiCodeChooser --> 28 // ```go 29 // package main 30 // 31 // import ( 32 // 33 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/storagegateway" 34 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 35 // 36 // ) 37 // 38 // func main() { 39 // pulumi.Run(func(ctx *pulumi.Context) error { 40 // _, err := storagegateway.NewCachesIscsiVolume(ctx, "example", &storagegateway.CachesIscsiVolumeArgs{ 41 // GatewayArn: pulumi.Any(exampleAwsStoragegatewayCache.GatewayArn), 42 // NetworkInterfaceId: pulumi.Any(exampleAwsInstance.PrivateIp), 43 // TargetName: pulumi.String("example"), 44 // VolumeSizeInBytes: pulumi.Int(5368709120), 45 // }) 46 // if err != nil { 47 // return err 48 // } 49 // return nil 50 // }) 51 // } 52 // 53 // ``` 54 // <!--End PulumiCodeChooser --> 55 // 56 // ### Create Cached iSCSI Volume From Snapshot 57 // 58 // <!--Start PulumiCodeChooser --> 59 // ```go 60 // package main 61 // 62 // import ( 63 // 64 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/storagegateway" 65 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 66 // 67 // ) 68 // 69 // func main() { 70 // pulumi.Run(func(ctx *pulumi.Context) error { 71 // _, err := storagegateway.NewCachesIscsiVolume(ctx, "example", &storagegateway.CachesIscsiVolumeArgs{ 72 // GatewayArn: pulumi.Any(exampleAwsStoragegatewayCache.GatewayArn), 73 // NetworkInterfaceId: pulumi.Any(exampleAwsInstance.PrivateIp), 74 // SnapshotId: pulumi.Any(exampleAwsEbsSnapshot.Id), 75 // TargetName: pulumi.String("example"), 76 // VolumeSizeInBytes: exampleAwsEbsSnapshot.VolumeSize * 1024 * 1024 * 1024, 77 // }) 78 // if err != nil { 79 // return err 80 // } 81 // return nil 82 // }) 83 // } 84 // 85 // ``` 86 // <!--End PulumiCodeChooser --> 87 // 88 // ### Create Cached iSCSI Volume From Source Volume 89 // 90 // <!--Start PulumiCodeChooser --> 91 // ```go 92 // package main 93 // 94 // import ( 95 // 96 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/storagegateway" 97 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 98 // 99 // ) 100 // 101 // func main() { 102 // pulumi.Run(func(ctx *pulumi.Context) error { 103 // _, err := storagegateway.NewCachesIscsiVolume(ctx, "example", &storagegateway.CachesIscsiVolumeArgs{ 104 // GatewayArn: pulumi.Any(exampleAwsStoragegatewayCache.GatewayArn), 105 // NetworkInterfaceId: pulumi.Any(exampleAwsInstance.PrivateIp), 106 // SourceVolumeArn: pulumi.Any(existing.Arn), 107 // TargetName: pulumi.String("example"), 108 // VolumeSizeInBytes: pulumi.Any(existing.VolumeSizeInBytes), 109 // }) 110 // if err != nil { 111 // return err 112 // } 113 // return nil 114 // }) 115 // } 116 // 117 // ``` 118 // <!--End PulumiCodeChooser --> 119 // 120 // ## Import 121 // 122 // Using `pulumi import`, import `aws_storagegateway_cached_iscsi_volume` using the volume Amazon Resource Name (ARN). For example: 123 // 124 // ```sh 125 // $ pulumi import aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678 126 // ``` 127 type CachesIscsiVolume struct { 128 pulumi.CustomResourceState 129 130 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 131 Arn pulumi.StringOutput `pulumi:"arn"` 132 // Whether mutual CHAP is enabled for the iSCSI target. 133 ChapEnabled pulumi.BoolOutput `pulumi:"chapEnabled"` 134 // The Amazon Resource Name (ARN) of the gateway. 135 GatewayArn pulumi.StringOutput `pulumi:"gatewayArn"` 136 // Set to `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3. 137 KmsEncrypted pulumi.BoolPtrOutput `pulumi:"kmsEncrypted"` 138 // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. Is required when `kmsEncrypted` is set. 139 KmsKey pulumi.StringPtrOutput `pulumi:"kmsKey"` 140 // Logical disk number. 141 LunNumber pulumi.IntOutput `pulumi:"lunNumber"` 142 // The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. 143 NetworkInterfaceId pulumi.StringOutput `pulumi:"networkInterfaceId"` 144 // The port used to communicate with iSCSI targets. 145 NetworkInterfacePort pulumi.IntOutput `pulumi:"networkInterfacePort"` 146 // The snapshot ID of the snapshot to restore as the new cached volumeE.g., `snap-1122aabb`. 147 SnapshotId pulumi.StringPtrOutput `pulumi:"snapshotId"` 148 // The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The `volumeSizeInBytes` value for this new volume must be equal to or larger than the size of the existing volume, in bytes. 149 SourceVolumeArn pulumi.StringPtrOutput `pulumi:"sourceVolumeArn"` 150 // 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. 151 Tags pulumi.StringMapOutput `pulumi:"tags"` 152 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 153 // 154 // Deprecated: Please use `tags` instead. 155 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 156 // Target Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/target/iqn.1997-05.com.amazon:TargetName`. 157 TargetArn pulumi.StringOutput `pulumi:"targetArn"` 158 // The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway. 159 TargetName pulumi.StringOutput `pulumi:"targetName"` 160 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 161 VolumeArn pulumi.StringOutput `pulumi:"volumeArn"` 162 // Volume ID, e.g., `vol-12345678`. 163 VolumeId pulumi.StringOutput `pulumi:"volumeId"` 164 // The size of the volume in bytes. 165 VolumeSizeInBytes pulumi.IntOutput `pulumi:"volumeSizeInBytes"` 166 } 167 168 // NewCachesIscsiVolume registers a new resource with the given unique name, arguments, and options. 169 func NewCachesIscsiVolume(ctx *pulumi.Context, 170 name string, args *CachesIscsiVolumeArgs, opts ...pulumi.ResourceOption) (*CachesIscsiVolume, error) { 171 if args == nil { 172 return nil, errors.New("missing one or more required arguments") 173 } 174 175 if args.GatewayArn == nil { 176 return nil, errors.New("invalid value for required argument 'GatewayArn'") 177 } 178 if args.NetworkInterfaceId == nil { 179 return nil, errors.New("invalid value for required argument 'NetworkInterfaceId'") 180 } 181 if args.TargetName == nil { 182 return nil, errors.New("invalid value for required argument 'TargetName'") 183 } 184 if args.VolumeSizeInBytes == nil { 185 return nil, errors.New("invalid value for required argument 'VolumeSizeInBytes'") 186 } 187 opts = internal.PkgResourceDefaultOpts(opts) 188 var resource CachesIscsiVolume 189 err := ctx.RegisterResource("aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume", name, args, &resource, opts...) 190 if err != nil { 191 return nil, err 192 } 193 return &resource, nil 194 } 195 196 // GetCachesIscsiVolume gets an existing CachesIscsiVolume resource's state with the given name, ID, and optional 197 // state properties that are used to uniquely qualify the lookup (nil if not required). 198 func GetCachesIscsiVolume(ctx *pulumi.Context, 199 name string, id pulumi.IDInput, state *CachesIscsiVolumeState, opts ...pulumi.ResourceOption) (*CachesIscsiVolume, error) { 200 var resource CachesIscsiVolume 201 err := ctx.ReadResource("aws:storagegateway/cachesIscsiVolume:CachesIscsiVolume", name, id, state, &resource, opts...) 202 if err != nil { 203 return nil, err 204 } 205 return &resource, nil 206 } 207 208 // Input properties used for looking up and filtering CachesIscsiVolume resources. 209 type cachesIscsiVolumeState struct { 210 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 211 Arn *string `pulumi:"arn"` 212 // Whether mutual CHAP is enabled for the iSCSI target. 213 ChapEnabled *bool `pulumi:"chapEnabled"` 214 // The Amazon Resource Name (ARN) of the gateway. 215 GatewayArn *string `pulumi:"gatewayArn"` 216 // Set to `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3. 217 KmsEncrypted *bool `pulumi:"kmsEncrypted"` 218 // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. Is required when `kmsEncrypted` is set. 219 KmsKey *string `pulumi:"kmsKey"` 220 // Logical disk number. 221 LunNumber *int `pulumi:"lunNumber"` 222 // The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. 223 NetworkInterfaceId *string `pulumi:"networkInterfaceId"` 224 // The port used to communicate with iSCSI targets. 225 NetworkInterfacePort *int `pulumi:"networkInterfacePort"` 226 // The snapshot ID of the snapshot to restore as the new cached volumeE.g., `snap-1122aabb`. 227 SnapshotId *string `pulumi:"snapshotId"` 228 // The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The `volumeSizeInBytes` value for this new volume must be equal to or larger than the size of the existing volume, in bytes. 229 SourceVolumeArn *string `pulumi:"sourceVolumeArn"` 230 // 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. 231 Tags map[string]string `pulumi:"tags"` 232 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 233 // 234 // Deprecated: Please use `tags` instead. 235 TagsAll map[string]string `pulumi:"tagsAll"` 236 // Target Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/target/iqn.1997-05.com.amazon:TargetName`. 237 TargetArn *string `pulumi:"targetArn"` 238 // The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway. 239 TargetName *string `pulumi:"targetName"` 240 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 241 VolumeArn *string `pulumi:"volumeArn"` 242 // Volume ID, e.g., `vol-12345678`. 243 VolumeId *string `pulumi:"volumeId"` 244 // The size of the volume in bytes. 245 VolumeSizeInBytes *int `pulumi:"volumeSizeInBytes"` 246 } 247 248 type CachesIscsiVolumeState struct { 249 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 250 Arn pulumi.StringPtrInput 251 // Whether mutual CHAP is enabled for the iSCSI target. 252 ChapEnabled pulumi.BoolPtrInput 253 // The Amazon Resource Name (ARN) of the gateway. 254 GatewayArn pulumi.StringPtrInput 255 // Set to `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3. 256 KmsEncrypted pulumi.BoolPtrInput 257 // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. Is required when `kmsEncrypted` is set. 258 KmsKey pulumi.StringPtrInput 259 // Logical disk number. 260 LunNumber pulumi.IntPtrInput 261 // The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. 262 NetworkInterfaceId pulumi.StringPtrInput 263 // The port used to communicate with iSCSI targets. 264 NetworkInterfacePort pulumi.IntPtrInput 265 // The snapshot ID of the snapshot to restore as the new cached volumeE.g., `snap-1122aabb`. 266 SnapshotId pulumi.StringPtrInput 267 // The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The `volumeSizeInBytes` value for this new volume must be equal to or larger than the size of the existing volume, in bytes. 268 SourceVolumeArn pulumi.StringPtrInput 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 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 272 // 273 // Deprecated: Please use `tags` instead. 274 TagsAll pulumi.StringMapInput 275 // Target Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/target/iqn.1997-05.com.amazon:TargetName`. 276 TargetArn pulumi.StringPtrInput 277 // The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway. 278 TargetName pulumi.StringPtrInput 279 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 280 VolumeArn pulumi.StringPtrInput 281 // Volume ID, e.g., `vol-12345678`. 282 VolumeId pulumi.StringPtrInput 283 // The size of the volume in bytes. 284 VolumeSizeInBytes pulumi.IntPtrInput 285 } 286 287 func (CachesIscsiVolumeState) ElementType() reflect.Type { 288 return reflect.TypeOf((*cachesIscsiVolumeState)(nil)).Elem() 289 } 290 291 type cachesIscsiVolumeArgs struct { 292 // The Amazon Resource Name (ARN) of the gateway. 293 GatewayArn string `pulumi:"gatewayArn"` 294 // Set to `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3. 295 KmsEncrypted *bool `pulumi:"kmsEncrypted"` 296 // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. Is required when `kmsEncrypted` is set. 297 KmsKey *string `pulumi:"kmsKey"` 298 // The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. 299 NetworkInterfaceId string `pulumi:"networkInterfaceId"` 300 // The snapshot ID of the snapshot to restore as the new cached volumeE.g., `snap-1122aabb`. 301 SnapshotId *string `pulumi:"snapshotId"` 302 // The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The `volumeSizeInBytes` value for this new volume must be equal to or larger than the size of the existing volume, in bytes. 303 SourceVolumeArn *string `pulumi:"sourceVolumeArn"` 304 // 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. 305 Tags map[string]string `pulumi:"tags"` 306 // The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway. 307 TargetName string `pulumi:"targetName"` 308 // The size of the volume in bytes. 309 VolumeSizeInBytes int `pulumi:"volumeSizeInBytes"` 310 } 311 312 // The set of arguments for constructing a CachesIscsiVolume resource. 313 type CachesIscsiVolumeArgs struct { 314 // The Amazon Resource Name (ARN) of the gateway. 315 GatewayArn pulumi.StringInput 316 // Set to `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3. 317 KmsEncrypted pulumi.BoolPtrInput 318 // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. Is required when `kmsEncrypted` is set. 319 KmsKey pulumi.StringPtrInput 320 // The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. 321 NetworkInterfaceId pulumi.StringInput 322 // The snapshot ID of the snapshot to restore as the new cached volumeE.g., `snap-1122aabb`. 323 SnapshotId pulumi.StringPtrInput 324 // The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The `volumeSizeInBytes` value for this new volume must be equal to or larger than the size of the existing volume, in bytes. 325 SourceVolumeArn pulumi.StringPtrInput 326 // 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. 327 Tags pulumi.StringMapInput 328 // The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway. 329 TargetName pulumi.StringInput 330 // The size of the volume in bytes. 331 VolumeSizeInBytes pulumi.IntInput 332 } 333 334 func (CachesIscsiVolumeArgs) ElementType() reflect.Type { 335 return reflect.TypeOf((*cachesIscsiVolumeArgs)(nil)).Elem() 336 } 337 338 type CachesIscsiVolumeInput interface { 339 pulumi.Input 340 341 ToCachesIscsiVolumeOutput() CachesIscsiVolumeOutput 342 ToCachesIscsiVolumeOutputWithContext(ctx context.Context) CachesIscsiVolumeOutput 343 } 344 345 func (*CachesIscsiVolume) ElementType() reflect.Type { 346 return reflect.TypeOf((**CachesIscsiVolume)(nil)).Elem() 347 } 348 349 func (i *CachesIscsiVolume) ToCachesIscsiVolumeOutput() CachesIscsiVolumeOutput { 350 return i.ToCachesIscsiVolumeOutputWithContext(context.Background()) 351 } 352 353 func (i *CachesIscsiVolume) ToCachesIscsiVolumeOutputWithContext(ctx context.Context) CachesIscsiVolumeOutput { 354 return pulumi.ToOutputWithContext(ctx, i).(CachesIscsiVolumeOutput) 355 } 356 357 // CachesIscsiVolumeArrayInput is an input type that accepts CachesIscsiVolumeArray and CachesIscsiVolumeArrayOutput values. 358 // You can construct a concrete instance of `CachesIscsiVolumeArrayInput` via: 359 // 360 // CachesIscsiVolumeArray{ CachesIscsiVolumeArgs{...} } 361 type CachesIscsiVolumeArrayInput interface { 362 pulumi.Input 363 364 ToCachesIscsiVolumeArrayOutput() CachesIscsiVolumeArrayOutput 365 ToCachesIscsiVolumeArrayOutputWithContext(context.Context) CachesIscsiVolumeArrayOutput 366 } 367 368 type CachesIscsiVolumeArray []CachesIscsiVolumeInput 369 370 func (CachesIscsiVolumeArray) ElementType() reflect.Type { 371 return reflect.TypeOf((*[]*CachesIscsiVolume)(nil)).Elem() 372 } 373 374 func (i CachesIscsiVolumeArray) ToCachesIscsiVolumeArrayOutput() CachesIscsiVolumeArrayOutput { 375 return i.ToCachesIscsiVolumeArrayOutputWithContext(context.Background()) 376 } 377 378 func (i CachesIscsiVolumeArray) ToCachesIscsiVolumeArrayOutputWithContext(ctx context.Context) CachesIscsiVolumeArrayOutput { 379 return pulumi.ToOutputWithContext(ctx, i).(CachesIscsiVolumeArrayOutput) 380 } 381 382 // CachesIscsiVolumeMapInput is an input type that accepts CachesIscsiVolumeMap and CachesIscsiVolumeMapOutput values. 383 // You can construct a concrete instance of `CachesIscsiVolumeMapInput` via: 384 // 385 // CachesIscsiVolumeMap{ "key": CachesIscsiVolumeArgs{...} } 386 type CachesIscsiVolumeMapInput interface { 387 pulumi.Input 388 389 ToCachesIscsiVolumeMapOutput() CachesIscsiVolumeMapOutput 390 ToCachesIscsiVolumeMapOutputWithContext(context.Context) CachesIscsiVolumeMapOutput 391 } 392 393 type CachesIscsiVolumeMap map[string]CachesIscsiVolumeInput 394 395 func (CachesIscsiVolumeMap) ElementType() reflect.Type { 396 return reflect.TypeOf((*map[string]*CachesIscsiVolume)(nil)).Elem() 397 } 398 399 func (i CachesIscsiVolumeMap) ToCachesIscsiVolumeMapOutput() CachesIscsiVolumeMapOutput { 400 return i.ToCachesIscsiVolumeMapOutputWithContext(context.Background()) 401 } 402 403 func (i CachesIscsiVolumeMap) ToCachesIscsiVolumeMapOutputWithContext(ctx context.Context) CachesIscsiVolumeMapOutput { 404 return pulumi.ToOutputWithContext(ctx, i).(CachesIscsiVolumeMapOutput) 405 } 406 407 type CachesIscsiVolumeOutput struct{ *pulumi.OutputState } 408 409 func (CachesIscsiVolumeOutput) ElementType() reflect.Type { 410 return reflect.TypeOf((**CachesIscsiVolume)(nil)).Elem() 411 } 412 413 func (o CachesIscsiVolumeOutput) ToCachesIscsiVolumeOutput() CachesIscsiVolumeOutput { 414 return o 415 } 416 417 func (o CachesIscsiVolumeOutput) ToCachesIscsiVolumeOutputWithContext(ctx context.Context) CachesIscsiVolumeOutput { 418 return o 419 } 420 421 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 422 func (o CachesIscsiVolumeOutput) Arn() pulumi.StringOutput { 423 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 424 } 425 426 // Whether mutual CHAP is enabled for the iSCSI target. 427 func (o CachesIscsiVolumeOutput) ChapEnabled() pulumi.BoolOutput { 428 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.BoolOutput { return v.ChapEnabled }).(pulumi.BoolOutput) 429 } 430 431 // The Amazon Resource Name (ARN) of the gateway. 432 func (o CachesIscsiVolumeOutput) GatewayArn() pulumi.StringOutput { 433 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringOutput { return v.GatewayArn }).(pulumi.StringOutput) 434 } 435 436 // Set to `true` to use Amazon S3 server side encryption with your own AWS KMS key, or `false` to use a key managed by Amazon S3. 437 func (o CachesIscsiVolumeOutput) KmsEncrypted() pulumi.BoolPtrOutput { 438 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.BoolPtrOutput { return v.KmsEncrypted }).(pulumi.BoolPtrOutput) 439 } 440 441 // The Amazon Resource Name (ARN) of the AWS KMS key used for Amazon S3 server side encryption. Is required when `kmsEncrypted` is set. 442 func (o CachesIscsiVolumeOutput) KmsKey() pulumi.StringPtrOutput { 443 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringPtrOutput { return v.KmsKey }).(pulumi.StringPtrOutput) 444 } 445 446 // Logical disk number. 447 func (o CachesIscsiVolumeOutput) LunNumber() pulumi.IntOutput { 448 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.IntOutput { return v.LunNumber }).(pulumi.IntOutput) 449 } 450 451 // The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. 452 func (o CachesIscsiVolumeOutput) NetworkInterfaceId() pulumi.StringOutput { 453 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringOutput { return v.NetworkInterfaceId }).(pulumi.StringOutput) 454 } 455 456 // The port used to communicate with iSCSI targets. 457 func (o CachesIscsiVolumeOutput) NetworkInterfacePort() pulumi.IntOutput { 458 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.IntOutput { return v.NetworkInterfacePort }).(pulumi.IntOutput) 459 } 460 461 // The snapshot ID of the snapshot to restore as the new cached volumeE.g., `snap-1122aabb`. 462 func (o CachesIscsiVolumeOutput) SnapshotId() pulumi.StringPtrOutput { 463 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringPtrOutput { return v.SnapshotId }).(pulumi.StringPtrOutput) 464 } 465 466 // The ARN for an existing volume. Specifying this ARN makes the new volume into an exact copy of the specified existing volume's latest recovery point. The `volumeSizeInBytes` value for this new volume must be equal to or larger than the size of the existing volume, in bytes. 467 func (o CachesIscsiVolumeOutput) SourceVolumeArn() pulumi.StringPtrOutput { 468 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringPtrOutput { return v.SourceVolumeArn }).(pulumi.StringPtrOutput) 469 } 470 471 // 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. 472 func (o CachesIscsiVolumeOutput) Tags() pulumi.StringMapOutput { 473 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 474 } 475 476 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 477 // 478 // Deprecated: Please use `tags` instead. 479 func (o CachesIscsiVolumeOutput) TagsAll() pulumi.StringMapOutput { 480 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 481 } 482 483 // Target Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/target/iqn.1997-05.com.amazon:TargetName`. 484 func (o CachesIscsiVolumeOutput) TargetArn() pulumi.StringOutput { 485 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringOutput { return v.TargetArn }).(pulumi.StringOutput) 486 } 487 488 // The name of the iSCSI target used by initiators to connect to the target and as a suffix for the target ARN. The target name must be unique across all volumes of a gateway. 489 func (o CachesIscsiVolumeOutput) TargetName() pulumi.StringOutput { 490 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringOutput { return v.TargetName }).(pulumi.StringOutput) 491 } 492 493 // Volume Amazon Resource Name (ARN), e.g., `arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678/volume/vol-12345678`. 494 func (o CachesIscsiVolumeOutput) VolumeArn() pulumi.StringOutput { 495 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringOutput { return v.VolumeArn }).(pulumi.StringOutput) 496 } 497 498 // Volume ID, e.g., `vol-12345678`. 499 func (o CachesIscsiVolumeOutput) VolumeId() pulumi.StringOutput { 500 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.StringOutput { return v.VolumeId }).(pulumi.StringOutput) 501 } 502 503 // The size of the volume in bytes. 504 func (o CachesIscsiVolumeOutput) VolumeSizeInBytes() pulumi.IntOutput { 505 return o.ApplyT(func(v *CachesIscsiVolume) pulumi.IntOutput { return v.VolumeSizeInBytes }).(pulumi.IntOutput) 506 } 507 508 type CachesIscsiVolumeArrayOutput struct{ *pulumi.OutputState } 509 510 func (CachesIscsiVolumeArrayOutput) ElementType() reflect.Type { 511 return reflect.TypeOf((*[]*CachesIscsiVolume)(nil)).Elem() 512 } 513 514 func (o CachesIscsiVolumeArrayOutput) ToCachesIscsiVolumeArrayOutput() CachesIscsiVolumeArrayOutput { 515 return o 516 } 517 518 func (o CachesIscsiVolumeArrayOutput) ToCachesIscsiVolumeArrayOutputWithContext(ctx context.Context) CachesIscsiVolumeArrayOutput { 519 return o 520 } 521 522 func (o CachesIscsiVolumeArrayOutput) Index(i pulumi.IntInput) CachesIscsiVolumeOutput { 523 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CachesIscsiVolume { 524 return vs[0].([]*CachesIscsiVolume)[vs[1].(int)] 525 }).(CachesIscsiVolumeOutput) 526 } 527 528 type CachesIscsiVolumeMapOutput struct{ *pulumi.OutputState } 529 530 func (CachesIscsiVolumeMapOutput) ElementType() reflect.Type { 531 return reflect.TypeOf((*map[string]*CachesIscsiVolume)(nil)).Elem() 532 } 533 534 func (o CachesIscsiVolumeMapOutput) ToCachesIscsiVolumeMapOutput() CachesIscsiVolumeMapOutput { 535 return o 536 } 537 538 func (o CachesIscsiVolumeMapOutput) ToCachesIscsiVolumeMapOutputWithContext(ctx context.Context) CachesIscsiVolumeMapOutput { 539 return o 540 } 541 542 func (o CachesIscsiVolumeMapOutput) MapIndex(k pulumi.StringInput) CachesIscsiVolumeOutput { 543 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CachesIscsiVolume { 544 return vs[0].(map[string]*CachesIscsiVolume)[vs[1].(string)] 545 }).(CachesIscsiVolumeOutput) 546 } 547 548 func init() { 549 pulumi.RegisterInputType(reflect.TypeOf((*CachesIscsiVolumeInput)(nil)).Elem(), &CachesIscsiVolume{}) 550 pulumi.RegisterInputType(reflect.TypeOf((*CachesIscsiVolumeArrayInput)(nil)).Elem(), CachesIscsiVolumeArray{}) 551 pulumi.RegisterInputType(reflect.TypeOf((*CachesIscsiVolumeMapInput)(nil)).Elem(), CachesIscsiVolumeMap{}) 552 pulumi.RegisterOutputType(CachesIscsiVolumeOutput{}) 553 pulumi.RegisterOutputType(CachesIscsiVolumeArrayOutput{}) 554 pulumi.RegisterOutputType(CachesIscsiVolumeMapOutput{}) 555 }