# LoadBalancerContextResponse

Properties of a discovered load balancer.

- Source: [`cx-api/lib/legacy-moved.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/cx-api/lib/legacy-moved.ts#L1023)
- Type last changed: v2.238.0 · 9 Feb 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cx_api } from 'aws-cdk-lib';
const loadBalancerContextResponse: cx_api.LoadBalancerContextResponse = {
  ipAddressType: cx_api.LoadBalancerIpAddressType.IPV4,
  loadBalancerArn: 'loadBalancerArn',
  loadBalancerCanonicalHostedZoneId: 'loadBalancerCanonicalHostedZoneId',
  loadBalancerDnsName: 'loadBalancerDnsName',
  securityGroupIds: ['securityGroupIds'],
  vpcId: 'vpcId',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cx_api

load_balancer_context_response = cx_api.LoadBalancerContextResponse(
    ip_address_type=cx_api.LoadBalancerIpAddressType.IPV4,
    load_balancer_arn="loadBalancerArn",
    load_balancer_canonical_hosted_zone_id="loadBalancerCanonicalHostedZoneId",
    load_balancer_dns_name="loadBalancerDnsName",
    security_group_ids=["securityGroupIds"],
    vpc_id="vpcId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cxapi.*;

LoadBalancerContextResponse loadBalancerContextResponse = LoadBalancerContextResponse.builder()
        .ipAddressType(LoadBalancerIpAddressType.IPV4)
        .loadBalancerArn("loadBalancerArn")
        .loadBalancerCanonicalHostedZoneId("loadBalancerCanonicalHostedZoneId")
        .loadBalancerDnsName("loadBalancerDnsName")
        .securityGroupIds(List.of("securityGroupIds"))
        .vpcId("vpcId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.CXAPI;

var loadBalancerContextResponse = new LoadBalancerContextResponse {
    IpAddressType = LoadBalancerIpAddressType.IPV4,
    LoadBalancerArn = "loadBalancerArn",
    LoadBalancerCanonicalHostedZoneId = "loadBalancerCanonicalHostedZoneId",
    LoadBalancerDnsName = "loadBalancerDnsName",
    SecurityGroupIds = new [] { "securityGroupIds" },
    VpcId = "vpcId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

loadBalancerContextResponse := &LoadBalancerContextResponse{
	IpAddressType: awscdk.Cx_api.LoadBalancerIpAddressType_IPV4,
	LoadBalancerArn: jsii.String("loadBalancerArn"),
	LoadBalancerCanonicalHostedZoneId: jsii.String("loadBalancerCanonicalHostedZoneId"),
	LoadBalancerDnsName: jsii.String("loadBalancerDnsName"),
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	VpcId: jsii.String("vpcId"),
}
```

## Properties

- `ipAddressType`: [LoadBalancerIpAddressType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cx_api.LoadBalancerIpAddressType.html) (required) — Type of IP address.

- `loadBalancerArn`: string (required) — The ARN of the load balancer.

- `loadBalancerCanonicalHostedZoneId`: string (required) — The hosted zone ID of the load balancer's name.

- `loadBalancerDnsName`: string (required) — Load balancer's DNS name.

- `securityGroupIds`: string[] (required) — Load balancer's security groups.

- `vpcId`: string (required) — Load balancer's VPC.
