Getting Information About Tags Associated with Your Load Balancers

You can get information about tags associated with your load balancers.

Getting Information About Tags Using OSC CLI

The ReadLoadBalancerTags command lists the tags associated with one or more specified load balancers.

Request sample
$ osc-cli api ReadLoadBalancerTags --profile "default" \
    --LoadBalancerNames '["private-lb-example"]'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • LoadBalancerNames: One or more load balancer names.

The ReadLoadBalancerTags command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • Tags: Information about one or more load balancer tags.

    • Key: The key of the tag.

    • LoadBalancerName: The name of the load balancer.

    • Value: The value of the tag.

Result sample
{
  "Tags": [
    {
      "Value": "value1",
      "LoadBalancerName": "private-lb-example",
      "Key": "key1"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Getting Information About Tags Using oapi-cli

The ReadLoadBalancerTags command lists the tags associated with one or more specified load balancers.

Request sample
$ oapi-cli --profile "default" ReadLoadBalancerTags \
    --LoadBalancerNames '["private-lb-example"]'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • LoadBalancerNames: One or more load balancer names.

The ReadLoadBalancerTags command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • Tags: Information about one or more load balancer tags.

    • Key: The key of the tag.

    • LoadBalancerName: The name of the load balancer.

    • Value: The value of the tag.

Result sample
{
  "Tags": [
    {
      "Value": "value1",
      "LoadBalancerName": "private-lb-example",
      "Key": "key1"
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Getting Information About Tags Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To get information about tags associated with your load balancers, use the describe-tags command following this syntax:

Request sample
$ aws elb describe-tags \
    --profile YOUR_PROFILE \
    --load-balancer-names MY_LOAD_BALANCER \
    --endpoint https://lbu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • load-balancer-names: The names of one or more load balancers.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The describe-tags command returns the following elements:

  • TagDescriptions: Information about one or more tags. This element contains the following information:

    • Tags: Information about one or more tags associated with a load balancer. This element contains the following information:

      • (optional) Value: The value of the tag.

      • key: They key of the tag.

    • LoadBalancerName: The name of the load balancer.

Result Sample
 {
  "TagDescriptions": [
      {
          "Tags": [
              {
                  "Value": "name",
                  "Key": "LB1"
              }
          ],
          "LoadBalancerName": "MY_LOAD_BALANCER"
      }
  ]
 }

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.