Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides Cen Instance Attachments of the current Alibaba Cloud User.
NOTE: Available in v1.97.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.cen.getInstanceAttachments({
instanceId: "cen-o40h17ll9w********",
});
export const theFirstAttachmentedInstanceId = example.then(example => example.attachments?.[0]?.childInstanceId);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.cen.get_instance_attachments(instance_id="cen-o40h17ll9w********")
pulumi.export("theFirstAttachmentedInstanceId", example.attachments[0].child_instance_id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cen.GetInstanceAttachments(ctx, &cen.GetInstanceAttachmentsArgs{
InstanceId: "cen-o40h17ll9w********",
}, nil)
if err != nil {
return err
}
ctx.Export("theFirstAttachmentedInstanceId", example.Attachments[0].ChildInstanceId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Cen.GetInstanceAttachments.Invoke(new()
{
InstanceId = "cen-o40h17ll9w********",
});
return new Dictionary<string, object?>
{
["theFirstAttachmentedInstanceId"] = example.Apply(getInstanceAttachmentsResult => getInstanceAttachmentsResult.Attachments[0]?.ChildInstanceId),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cen.CenFunctions;
import com.pulumi.alicloud.cen.inputs.GetInstanceAttachmentsArgs;
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 = CenFunctions.getInstanceAttachments(GetInstanceAttachmentsArgs.builder()
.instanceId("cen-o40h17ll9w********")
.build());
ctx.export("theFirstAttachmentedInstanceId", example.attachments()[0].childInstanceId());
}
}
variables:
example:
fn::invoke:
function: alicloud:cen:getInstanceAttachments
arguments:
instanceId: cen-o40h17ll9w********
outputs:
theFirstAttachmentedInstanceId: ${example.attachments[0].childInstanceId}
Using getInstanceAttachments
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 getInstanceAttachments(args: GetInstanceAttachmentsArgs, opts?: InvokeOptions): Promise<GetInstanceAttachmentsResult>
function getInstanceAttachmentsOutput(args: GetInstanceAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetInstanceAttachmentsResult>def get_instance_attachments(child_instance_region_id: Optional[str] = None,
child_instance_type: Optional[str] = None,
instance_id: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceAttachmentsResult
def get_instance_attachments_output(child_instance_region_id: Optional[pulumi.Input[str]] = None,
child_instance_type: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceAttachmentsResult]func GetInstanceAttachments(ctx *Context, args *GetInstanceAttachmentsArgs, opts ...InvokeOption) (*GetInstanceAttachmentsResult, error)
func GetInstanceAttachmentsOutput(ctx *Context, args *GetInstanceAttachmentsOutputArgs, opts ...InvokeOption) GetInstanceAttachmentsResultOutput> Note: This function is named GetInstanceAttachments in the Go SDK.
public static class GetInstanceAttachments
{
public static Task<GetInstanceAttachmentsResult> InvokeAsync(GetInstanceAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceAttachmentsResult> Invoke(GetInstanceAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstanceAttachmentsResult> getInstanceAttachments(GetInstanceAttachmentsArgs args, InvokeOptions options)
public static Output<GetInstanceAttachmentsResult> getInstanceAttachments(GetInstanceAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cen/getInstanceAttachments:getInstanceAttachments
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id string - The ID of the CEN instance.
- Child
Instance stringRegion Id - The region to which the network to be queried belongs.
- Child
Instance stringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- Instance
Id string - The ID of the CEN instance.
- Child
Instance stringRegion Id - The region to which the network to be queried belongs.
- Child
Instance stringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- instance
Id String - The ID of the CEN instance.
- child
Instance StringRegion Id - The region to which the network to be queried belongs.
- child
Instance StringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- instance
Id string - The ID of the CEN instance.
- child
Instance stringRegion Id - The region to which the network to be queried belongs.
- child
Instance stringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - output
File string - File name where to save data source results (after running
pulumi preview). - status string
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- instance_
id str - The ID of the CEN instance.
- child_
instance_ strregion_ id - The region to which the network to be queried belongs.
- child_
instance_ strtype - The type of the associated network. Valid values:
VPC,VBRandCCN. - output_
file str - File name where to save data source results (after running
pulumi preview). - status str
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- instance
Id String - The ID of the CEN instance.
- child
Instance StringRegion Id - The region to which the network to be queried belongs.
- child
Instance StringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
getInstanceAttachments Result
The following output properties are available:
- Attachments
List<Pulumi.
Ali Cloud. Cen. Outputs. Get Instance Attachments Attachment> - A list of CEN Instance Attachments. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of CEN Instance Attachment IDs.
- Instance
Id string - The ID of the CEN instance.
- Child
Instance stringRegion Id - The ID of the region to which the network belongs.
- Child
Instance stringType - The type of the associated network.
- Output
File string - Status string
- The status of the network.
- Attachments
[]Get
Instance Attachments Attachment - A list of CEN Instance Attachments. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of CEN Instance Attachment IDs.
- Instance
Id string - The ID of the CEN instance.
- Child
Instance stringRegion Id - The ID of the region to which the network belongs.
- Child
Instance stringType - The type of the associated network.
- Output
File string - Status string
- The status of the network.
- attachments
List<Get
Instance Attachments Attachment> - A list of CEN Instance Attachments. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of CEN Instance Attachment IDs.
- instance
Id String - The ID of the CEN instance.
- child
Instance StringRegion Id - The ID of the region to which the network belongs.
- child
Instance StringType - The type of the associated network.
- output
File String - status String
- The status of the network.
- attachments
Get
Instance Attachments Attachment[] - A list of CEN Instance Attachments. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of CEN Instance Attachment IDs.
- instance
Id string - The ID of the CEN instance.
- child
Instance stringRegion Id - The ID of the region to which the network belongs.
- child
Instance stringType - The type of the associated network.
- output
File string - status string
- The status of the network.
- attachments
Sequence[Get
Instance Attachments Attachment] - A list of CEN Instance Attachments. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of CEN Instance Attachment IDs.
- instance_
id str - The ID of the CEN instance.
- child_
instance_ strregion_ id - The ID of the region to which the network belongs.
- child_
instance_ strtype - The type of the associated network.
- output_
file str - status str
- The status of the network.
- attachments List<Property Map>
- A list of CEN Instance Attachments. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of CEN Instance Attachment IDs.
- instance
Id String - The ID of the CEN instance.
- child
Instance StringRegion Id - The ID of the region to which the network belongs.
- child
Instance StringType - The type of the associated network.
- output
File String - status String
- The status of the network.
Supporting Types
GetInstanceAttachmentsAttachment
- Child
Instance stringAttach Time - The time when the network is associated with the CEN instance.
- Child
Instance stringId - The ID of the network.
- Child
Instance intOwner Id - The ID of the account to which the network belongs.
- Child
Instance stringRegion Id - The region to which the network to be queried belongs.
- Child
Instance stringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - Id string
- The ID of the CEN Instance Attachment.
- Instance
Id string - The ID of the CEN instance.
- Status string
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- Child
Instance stringAttach Time - The time when the network is associated with the CEN instance.
- Child
Instance stringId - The ID of the network.
- Child
Instance intOwner Id - The ID of the account to which the network belongs.
- Child
Instance stringRegion Id - The region to which the network to be queried belongs.
- Child
Instance stringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - Id string
- The ID of the CEN Instance Attachment.
- Instance
Id string - The ID of the CEN instance.
- Status string
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- child
Instance StringAttach Time - The time when the network is associated with the CEN instance.
- child
Instance StringId - The ID of the network.
- child
Instance IntegerOwner Id - The ID of the account to which the network belongs.
- child
Instance StringRegion Id - The region to which the network to be queried belongs.
- child
Instance StringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - id String
- The ID of the CEN Instance Attachment.
- instance
Id String - The ID of the CEN instance.
- status String
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- child
Instance stringAttach Time - The time when the network is associated with the CEN instance.
- child
Instance stringId - The ID of the network.
- child
Instance numberOwner Id - The ID of the account to which the network belongs.
- child
Instance stringRegion Id - The region to which the network to be queried belongs.
- child
Instance stringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - id string
- The ID of the CEN Instance Attachment.
- instance
Id string - The ID of the CEN instance.
- status string
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- child_
instance_ strattach_ time - The time when the network is associated with the CEN instance.
- child_
instance_ strid - The ID of the network.
- child_
instance_ intowner_ id - The ID of the account to which the network belongs.
- child_
instance_ strregion_ id - The region to which the network to be queried belongs.
- child_
instance_ strtype - The type of the associated network. Valid values:
VPC,VBRandCCN. - id str
- The ID of the CEN Instance Attachment.
- instance_
id str - The ID of the CEN instance.
- status str
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
- child
Instance StringAttach Time - The time when the network is associated with the CEN instance.
- child
Instance StringId - The ID of the network.
- child
Instance NumberOwner Id - The ID of the account to which the network belongs.
- child
Instance StringRegion Id - The region to which the network to be queried belongs.
- child
Instance StringType - The type of the associated network. Valid values:
VPC,VBRandCCN. - id String
- The ID of the CEN Instance Attachment.
- instance
Id String - The ID of the CEN instance.
- status String
- The status of the Cen Child Instance Attachment. Valid value:
Attaching,AttachedandAetaching.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
