Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.nlb.getServerGroupServerAttachments
This data source provides the Nlb Server Group Server Attachments of the current Alibaba Cloud user.
NOTE: Available since v1.192.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.nlb.getServerGroupServerAttachments({
ids: ["example_value"],
});
export const nlbServerGroupServerAttachmentId1 = ids.then(ids => ids.attachments?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.nlb.get_server_group_server_attachments(ids=["example_value"])
pulumi.export("nlbServerGroupServerAttachmentId1", ids.attachments[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nlb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := nlb.GetServerGroupServerAttachments(ctx, &nlb.GetServerGroupServerAttachmentsArgs{
Ids: []string{
"example_value",
},
}, nil)
if err != nil {
return err
}
ctx.Export("nlbServerGroupServerAttachmentId1", ids.Attachments[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Nlb.GetServerGroupServerAttachments.Invoke(new()
{
Ids = new[]
{
"example_value",
},
});
return new Dictionary<string, object?>
{
["nlbServerGroupServerAttachmentId1"] = ids.Apply(getServerGroupServerAttachmentsResult => getServerGroupServerAttachmentsResult.Attachments[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.nlb.NlbFunctions;
import com.pulumi.alicloud.nlb.inputs.GetServerGroupServerAttachmentsArgs;
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 = NlbFunctions.getServerGroupServerAttachments(GetServerGroupServerAttachmentsArgs.builder()
.ids("example_value")
.build());
ctx.export("nlbServerGroupServerAttachmentId1", ids.attachments()[0].id());
}
}
variables:
ids:
fn::invoke:
function: alicloud:nlb:getServerGroupServerAttachments
arguments:
ids:
- example_value
outputs:
nlbServerGroupServerAttachmentId1: ${ids.attachments[0].id}
Using getServerGroupServerAttachments
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 getServerGroupServerAttachments(args: GetServerGroupServerAttachmentsArgs, opts?: InvokeOptions): Promise<GetServerGroupServerAttachmentsResult>
function getServerGroupServerAttachmentsOutput(args: GetServerGroupServerAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetServerGroupServerAttachmentsResult>def get_server_group_server_attachments(ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
server_group_id: Optional[str] = None,
server_ids: Optional[Sequence[str]] = None,
server_ips: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetServerGroupServerAttachmentsResult
def get_server_group_server_attachments_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
server_group_id: Optional[pulumi.Input[str]] = None,
server_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
server_ips: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServerGroupServerAttachmentsResult]func GetServerGroupServerAttachments(ctx *Context, args *GetServerGroupServerAttachmentsArgs, opts ...InvokeOption) (*GetServerGroupServerAttachmentsResult, error)
func GetServerGroupServerAttachmentsOutput(ctx *Context, args *GetServerGroupServerAttachmentsOutputArgs, opts ...InvokeOption) GetServerGroupServerAttachmentsResultOutput> Note: This function is named GetServerGroupServerAttachments in the Go SDK.
public static class GetServerGroupServerAttachments
{
public static Task<GetServerGroupServerAttachmentsResult> InvokeAsync(GetServerGroupServerAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetServerGroupServerAttachmentsResult> Invoke(GetServerGroupServerAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServerGroupServerAttachmentsResult> getServerGroupServerAttachments(GetServerGroupServerAttachmentsArgs args, InvokeOptions options)
public static Output<GetServerGroupServerAttachmentsResult> getServerGroupServerAttachments(GetServerGroupServerAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:nlb/getServerGroupServerAttachments:getServerGroupServerAttachments
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Server Group Server Attachment IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Server
Group stringId - The ID of the server group.
- Server
Ids List<string> - The IDs of the servers. You can specify at most 40 server IDs in each call.
- Server
Ips List<string> - The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.
- Ids []string
- A list of Server Group Server Attachment IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Server
Group stringId - The ID of the server group.
- Server
Ids []string - The IDs of the servers. You can specify at most 40 server IDs in each call.
- Server
Ips []string - The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.
- ids List<String>
- A list of Server Group Server Attachment IDs.
- output
File String - File name where to save data source results (after running
pulumi preview). - server
Group StringId - The ID of the server group.
- server
Ids List<String> - The IDs of the servers. You can specify at most 40 server IDs in each call.
- server
Ips List<String> - The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.
- ids string[]
- A list of Server Group Server Attachment IDs.
- output
File string - File name where to save data source results (after running
pulumi preview). - server
Group stringId - The ID of the server group.
- server
Ids string[] - The IDs of the servers. You can specify at most 40 server IDs in each call.
- server
Ips string[] - The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.
- ids Sequence[str]
- A list of Server Group Server Attachment IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview). - server_
group_ strid - The ID of the server group.
- server_
ids Sequence[str] - The IDs of the servers. You can specify at most 40 server IDs in each call.
- server_
ips Sequence[str] - The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.
- ids List<String>
- A list of Server Group Server Attachment IDs.
- output
File String - File name where to save data source results (after running
pulumi preview). - server
Group StringId - The ID of the server group.
- server
Ids List<String> - The IDs of the servers. You can specify at most 40 server IDs in each call.
- server
Ips List<String> - The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.
getServerGroupServerAttachments Result
The following output properties are available:
- Attachments
List<Pulumi.
Ali Cloud. Nlb. Outputs. Get Server Group Server Attachments Attachment> - A list of Nlb Server Group Server Attachments. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Output
File string - Server
Group stringId - The ID of the server group.
- Server
Ids List<string> - Server
Ips List<string>
- Attachments
[]Get
Server Group Server Attachments Attachment - A list of Nlb Server Group Server Attachments. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Output
File string - Server
Group stringId - The ID of the server group.
- Server
Ids []string - Server
Ips []string
- attachments
List<Get
Server Group Server Attachments Attachment> - A list of Nlb Server Group Server Attachments. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - server
Group StringId - The ID of the server group.
- server
Ids List<String> - server
Ips List<String>
- attachments
Get
Server Group Server Attachments Attachment[] - A list of Nlb Server Group Server Attachments. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- output
File string - server
Group stringId - The ID of the server group.
- server
Ids string[] - server
Ips string[]
- attachments
Sequence[Get
Server Group Server Attachments Attachment] - A list of Nlb Server Group Server Attachments. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- output_
file str - server_
group_ strid - The ID of the server group.
- server_
ids Sequence[str] - server_
ips Sequence[str]
- attachments List<Property Map>
- A list of Nlb Server Group Server Attachments. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- output
File String - server
Group StringId - The ID of the server group.
- server
Ids List<String> - server
Ips List<String>
Supporting Types
GetServerGroupServerAttachmentsAttachment
- Description string
- The description of the backend server.
- Id string
- The ID of the server group. The value is formulated as
<server_group_id>:<server_id>:<server_type>:<port>. - Port int
- The port used by the backend server.
- Server
Group stringId - The ID of the server group.
- Server
Id string - The ID of the server.
- Server
Ip string - The IP address of the backend server.
- Server
Type string - The type of the backend server.
- Status string
- Indicates the status of the backend server.
- Weight int
- The weight of the backend server.
- Zone
Id string - The zone ID of the server.
- Description string
- The description of the backend server.
- Id string
- The ID of the server group. The value is formulated as
<server_group_id>:<server_id>:<server_type>:<port>. - Port int
- The port used by the backend server.
- Server
Group stringId - The ID of the server group.
- Server
Id string - The ID of the server.
- Server
Ip string - The IP address of the backend server.
- Server
Type string - The type of the backend server.
- Status string
- Indicates the status of the backend server.
- Weight int
- The weight of the backend server.
- Zone
Id string - The zone ID of the server.
- description String
- The description of the backend server.
- id String
- The ID of the server group. The value is formulated as
<server_group_id>:<server_id>:<server_type>:<port>. - port Integer
- The port used by the backend server.
- server
Group StringId - The ID of the server group.
- server
Id String - The ID of the server.
- server
Ip String - The IP address of the backend server.
- server
Type String - The type of the backend server.
- status String
- Indicates the status of the backend server.
- weight Integer
- The weight of the backend server.
- zone
Id String - The zone ID of the server.
- description string
- The description of the backend server.
- id string
- The ID of the server group. The value is formulated as
<server_group_id>:<server_id>:<server_type>:<port>. - port number
- The port used by the backend server.
- server
Group stringId - The ID of the server group.
- server
Id string - The ID of the server.
- server
Ip string - The IP address of the backend server.
- server
Type string - The type of the backend server.
- status string
- Indicates the status of the backend server.
- weight number
- The weight of the backend server.
- zone
Id string - The zone ID of the server.
- description str
- The description of the backend server.
- id str
- The ID of the server group. The value is formulated as
<server_group_id>:<server_id>:<server_type>:<port>. - port int
- The port used by the backend server.
- server_
group_ strid - The ID of the server group.
- server_
id str - The ID of the server.
- server_
ip str - The IP address of the backend server.
- server_
type str - The type of the backend server.
- status str
- Indicates the status of the backend server.
- weight int
- The weight of the backend server.
- zone_
id str - The zone ID of the server.
- description String
- The description of the backend server.
- id String
- The ID of the server group. The value is formulated as
<server_group_id>:<server_id>:<server_type>:<port>. - port Number
- The port used by the backend server.
- server
Group StringId - The ID of the server group.
- server
Id String - The ID of the server.
- server
Ip String - The IP address of the backend server.
- server
Type String - The type of the backend server.
- status String
- Indicates the status of the backend server.
- weight Number
- The weight of the backend server.
- zone
Id String - The zone ID of the server.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
