ibm.getIsInstanceVolumeAttachments
Explore with Pulumi AI
Retrieve information of an existing IBM Cloud infrastructure instance volume attachments as a read-only data source. For more information, about VPC virtual server instances, see Managing virtual server instances.
Note:
VPC infrastructure services are a regional specific based endpoint, by default targets to us-south
. Please make sure to target right region in the provider block as shown in the provider.tf
file, if VPC service is created in region other than us-south
.
provider.tf
import * as pulumi from "@pulumi/pulumi";
import pulumi
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
}
}
{}
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const example = ibm.getIsInstanceVolumeAttachments({
instance: ibm_is_instance.example.id,
});
import pulumi
import pulumi_ibm as ibm
example = ibm.get_is_instance_volume_attachments(instance=ibm_is_instance["example"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.GetIsInstanceVolumeAttachments(ctx, &ibm.GetIsInstanceVolumeAttachmentsArgs{
Instance: ibm_is_instance.Example.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var example = Ibm.GetIsInstanceVolumeAttachments.Invoke(new()
{
Instance = ibm_is_instance.Example.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIsInstanceVolumeAttachmentsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IbmFunctions.getIsInstanceVolumeAttachments(GetIsInstanceVolumeAttachmentsArgs.builder()
.instance(ibm_is_instance.example().id())
.build());
}
}
variables:
example:
fn::invoke:
function: ibm:getIsInstanceVolumeAttachments
arguments:
instance: ${ibm_is_instance.example.id}
Using getIsInstanceVolumeAttachments
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getIsInstanceVolumeAttachments(args: GetIsInstanceVolumeAttachmentsArgs, opts?: InvokeOptions): Promise<GetIsInstanceVolumeAttachmentsResult>
function getIsInstanceVolumeAttachmentsOutput(args: GetIsInstanceVolumeAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetIsInstanceVolumeAttachmentsResult>
def get_is_instance_volume_attachments(id: Optional[str] = None,
instance: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIsInstanceVolumeAttachmentsResult
def get_is_instance_volume_attachments_output(id: Optional[pulumi.Input[str]] = None,
instance: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIsInstanceVolumeAttachmentsResult]
func GetIsInstanceVolumeAttachments(ctx *Context, args *GetIsInstanceVolumeAttachmentsArgs, opts ...InvokeOption) (*GetIsInstanceVolumeAttachmentsResult, error)
func GetIsInstanceVolumeAttachmentsOutput(ctx *Context, args *GetIsInstanceVolumeAttachmentsOutputArgs, opts ...InvokeOption) GetIsInstanceVolumeAttachmentsResultOutput
> Note: This function is named GetIsInstanceVolumeAttachments
in the Go SDK.
public static class GetIsInstanceVolumeAttachments
{
public static Task<GetIsInstanceVolumeAttachmentsResult> InvokeAsync(GetIsInstanceVolumeAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetIsInstanceVolumeAttachmentsResult> Invoke(GetIsInstanceVolumeAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIsInstanceVolumeAttachmentsResult> getIsInstanceVolumeAttachments(GetIsInstanceVolumeAttachmentsArgs args, InvokeOptions options)
public static Output<GetIsInstanceVolumeAttachmentsResult> getIsInstanceVolumeAttachments(GetIsInstanceVolumeAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getIsInstanceVolumeAttachments:getIsInstanceVolumeAttachments
arguments:
# arguments dictionary
The following arguments are supported:
getIsInstanceVolumeAttachments Result
The following output properties are available:
- Id string
- (String) The unique identifier for this volume.
- Instance string
- Volume
Attachments List<GetIs Instance Volume Attachments Volume Attachment> - (List of Object) A list of volume attachments on an instance.
- Id string
- (String) The unique identifier for this volume.
- Instance string
- Volume
Attachments []GetIs Instance Volume Attachments Volume Attachment - (List of Object) A list of volume attachments on an instance.
- id String
- (String) The unique identifier for this volume.
- instance String
- volume
Attachments List<GetIs Instance Volume Attachments Volume Attachment> - (List of Object) A list of volume attachments on an instance.
- id string
- (String) The unique identifier for this volume.
- instance string
- volume
Attachments GetIs Instance Volume Attachments Volume Attachment[] - (List of Object) A list of volume attachments on an instance.
- id str
- (String) The unique identifier for this volume.
- instance str
- volume_
attachments Sequence[GetIs Instance Volume Attachments Volume Attachment] - (List of Object) A list of volume attachments on an instance.
- id String
- (String) The unique identifier for this volume.
- instance String
- volume
Attachments List<Property Map> - (List of Object) A list of volume attachments on an instance.
Supporting Types
GetIsInstanceVolumeAttachmentsVolumeAttachment
- Bandwidth double
- (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
- Delete
Volume boolOn Instance Delete - (Boolean) If set to true, when deleting the instance the volume will also be deleted.
- Device string
- (String) A unique identifier for the device which is exposed to the instance operating system.
- Href string
- (String) The URL for this volume.
- Name string
- (String) The unique user-defined name for this volume.
- Status string
- (String) The status of this volume attachment.
- Type string
- (String) The type of volume attachment. Supported values are boot, data.
- Volume
Attachment stringId - (String) The unique identifier for this volume attachment.
- Volume
Crn string - Volume
Deleted string - Volume
Href string - Volume
Id string - Volume
Name string - Volume
References List<GetIs Instance Volume Attachments Volume Attachment Volume Reference>
- Bandwidth float64
- (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
- Delete
Volume boolOn Instance Delete - (Boolean) If set to true, when deleting the instance the volume will also be deleted.
- Device string
- (String) A unique identifier for the device which is exposed to the instance operating system.
- Href string
- (String) The URL for this volume.
- Name string
- (String) The unique user-defined name for this volume.
- Status string
- (String) The status of this volume attachment.
- Type string
- (String) The type of volume attachment. Supported values are boot, data.
- Volume
Attachment stringId - (String) The unique identifier for this volume attachment.
- Volume
Crn string - Volume
Deleted string - Volume
Href string - Volume
Id string - Volume
Name string - Volume
References []GetIs Instance Volume Attachments Volume Attachment Volume Reference
- bandwidth Double
- (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
- delete
Volume BooleanOn Instance Delete - (Boolean) If set to true, when deleting the instance the volume will also be deleted.
- device String
- (String) A unique identifier for the device which is exposed to the instance operating system.
- href String
- (String) The URL for this volume.
- name String
- (String) The unique user-defined name for this volume.
- status String
- (String) The status of this volume attachment.
- type String
- (String) The type of volume attachment. Supported values are boot, data.
- volume
Attachment StringId - (String) The unique identifier for this volume attachment.
- volume
Crn String - volume
Deleted String - volume
Href String - volume
Id String - volume
Name String - volume
References List<GetIs Instance Volume Attachments Volume Attachment Volume Reference>
- bandwidth number
- (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
- delete
Volume booleanOn Instance Delete - (Boolean) If set to true, when deleting the instance the volume will also be deleted.
- device string
- (String) A unique identifier for the device which is exposed to the instance operating system.
- href string
- (String) The URL for this volume.
- name string
- (String) The unique user-defined name for this volume.
- status string
- (String) The status of this volume attachment.
- type string
- (String) The type of volume attachment. Supported values are boot, data.
- volume
Attachment stringId - (String) The unique identifier for this volume attachment.
- volume
Crn string - volume
Deleted string - volume
Href string - volume
Id string - volume
Name string - volume
References GetIs Instance Volume Attachments Volume Attachment Volume Reference[]
- bandwidth float
- (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
- delete_
volume_ boolon_ instance_ delete - (Boolean) If set to true, when deleting the instance the volume will also be deleted.
- device str
- (String) A unique identifier for the device which is exposed to the instance operating system.
- href str
- (String) The URL for this volume.
- name str
- (String) The unique user-defined name for this volume.
- status str
- (String) The status of this volume attachment.
- type str
- (String) The type of volume attachment. Supported values are boot, data.
- volume_
attachment_ strid - (String) The unique identifier for this volume attachment.
- volume_
crn str - volume_
deleted str - volume_
href str - volume_
id str - volume_
name str - volume_
references Sequence[GetIs Instance Volume Attachments Volume Attachment Volume Reference]
- bandwidth Number
- (Optional, Integer) The maximum bandwidth (in megabits per second) for the volume. For this property to be specified, the volume storage_generation must be 2.
- delete
Volume BooleanOn Instance Delete - (Boolean) If set to true, when deleting the instance the volume will also be deleted.
- device String
- (String) A unique identifier for the device which is exposed to the instance operating system.
- href String
- (String) The URL for this volume.
- name String
- (String) The unique user-defined name for this volume.
- status String
- (String) The status of this volume attachment.
- type String
- (String) The type of volume attachment. Supported values are boot, data.
- volume
Attachment StringId - (String) The unique identifier for this volume attachment.
- volume
Crn String - volume
Deleted String - volume
Href String - volume
Id String - volume
Name String - volume
References List<Property Map>
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.