GetInstanceAttachments
This data source provides the ots instance attachments of the current Alibaba Cloud user.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var attachmentsDs = Output.Create(AliCloud.Oss.GetInstanceAttachments.InvokeAsync(new AliCloud.Oss.GetInstanceAttachmentsArgs
{
InstanceName = "sample-instance",
NameRegex = "testvpc",
OutputFile = "attachments.txt",
}));
this.FirstOtsAttachmentId = attachmentsDs.Apply(attachmentsDs => attachmentsDs.Attachments[0].Id);
}
[Output("firstOtsAttachmentId")]
public Output<string> FirstOtsAttachmentId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
attachments_ds = alicloud.oss.get_instance_attachments(instance_name="sample-instance",
name_regex="testvpc",
output_file="attachments.txt")
pulumi.export("firstOtsAttachmentId", attachments_ds.attachments[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const attachmentsDs = pulumi.output(alicloud.oss.getInstanceAttachments({
instanceName: "sample-instance",
nameRegex: "testvpc",
outputFile: "attachments.txt",
}, { async: true }));
export const firstOtsAttachmentId = attachmentsDs.attachments[0].id;Using GetInstanceAttachments
function getInstanceAttachments(args: GetInstanceAttachmentsArgs, opts?: InvokeOptions): Promise<GetInstanceAttachmentsResult>function get_instance_attachments(instance_name=None, name_regex=None, output_file=None, opts=None)func GetInstanceAttachments(ctx *Context, args *GetInstanceAttachmentsArgs, opts ...InvokeOption) (*GetInstanceAttachmentsResult, error)public static class GetInstanceAttachments {
public static Task<GetInstanceAttachmentsResult> InvokeAsync(GetInstanceAttachmentsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Instance
Name string The name of OTS instance.
- Name
Regex string A regex string to filter results by vpc name.
- Output
File string
- Instance
Name string The name of OTS instance.
- Name
Regex string A regex string to filter results by vpc name.
- Output
File string
- instance
Name string The name of OTS instance.
- name
Regex string A regex string to filter results by vpc name.
- output
File string
- instance_
name str The name of OTS instance.
- name_
regex str A regex string to filter results by vpc name.
- output_
file str
GetInstanceAttachments Result
The following output properties are available:
- Attachments
List<Pulumi.
Ali Cloud. Oss. Outputs. Get Instance Attachments Attachment> A list of instance attachments. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Name string The instance name.
- Names List<string>
A list of vpc names.
- Vpc
Ids List<string> A list of vpc ids.
- Name
Regex string - Output
File string
- Attachments
[]Get
Instance Attachments Attachment A list of instance attachments. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Name string The instance name.
- Names []string
A list of vpc names.
- Vpc
Ids []string A list of vpc ids.
- Name
Regex string - Output
File string
- attachments
Get
Instance Attachments Attachment[] A list of instance attachments. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- instance
Name string The instance name.
- names string[]
A list of vpc names.
- vpc
Ids string[] A list of vpc ids.
- name
Regex string - output
File string
- attachments
List[Get
Instance Attachments Attachment] A list of instance attachments. Each element contains the following attributes:
- id str
The provider-assigned unique ID for this managed resource.
- instance_
name str The instance name.
- names List[str]
A list of vpc names.
- vpc_
ids List[str] A list of vpc ids.
- name_
regex str - output_
file str
Supporting Types
GetInstanceAttachmentsAttachment
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Domain string
The domain of the instance attachment.
- Endpoint string
The access endpoint of the instance attachment.
- Id string
The resource ID, the value is same as “instance_name”.
- Instance
Name string The name of OTS instance.
- Region string
The region of the instance attachment.
- Vpc
Id string The ID of attaching VPC to instance.
- Vpc
Name string The name of attaching VPC to instance.
- Domain string
The domain of the instance attachment.
- Endpoint string
The access endpoint of the instance attachment.
- Id string
The resource ID, the value is same as “instance_name”.
- Instance
Name string The name of OTS instance.
- Region string
The region of the instance attachment.
- Vpc
Id string The ID of attaching VPC to instance.
- Vpc
Name string The name of attaching VPC to instance.
- domain string
The domain of the instance attachment.
- endpoint string
The access endpoint of the instance attachment.
- id string
The resource ID, the value is same as “instance_name”.
- instance
Name string The name of OTS instance.
- region string
The region of the instance attachment.
- vpc
Id string The ID of attaching VPC to instance.
- vpc
Name string The name of attaching VPC to instance.
- domain str
The domain of the instance attachment.
- endpoint str
The access endpoint of the instance attachment.
- id str
The resource ID, the value is same as “instance_name”.
- instance_
name str The name of OTS instance.
- region str
The region of the instance attachment.
- vpc_
id str The ID of attaching VPC to instance.
- vpc_
name str The name of attaching VPC to instance.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.