# Class TrafficPercentStrategy (1.17.0)

1.17.0 (latest) 1.16.0 1.15.0 1.14.0 1.13.1 1.12.0 1.11.0 1.10.1 1.8.5 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.3 1.1.1 1.0.4 0.1.0

    TrafficPercentStrategy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Strategy that specifies how clients of Google Service Controller
want to send traffic to use different config versions. This is
generally used by API proxy to split traffic based on your
configured percentage for each config version.

One example of how to gradually rollout a new service configuration
using this strategy: Day 1

::

    Rollout {
      id: "example.googleapis.com/rollout_20160206"
      traffic_percent_strategy {
        percentages: {
          "example.googleapis.com/20160201": 70.00
          "example.googleapis.com/20160206": 30.00
        }
      }
    }

Day 2

::

    Rollout {
      id: "example.googleapis.com/rollout_20160207"
      traffic_percent_strategy: {
        percentages: {
          "example.googleapis.com/20160206": 100.00
        }
      }
    }

| ## Attribute ||
|---|---|
| **Name** | **Description** |
| `percentages` | `MutableMapping[str, float]` Maps service configuration IDs to their corresponding traffic percentage. Key is the service configuration ID, Value is the traffic percentage which must be greater than 0.0 and the sum must equal to 100.0. |

## Classes

### PercentagesEntry

    PercentagesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |