public sealed class TrafficPercentStrategy : IMessage<Rollout.Types.TrafficPercentStrategy>, IEquatable<Rollout.Types.TrafficPercentStrategy>, IDeepCloneable<Rollout.Types.TrafficPercentStrategy>, IBufferMessage, IMessage
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
public MapField<string, double> Percentages { get; }
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document describes the \u003ccode\u003eTrafficPercentStrategy\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.ServiceManagement.V1\u003c/code\u003e namespace, used for defining how traffic is split among different service configuration versions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTrafficPercentStrategy\u003c/code\u003e class implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from \u003ccode\u003eObject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers two constructors: a default constructor, \u003ccode\u003eTrafficPercentStrategy()\u003c/code\u003e, and a copy constructor, \u003ccode\u003eTrafficPercentStrategy(Rollout.Types.TrafficPercentStrategy)\u003c/code\u003e, which takes another \u003ccode\u003eTrafficPercentStrategy\u003c/code\u003e instance as a parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePercentages\u003c/code\u003e property, of type \u003ccode\u003eMapField<string, double>\u003c/code\u003e, is used to store the mapping of service configuration IDs to their respective traffic percentages.\u003c/p\u003e\n"],["\u003cp\u003eThe provided content details the different versions of the \u003ccode\u003eTrafficPercentStrategy\u003c/code\u003e, with the most recent being version 2.4.0 and other previous versions listed, down to version 1.1.0.\u003c/p\u003e\n"]]],[],null,[]]