public sealed class TrafficPercentStrategy : IMessage<Rollout.Types.TrafficPercentStrategy>, IEquatable<Rollout.Types.TrafficPercentStrategy>, IDeepCloneable<Rollout.Types.TrafficPercentStrategy>, IBufferMessage, IMessage
Reference documentation and code samples for the Service Management v1 API class Rollout.Types.TrafficPercentStrategy.
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\u003eThe \u003ccode\u003eTrafficPercentStrategy\u003c/code\u003e class defines how Google Service Controller clients should distribute traffic among different service configuration versions, typically used by API proxies for traffic splitting.\u003c/p\u003e\n"],["\u003cp\u003eThis strategy allows for gradual rollout of new service configurations by mapping service configuration IDs to their respective traffic percentages, with the total summing to 100%.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTrafficPercentStrategy\u003c/code\u003e class is part of the Google.Cloud.ServiceManagement.V1 namespace and implements multiple interfaces including IMessage, IEquatable, IDeepCloneable, and IBufferMessage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePercentages\u003c/code\u003e property, of type \u003ccode\u003eMapField<string, double>\u003c/code\u003e, is a key element of this class, mapping service configuration IDs to their corresponding traffic percentages.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions of the \u003ccode\u003eTrafficPercentStrategy\u003c/code\u003e class available for use, ranging from 1.1.0 to the latest 2.4.0, each with its own documentation page.\u003c/p\u003e\n"]]],[],null,[]]