GetTables
This data source provides the ots tables of the current Alibaba Cloud user.
NOTE: Available in v1.40.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var tablesDs = Output.Create(AliCloud.Oss.GetTables.InvokeAsync(new AliCloud.Oss.GetTablesArgs
{
InstanceName = "sample-instance",
NameRegex = "sample-table",
OutputFile = "tables.txt",
}));
this.FirstTableId = tablesDs.Apply(tablesDs => tablesDs.Tables[0].Id);
}
[Output("firstTableId")]
public Output<string> FirstTableId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
tables_ds = alicloud.oss.get_tables(instance_name="sample-instance",
name_regex="sample-table",
output_file="tables.txt")
pulumi.export("firstTableId", tables_ds.tables[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const tablesDs = pulumi.output(alicloud.oss.getTables({
instanceName: "sample-instance",
nameRegex: "sample-table",
outputFile: "tables.txt",
}, { async: true }));
export const firstTableId = tablesDs.tables[0].id;Using GetTables
function getTables(args: GetTablesArgs, opts?: InvokeOptions): Promise<GetTablesResult>function get_tables(ids=None, instance_name=None, name_regex=None, output_file=None, opts=None)func GetTables(ctx *Context, args *GetTablesArgs, opts ...InvokeOption) (*GetTablesResult, error)public static class GetTables {
public static Task<GetTablesResult> InvokeAsync(GetTablesArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Instance
Name string The name of OTS instance.
- Ids List<string>
A list of table IDs.
- Name
Regex string A regex string to filter results by table name.
- Output
File string
- Instance
Name string The name of OTS instance.
- Ids []string
A list of table IDs.
- Name
Regex string A regex string to filter results by table name.
- Output
File string
- instance
Name string The name of OTS instance.
- ids string[]
A list of table IDs.
- name
Regex string A regex string to filter results by table name.
- output
File string
- instance_
name str The name of OTS instance.
- ids List[str]
A list of table IDs.
- name_
regex str A regex string to filter results by table name.
- output_
file str
GetTables Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of table IDs.
- Instance
Name string The OTS instance name.
- Names List<string>
A list of table names.
- Tables
List<Pulumi.
Ali Cloud. Oss. Outputs. Get Tables Table> A list of tables. Each element contains the following attributes:
- Name
Regex string - Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of table IDs.
- Instance
Name string The OTS instance name.
- Names []string
A list of table names.
- Tables
[]Get
Tables Table A list of tables. Each element contains the following attributes:
- Name
Regex string - Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of table IDs.
- instance
Name string The OTS instance name.
- names string[]
A list of table names.
- tables
Get
Tables Table[] A list of tables. Each element contains the following attributes:
- name
Regex string - output
File string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of table IDs.
- instance_
name str The OTS instance name.
- names List[str]
A list of table names.
- tables
List[Get
Tables Table] A list of tables. Each element contains the following attributes:
- name_
regex str - output_
file str
Supporting Types
GetTablesTable
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Id string
ID of the table. The value is
<instance_name>:<table_name>.- Instance
Name string The name of OTS instance.
- Max
Version int The maximum number of versions stored in this table.
- Primary
Keys List<Pulumi.Ali Cloud. Oss. Inputs. Get Tables Table Primary Key Args> The property of
TableMetawhich indicates the structure information of a table.- Table
Name string The table name of the OTS which could not be changed.
- Time
To intLive The retention time of data stored in this table.
- Id string
ID of the table. The value is
<instance_name>:<table_name>.- Instance
Name string The name of OTS instance.
- Max
Version int The maximum number of versions stored in this table.
- Primary
Keys []GetTables Table Primary Key The property of
TableMetawhich indicates the structure information of a table.- Table
Name string The table name of the OTS which could not be changed.
- Time
To intLive The retention time of data stored in this table.
- id string
ID of the table. The value is
<instance_name>:<table_name>.- instance
Name string The name of OTS instance.
- max
Version number The maximum number of versions stored in this table.
- primary
Keys GetTables Table Primary Key[] The property of
TableMetawhich indicates the structure information of a table.- table
Name string The table name of the OTS which could not be changed.
- time
To numberLive The retention time of data stored in this table.
- id str
ID of the table. The value is
<instance_name>:<table_name>.- instance_
name str The name of OTS instance.
- max_
version float The maximum number of versions stored in this table.
- primary_
keys List[GetTables Table Primary Key] The property of
TableMetawhich indicates the structure information of a table.- table_
name str The table name of the OTS which could not be changed.
- time_
to_ floatlive The retention time of data stored in this table.
GetTablesTablePrimaryKey
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.