Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

getLbTargetGroup

Get information about a Yandex Load Balancer target group. For more information, see Yandex.Cloud Load Balancer.

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const foo = pulumi.output(yandex.getLbTargetGroup({
    targetGroupId: "my-target-group-id",
}));
import pulumi
import pulumi_yandex as yandex

foo = yandex.get_lb_target_group(target_group_id="my-target-group-id")
using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Yandex.GetLbTargetGroup.InvokeAsync(new Yandex.GetLbTargetGroupArgs
        {
            TargetGroupId = "my-target-group-id",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "my-target-group-id"
		_, err := yandex.LookupLbTargetGroup(ctx, &GetLbTargetGroupArgs{
			TargetGroupId: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

This data source is used to define [Load Balancer Target Groups] that can be used by other resources.

Using getLbTargetGroup

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 getLbTargetGroup(args: GetLbTargetGroupArgs, opts?: InvokeOptions): Promise<GetLbTargetGroupResult>
function getLbTargetGroupOutput(args: GetLbTargetGroupOutputArgs, opts?: InvokeOptions): Output<GetLbTargetGroupResult>
def get_lb_target_group(folder_id: Optional[str] = None,
                        name: Optional[str] = None,
                        target_group_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetLbTargetGroupResult
def get_lb_target_group_output(folder_id: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        target_group_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetLbTargetGroupResult]
func LookupLbTargetGroup(ctx *Context, args *LookupLbTargetGroupArgs, opts ...InvokeOption) (*LookupLbTargetGroupResult, error)
func LookupLbTargetGroupOutput(ctx *Context, args *LookupLbTargetGroupOutputArgs, opts ...InvokeOption) LookupLbTargetGroupResultOutput

> Note: This function is named LookupLbTargetGroup in the Go SDK.

public static class GetLbTargetGroup 
{
    public static Task<GetLbTargetGroupResult> InvokeAsync(GetLbTargetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetLbTargetGroupResult> Invoke(GetLbTargetGroupInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

FolderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
Name string
  • Name of the Target Group.
TargetGroupId string
Target Group ID.
FolderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
Name string
  • Name of the Target Group.
TargetGroupId string
Target Group ID.
folderId string
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
name string
  • Name of the Target Group.
targetGroupId string
Target Group ID.
folder_id str
Folder that the resource belongs to. If value is omitted, the default provider folder is used.
name str
  • Name of the Target Group.
target_group_id str
Target Group ID.

getLbTargetGroup Result

The following output properties are available:

CreatedAt string
Creation timestamp of this target group.
Description string
Description of the target group.
FolderId string
Id string
The provider-assigned unique ID for this managed resource.
Labels Dictionary<string, string>

Labels to assign to this target group.

  • target.0.address - IP address of the target.
  • target.0.subnet_id - ID of the subnet that targets are connected to.
Name string
TargetGroupId string
Targets List<GetLbTargetGroupTarget>
CreatedAt string
Creation timestamp of this target group.
Description string
Description of the target group.
FolderId string
Id string
The provider-assigned unique ID for this managed resource.
Labels map[string]string

Labels to assign to this target group.

  • target.0.address - IP address of the target.
  • target.0.subnet_id - ID of the subnet that targets are connected to.
Name string
TargetGroupId string
Targets []GetLbTargetGroupTarget
createdAt string
Creation timestamp of this target group.
description string
Description of the target group.
folderId string
id string
The provider-assigned unique ID for this managed resource.
labels {[key: string]: string}

Labels to assign to this target group.

  • target.0.address - IP address of the target.
  • target.0.subnet_id - ID of the subnet that targets are connected to.
name string
targetGroupId string
targets GetLbTargetGroupTarget[]
created_at str
Creation timestamp of this target group.
description str
Description of the target group.
folder_id str
id str
The provider-assigned unique ID for this managed resource.
labels Mapping[str, str]

Labels to assign to this target group.

  • target.0.address - IP address of the target.
  • target.0.subnet_id - ID of the subnet that targets are connected to.
name str
target_group_id str
targets Sequence[GetLbTargetGroupTarget]

Supporting Types

GetLbTargetGroupTarget

Address string
SubnetId string
Address string
SubnetId string
address string
subnetId string

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.