GetInstances
This data source provides the ots instances of the current Alibaba Cloud user.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var instancesDs = Output.Create(AliCloud.Oss.GetInstances.InvokeAsync(new AliCloud.Oss.GetInstancesArgs
{
NameRegex = "sample-instance",
OutputFile = "instances.txt",
}));
this.FirstInstanceId = instancesDs.Apply(instancesDs => instancesDs.Instances[0].Id);
}
[Output("firstInstanceId")]
public Output<string> FirstInstanceId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
instances_ds = alicloud.oss.get_instances(name_regex="sample-instance",
output_file="instances.txt")
pulumi.export("firstInstanceId", instances_ds.instances[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const instancesDs = pulumi.output(alicloud.oss.getInstances({
nameRegex: "sample-instance",
outputFile: "instances.txt",
}, { async: true }));
export const firstInstanceId = instancesDs.instances[0].id;Using GetInstances
function getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>function get_instances(ids=None, name_regex=None, output_file=None, tags=None, opts=None)func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)public static class GetInstances {
public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
}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 - Dictionary<string, object>
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }
- Ids []string
A list of instance IDs.
- Name
Regex string A regex string to filter results by instance name.
- Output
File string - map[string]interface{}
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }
- ids string[]
A list of instance IDs.
- name
Regex string A regex string to filter results by instance name.
- output
File string - {[key: string]: any}
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }
- ids List[str]
A list of instance IDs.
- name_
regex str A regex string to filter results by instance name.
- output_
file str - Dict[str, Any]
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }
GetInstances Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of instance IDs.
- Instances
List<Pulumi.
Ali Cloud. Oss. Outputs. Get Instances Instance> A list of instances. Each element contains the following attributes:
- Names List<string>
A list of instance names.
- Name
Regex string - Output
File string - Dictionary<string, object>
The tags of the instance.
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of instance IDs.
- Instances
[]Get
Instances Instance A list of instances. Each element contains the following attributes:
- Names []string
A list of instance names.
- Name
Regex string - Output
File string - map[string]interface{}
The tags of the instance.
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of instance IDs.
- instances
Get
Instances Instance[] A list of instances. Each element contains the following attributes:
- names string[]
A list of instance names.
- name
Regex string - output
File string - {[key: string]: any}
The tags of the instance.
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of instance IDs.
- instances
List[Get
Instances Instance] A list of instances. Each element contains the following attributes:
- names List[str]
A list of instance names.
- name_
regex str - output_
file str - Dict[str, Any]
The tags of the instance.
Supporting Types
GetInstancesInstance
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Cluster
Type string The cluster type of the instance. Possible values:
SSD,HYBRID.- Create
Time string The create time of the instance.
- Description string
The description of the instance.
- Entity
Quota int The instance quota which indicating the maximum number of tables.
- Id string
ID of the instance.
- Name string
Instance name.
- Network string
The network type of the instance. Possible values:
NORMAL,VPC,VPC_CONSOLE.- Read
Capacity int The maximum adjustable read capacity unit of the instance.
- Status string
Instance status. Possible values:
Running,Disabled,Deleting.- Dictionary<string, object>
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- User
Id string The user id of the instance.
- Write
Capacity int The maximum adjustable write capacity unit of the instance.
- Cluster
Type string The cluster type of the instance. Possible values:
SSD,HYBRID.- Create
Time string The create time of the instance.
- Description string
The description of the instance.
- Entity
Quota int The instance quota which indicating the maximum number of tables.
- Id string
ID of the instance.
- Name string
Instance name.
- Network string
The network type of the instance. Possible values:
NORMAL,VPC,VPC_CONSOLE.- Read
Capacity int The maximum adjustable read capacity unit of the instance.
- Status string
Instance status. Possible values:
Running,Disabled,Deleting.- map[string]interface{}
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- User
Id string The user id of the instance.
- Write
Capacity int The maximum adjustable write capacity unit of the instance.
- cluster
Type string The cluster type of the instance. Possible values:
SSD,HYBRID.- create
Time string The create time of the instance.
- description string
The description of the instance.
- entity
Quota number The instance quota which indicating the maximum number of tables.
- id string
ID of the instance.
- name string
Instance name.
- network string
The network type of the instance. Possible values:
NORMAL,VPC,VPC_CONSOLE.- read
Capacity number The maximum adjustable read capacity unit of the instance.
- status string
Instance status. Possible values:
Running,Disabled,Deleting.- {[key: string]: any}
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- user
Id string The user id of the instance.
- write
Capacity number The maximum adjustable write capacity unit of the instance.
- cluster_
type str The cluster type of the instance. Possible values:
SSD,HYBRID.- create_
time str The create time of the instance.
- description str
The description of the instance.
- entity
Quota float The instance quota which indicating the maximum number of tables.
- id str
ID of the instance.
- name str
Instance name.
- network str
The network type of the instance. Possible values:
NORMAL,VPC,VPC_CONSOLE.- read
Capacity float The maximum adjustable read capacity unit of the instance.
- status str
Instance status. Possible values:
Running,Disabled,Deleting.- Dict[str, Any]
A map of tags assigned to the instance. It must be in the format:
data "alicloud.oss.getInstances" "instances_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } }- user
Id str The user id of the instance.
- write
Capacity float The maximum adjustable write capacity unit of the instance.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.