1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. nlb
  5. getServerGroupServerAttachments
Alibaba Cloud v3.55.0 published on Tuesday, Apr 30, 2024 by Pulumi

alicloud.nlb.getServerGroupServerAttachments

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.55.0 published on Tuesday, Apr 30, 2024 by Pulumi

    This data source provides the Nlb Server Group Server Attachments of the current Alibaba Cloud user.

    NOTE: Available in 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.applyValue(getServerGroupServerAttachmentsResult -> getServerGroupServerAttachmentsResult.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:nlb/getServerGroupServerAttachments:getServerGroupServerAttachments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Server Group Server Attachment IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ServerGroupId string
    The ID of the server group.
    ServerIds List<string>
    The IDs of the servers. You can specify at most 40 server IDs in each call.
    ServerIps 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.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ServerGroupId string
    The ID of the server group.
    ServerIds []string
    The IDs of the servers. You can specify at most 40 server IDs in each call.
    ServerIps []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.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    serverGroupId String
    The ID of the server group.
    serverIds List<String>
    The IDs of the servers. You can specify at most 40 server IDs in each call.
    serverIps 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.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    serverGroupId string
    The ID of the server group.
    serverIds string[]
    The IDs of the servers. You can specify at most 40 server IDs in each call.
    serverIps 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_id str
    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.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    serverGroupId String
    The ID of the server group.
    serverIds List<String>
    The IDs of the servers. You can specify at most 40 server IDs in each call.
    serverIps 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.AliCloud.Nlb.Outputs.GetServerGroupServerAttachmentsAttachment>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    OutputFile string
    ServerGroupId string
    ServerIds List<string>
    ServerIps List<string>
    Attachments []GetServerGroupServerAttachmentsAttachment
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    OutputFile string
    ServerGroupId string
    ServerIds []string
    ServerIps []string
    attachments List<GetServerGroupServerAttachmentsAttachment>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    serverGroupId String
    serverIds List<String>
    serverIps List<String>
    attachments GetServerGroupServerAttachmentsAttachment[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    outputFile string
    serverGroupId string
    serverIds string[]
    serverIps string[]
    attachments Sequence[GetServerGroupServerAttachmentsAttachment]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    output_file str
    server_group_id str
    server_ids Sequence[str]
    server_ips Sequence[str]
    attachments List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    serverGroupId String
    serverIds List<String>
    serverIps List<String>

    Supporting Types

    GetServerGroupServerAttachmentsAttachment

    Description string
    The description of the backend server.
    Id string
    The ID of the server group.
    Port int
    The port used by the backend server.
    ServerGroupId string
    The ID of the server group.
    ServerId string
    The ID of the server.
    ServerIp string
    The IP address of the backend server.
    ServerType string
    The type of the backend server.
    Status string
    Indicates the status of the backend server.
    Weight int
    The weight of the backend server.
    ZoneId string
    The zone ID of the server.
    Description string
    The description of the backend server.
    Id string
    The ID of the server group.
    Port int
    The port used by the backend server.
    ServerGroupId string
    The ID of the server group.
    ServerId string
    The ID of the server.
    ServerIp string
    The IP address of the backend server.
    ServerType string
    The type of the backend server.
    Status string
    Indicates the status of the backend server.
    Weight int
    The weight of the backend server.
    ZoneId string
    The zone ID of the server.
    description String
    The description of the backend server.
    id String
    The ID of the server group.
    port Integer
    The port used by the backend server.
    serverGroupId String
    The ID of the server group.
    serverId String
    The ID of the server.
    serverIp String
    The IP address of the backend server.
    serverType String
    The type of the backend server.
    status String
    Indicates the status of the backend server.
    weight Integer
    The weight of the backend server.
    zoneId String
    The zone ID of the server.
    description string
    The description of the backend server.
    id string
    The ID of the server group.
    port number
    The port used by the backend server.
    serverGroupId string
    The ID of the server group.
    serverId string
    The ID of the server.
    serverIp string
    The IP address of the backend server.
    serverType string
    The type of the backend server.
    status string
    Indicates the status of the backend server.
    weight number
    The weight of the backend server.
    zoneId string
    The zone ID of the server.
    description str
    The description of the backend server.
    id str
    The ID of the server group.
    port int
    The port used by the backend server.
    server_group_id str
    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.
    port Number
    The port used by the backend server.
    serverGroupId String
    The ID of the server group.
    serverId String
    The ID of the server.
    serverIp String
    The IP address of the backend server.
    serverType String
    The type of the backend server.
    status String
    Indicates the status of the backend server.
    weight Number
    The weight of the backend server.
    zoneId 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 alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.55.0 published on Tuesday, Apr 30, 2024 by Pulumi