Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.databasefilesystem.getInstances
Explore with Pulumi AI
This data source provides the DBFS Instances of the current Alibaba Cloud user.
NOTE: Available in v1.136.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.databasefilesystem.getInstances({
ids: ["example_id"],
});
export const dbfsInstanceId1 = ids.then(ids => ids.instances?.[0]?.id);
const nameRegex = alicloud.databasefilesystem.getInstances({
nameRegex: "^my-Instance",
});
export const dbfsInstanceId2 = nameRegex.then(nameRegex => nameRegex.instances?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.databasefilesystem.get_instances(ids=["example_id"])
pulumi.export("dbfsInstanceId1", ids.instances[0].id)
name_regex = alicloud.databasefilesystem.get_instances(name_regex="^my-Instance")
pulumi.export("dbfsInstanceId2", name_regex.instances[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/databasefilesystem"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := databasefilesystem.GetInstances(ctx, &databasefilesystem.GetInstancesArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("dbfsInstanceId1", ids.Instances[0].Id)
nameRegex, err := databasefilesystem.GetInstances(ctx, &databasefilesystem.GetInstancesArgs{
NameRegex: pulumi.StringRef("^my-Instance"),
}, nil)
if err != nil {
return err
}
ctx.Export("dbfsInstanceId2", nameRegex.Instances[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.DatabaseFilesystem.GetInstances.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.DatabaseFilesystem.GetInstances.Invoke(new()
{
NameRegex = "^my-Instance",
});
return new Dictionary<string, object?>
{
["dbfsInstanceId1"] = ids.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id),
["dbfsInstanceId2"] = nameRegex.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.databasefilesystem.DatabasefilesystemFunctions;
import com.pulumi.alicloud.databasefilesystem.inputs.GetInstancesArgs;
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 ids = DatabasefilesystemFunctions.getInstances(GetInstancesArgs.builder()
.ids("example_id")
.build());
ctx.export("dbfsInstanceId1", ids.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()));
final var nameRegex = DatabasefilesystemFunctions.getInstances(GetInstancesArgs.builder()
.nameRegex("^my-Instance")
.build());
ctx.export("dbfsInstanceId2", nameRegex.applyValue(getInstancesResult -> getInstancesResult.instances()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:databasefilesystem:getInstances
Arguments:
ids:
- example_id
nameRegex:
fn::invoke:
Function: alicloud:databasefilesystem:getInstances
Arguments:
nameRegex: ^my-Instance
outputs:
dbfsInstanceId1: ${ids.instances[0].id}
dbfsInstanceId2: ${nameRegex.instances[0].id}
Using getInstances
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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
def get_instances(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstancesResult
def get_instances_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput
> Note: This function is named GetInstances
in the Go SDK.
public static class GetInstances
{
public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:databasefilesystem/getInstances:getInstances
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Instance IDs.
- Name
Regex string - A regex string to filter results by Instance name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- Database file system state. Valid values:
attached
,attaching
,creating
,deleted
,deleting
,detaching
,resizing
,snapshotting
,unattached
,upgrading
.
- Ids []string
- A list of Instance IDs.
- Name
Regex string - A regex string to filter results by Instance name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- Database file system state. Valid values:
attached
,attaching
,creating
,deleted
,deleting
,detaching
,resizing
,snapshotting
,unattached
,upgrading
.
- ids List<String>
- A list of Instance IDs.
- name
Regex String - A regex string to filter results by Instance name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- Database file system state. Valid values:
attached
,attaching
,creating
,deleted
,deleting
,detaching
,resizing
,snapshotting
,unattached
,upgrading
.
- ids string[]
- A list of Instance IDs.
- name
Regex string - A regex string to filter results by Instance name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- Database file system state. Valid values:
attached
,attaching
,creating
,deleted
,deleting
,detaching
,resizing
,snapshotting
,unattached
,upgrading
.
- ids Sequence[str]
- A list of Instance IDs.
- name_
regex str - A regex string to filter results by Instance name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- Database file system state. Valid values:
attached
,attaching
,creating
,deleted
,deleting
,detaching
,resizing
,snapshotting
,unattached
,upgrading
.
- ids List<String>
- A list of Instance IDs.
- name
Regex String - A regex string to filter results by Instance name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- Database file system state. Valid values:
attached
,attaching
,creating
,deleted
,deleting
,detaching
,resizing
,snapshotting
,unattached
,upgrading
.
getInstances Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instances
List<Pulumi.
Ali Cloud. Database Filesystem. Outputs. Get Instances Instance> - Names List<string>
- Name
Regex string - Output
File string - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instances
[]Get
Instances Instance - Names []string
- Name
Regex string - Output
File string - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instances
List<Get
Instances Instance> - names List<String>
- name
Regex String - output
File String - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instances
Get
Instances Instance[] - names string[]
- name
Regex string - output
File string - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instances
Sequence[Get
Instances Instance] - names Sequence[str]
- name_
regex str - output_
file str - status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instances List<Property Map>
- names List<String>
- name
Regex String - output
File String - status String
Supporting Types
GetInstancesInstance
- Attach
Node intNumber - the number of nodes of the Database file system.
- Category string
- The type of the Database file system. Valid values:
standard
. - Create
Time string - The create time of the Database file system.
- Dbfs
Cluster stringId - The cluster ID of the Database file system.
- Ecs
Lists List<Pulumi.Ali Cloud. Database Filesystem. Inputs. Get Instances Instance Ecs List> - The collection of ECS instances mounted to the Database file system.
- Enable
Raid bool - Whether to create the Database file system in RAID way. Valid values :
true
anffalse
. - Encryption bool
- Whether to encrypt the Database file system. Valid values:
true
andfalse
. - Id string
- The ID of the Instance.
- Instance
Id string - The ID of the Database File System
- Instance
Name string - The name of the Database file system.
- Kms
Key stringId - The KMS key ID of the Database file system used. This parameter is valid When
encryption
parameter is set totrue
. - Payment
Type string - Thr payment type of the Database file system. Valid value:
PayAsYouGo
. - Performance
Level string - The performance level of the Database file system. Valid values:
PL0
,PL1
,PL2
,PL3
. - Raid
Stripe stringUnit Number - The number of strip . When
enable_raid
parameter is set totrue
will transfer. This parameter is valid Whenenable_raid
parameter is set totrue
. - Size int
- The size Of the Database file system. Unit: GiB.
- Status string
- The status of the Database file system.
- Zone
Id string - The Zone ID of the Database file system.
- Attach
Node intNumber - the number of nodes of the Database file system.
- Category string
- The type of the Database file system. Valid values:
standard
. - Create
Time string - The create time of the Database file system.
- Dbfs
Cluster stringId - The cluster ID of the Database file system.
- Ecs
Lists []GetInstances Instance Ecs List - The collection of ECS instances mounted to the Database file system.
- Enable
Raid bool - Whether to create the Database file system in RAID way. Valid values :
true
anffalse
. - Encryption bool
- Whether to encrypt the Database file system. Valid values:
true
andfalse
. - Id string
- The ID of the Instance.
- Instance
Id string - The ID of the Database File System
- Instance
Name string - The name of the Database file system.
- Kms
Key stringId - The KMS key ID of the Database file system used. This parameter is valid When
encryption
parameter is set totrue
. - Payment
Type string - Thr payment type of the Database file system. Valid value:
PayAsYouGo
. - Performance
Level string - The performance level of the Database file system. Valid values:
PL0
,PL1
,PL2
,PL3
. - Raid
Stripe stringUnit Number - The number of strip . When
enable_raid
parameter is set totrue
will transfer. This parameter is valid Whenenable_raid
parameter is set totrue
. - Size int
- The size Of the Database file system. Unit: GiB.
- Status string
- The status of the Database file system.
- Zone
Id string - The Zone ID of the Database file system.
- attach
Node IntegerNumber - the number of nodes of the Database file system.
- category String
- The type of the Database file system. Valid values:
standard
. - create
Time String - The create time of the Database file system.
- dbfs
Cluster StringId - The cluster ID of the Database file system.
- ecs
Lists List<GetInstances Instance Ecs List> - The collection of ECS instances mounted to the Database file system.
- enable
Raid Boolean - Whether to create the Database file system in RAID way. Valid values :
true
anffalse
. - encryption Boolean
- Whether to encrypt the Database file system. Valid values:
true
andfalse
. - id String
- The ID of the Instance.
- instance
Id String - The ID of the Database File System
- instance
Name String - The name of the Database file system.
- kms
Key StringId - The KMS key ID of the Database file system used. This parameter is valid When
encryption
parameter is set totrue
. - payment
Type String - Thr payment type of the Database file system. Valid value:
PayAsYouGo
. - performance
Level String - The performance level of the Database file system. Valid values:
PL0
,PL1
,PL2
,PL3
. - raid
Stripe StringUnit Number - The number of strip . When
enable_raid
parameter is set totrue
will transfer. This parameter is valid Whenenable_raid
parameter is set totrue
. - size Integer
- The size Of the Database file system. Unit: GiB.
- status String
- The status of the Database file system.
- zone
Id String - The Zone ID of the Database file system.
- attach
Node numberNumber - the number of nodes of the Database file system.
- category string
- The type of the Database file system. Valid values:
standard
. - create
Time string - The create time of the Database file system.
- dbfs
Cluster stringId - The cluster ID of the Database file system.
- ecs
Lists GetInstances Instance Ecs List[] - The collection of ECS instances mounted to the Database file system.
- enable
Raid boolean - Whether to create the Database file system in RAID way. Valid values :
true
anffalse
. - encryption boolean
- Whether to encrypt the Database file system. Valid values:
true
andfalse
. - id string
- The ID of the Instance.
- instance
Id string - The ID of the Database File System
- instance
Name string - The name of the Database file system.
- kms
Key stringId - The KMS key ID of the Database file system used. This parameter is valid When
encryption
parameter is set totrue
. - payment
Type string - Thr payment type of the Database file system. Valid value:
PayAsYouGo
. - performance
Level string - The performance level of the Database file system. Valid values:
PL0
,PL1
,PL2
,PL3
. - raid
Stripe stringUnit Number - The number of strip . When
enable_raid
parameter is set totrue
will transfer. This parameter is valid Whenenable_raid
parameter is set totrue
. - size number
- The size Of the Database file system. Unit: GiB.
- status string
- The status of the Database file system.
- zone
Id string - The Zone ID of the Database file system.
- attach_
node_ intnumber - the number of nodes of the Database file system.
- category str
- The type of the Database file system. Valid values:
standard
. - create_
time str - The create time of the Database file system.
- dbfs_
cluster_ strid - The cluster ID of the Database file system.
- ecs_
lists Sequence[GetInstances Instance Ecs List] - The collection of ECS instances mounted to the Database file system.
- enable_
raid bool - Whether to create the Database file system in RAID way. Valid values :
true
anffalse
. - encryption bool
- Whether to encrypt the Database file system. Valid values:
true
andfalse
. - id str
- The ID of the Instance.
- instance_
id str - The ID of the Database File System
- instance_
name str - The name of the Database file system.
- kms_
key_ strid - The KMS key ID of the Database file system used. This parameter is valid When
encryption
parameter is set totrue
. - payment_
type str - Thr payment type of the Database file system. Valid value:
PayAsYouGo
. - performance_
level str - The performance level of the Database file system. Valid values:
PL0
,PL1
,PL2
,PL3
. - raid_
stripe_ strunit_ number - The number of strip . When
enable_raid
parameter is set totrue
will transfer. This parameter is valid Whenenable_raid
parameter is set totrue
. - size int
- The size Of the Database file system. Unit: GiB.
- status str
- The status of the Database file system.
- zone_
id str - The Zone ID of the Database file system.
- attach
Node NumberNumber - the number of nodes of the Database file system.
- category String
- The type of the Database file system. Valid values:
standard
. - create
Time String - The create time of the Database file system.
- dbfs
Cluster StringId - The cluster ID of the Database file system.
- ecs
Lists List<Property Map> - The collection of ECS instances mounted to the Database file system.
- enable
Raid Boolean - Whether to create the Database file system in RAID way. Valid values :
true
anffalse
. - encryption Boolean
- Whether to encrypt the Database file system. Valid values:
true
andfalse
. - id String
- The ID of the Instance.
- instance
Id String - The ID of the Database File System
- instance
Name String - The name of the Database file system.
- kms
Key StringId - The KMS key ID of the Database file system used. This parameter is valid When
encryption
parameter is set totrue
. - payment
Type String - Thr payment type of the Database file system. Valid value:
PayAsYouGo
. - performance
Level String - The performance level of the Database file system. Valid values:
PL0
,PL1
,PL2
,PL3
. - raid
Stripe StringUnit Number - The number of strip . When
enable_raid
parameter is set totrue
will transfer. This parameter is valid Whenenable_raid
parameter is set totrue
. - size Number
- The size Of the Database file system. Unit: GiB.
- status String
- The status of the Database file system.
- zone
Id String - The Zone ID of the Database file system.
GetInstancesInstanceEcsList
- Ecs
Id string - The ID of the ECS instance.
- Ecs
Id string - The ID of the ECS instance.
- ecs
Id String - The ID of the ECS instance.
- ecs
Id string - The ID of the ECS instance.
- ecs_
id str - The ID of the ECS instance.
- ecs
Id String - The ID of the ECS instance.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.