get Server Group Server Attachments
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)
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 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
})
}
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}
Return
A collection of values returned by getServerGroupServerAttachments.
Parameters
A collection of arguments for invoking getServerGroupServerAttachments.
Return
A collection of values returned by getServerGroupServerAttachments.
Parameters
A list of Server Group Server Attachment IDs.
File name where to save data source results (after running pulumi preview
).
The ID of the server group.
The IDs of the servers. You can specify at most 40 server IDs in each call.
The IP addresses of the servers. You can specify at most 40 server IP addresses in each call.
See also
Return
A collection of values returned by getServerGroupServerAttachments.
Parameters
Builder for com.pulumi.alicloud.nlb.kotlin.inputs.GetServerGroupServerAttachmentsPlainArgs.