選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

搭配使用 DescribeTargetGroupAttributes 與 CLI - AWS SDK 程式碼範例

文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

搭配使用 DescribeTargetGroupAttributes 與 CLI

下列程式碼範例示範如何使用 DescribeTargetGroupAttributes

CLI
AWS CLI

描述目標群組屬性

下列describe-target-group-attributes範例顯示指定目標群組的屬性。

aws elbv2 describe-target-group-attributes \ --target-group-arn arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067

如果通訊協定為 HTTP 或 HTTPS,且目標類型為 instance或 ,則輸出會包含 屬性ip

{ "Attributes": [ { "Value": "false", "Key": "stickiness.enabled" }, { "Value": "300", "Key": "deregistration_delay.timeout_seconds" }, { "Value": "lb_cookie", "Key": "stickiness.type" }, { "Value": "86400", "Key": "stickiness.lb_cookie.duration_seconds" }, { "Value": "0", "Key": "slow_start.duration_seconds" } ] }

如果通訊協定為 HTTP 或 HTTPS,且目標類型為 ,則下列輸出會包含屬性lambda

{ "Attributes": [ { "Value": "false", "Key": "lambda.multi_value_headers.enabled" } ] }

如果通訊協定為 TCP、TLS、UDP 或 TCP_UDP,則以下輸出包含屬性。

{ "Attributes": [ { "Value": "false", "Key": "proxy_protocol_v2.enabled" }, { "Value": "300", "Key": "deregistration_delay.timeout_seconds" } ] }
PowerShell
Tools for PowerShell

範例 1:此範例說明指定目標群組的屬性。

Get-ELB2TargetGroupAttribute -TargetGroupArn 'arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/test-tg/a4e04b3688be1970'

輸出:

Key Value --- ----- stickiness.enabled false deregistration_delay.timeout_seconds 300 stickiness.type lb_cookie stickiness.lb_cookie.duration_seconds 86400 slow_start.duration_seconds 0 load_balancing.algorithm.type round_robin
AWS CLI

描述目標群組屬性

下列describe-target-group-attributes範例顯示指定目標群組的屬性。

aws elbv2 describe-target-group-attributes \ --target-group-arn arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067

如果通訊協定為 HTTP 或 HTTPS,且目標類型為 instance或 ,則輸出會包含 屬性ip

{ "Attributes": [ { "Value": "false", "Key": "stickiness.enabled" }, { "Value": "300", "Key": "deregistration_delay.timeout_seconds" }, { "Value": "lb_cookie", "Key": "stickiness.type" }, { "Value": "86400", "Key": "stickiness.lb_cookie.duration_seconds" }, { "Value": "0", "Key": "slow_start.duration_seconds" } ] }

如果通訊協定為 HTTP 或 HTTPS,且目標類型為 ,則下列輸出會包含屬性lambda

{ "Attributes": [ { "Value": "false", "Key": "lambda.multi_value_headers.enabled" } ] }

如果通訊協定為 TCP、TLS、UDP 或 TCP_UDP,則以下輸出包含屬性。

{ "Attributes": [ { "Value": "false", "Key": "proxy_protocol_v2.enabled" }, { "Value": "300", "Key": "deregistration_delay.timeout_seconds" } ] }
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。