When specified, replaces the host part of the task URL. For example,
if the task URL is "https://www.google.com," and host value is set to
"example.net", the overridden URI will be changed to "https://example.net."
Host value cannot be an empty string (INVALID_ARGUMENT).
When specified, replaces the port part of the task URI. For instance,
for a URI http://www.google.com/foo and port=123, the overridden URI
becomes http://www.google.com:123/foo. Note that the port value must be a
positive integer. Setting the port to 0 (Zero) clears the URI port.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eUriOverride\u003c/code\u003e class in the Google Cloud Tasks v2beta3 API allows for partial or full modification of HTTP task URIs within a queue.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides properties to override the host, port, scheme, path, and query components of a task's URI, allowing for flexible redirection.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eUriOverride\u003c/code\u003e offers control over whether the overridden URI should enforce changes always or under specific conditions through the \u003ccode\u003eUriOverrideEnforceMode\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eHost\u003c/code\u003e, \u003ccode\u003ePort\u003c/code\u003e, and \u003ccode\u003eScheme\u003c/code\u003e properties can be used to replace the respective parts of the task URL, with specific rules like the host not being empty and the port being a positive integer.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePathOverride\u003c/code\u003e and \u003ccode\u003eQueryOverride\u003c/code\u003e properties let you modify or clear the URI path segment and query string of the tasks.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Tasks v2beta3 API - Class UriOverride (3.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.UriOverride)\n- [3.0.0-beta06](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/3.0.0-beta06/Google.Cloud.Tasks.V2Beta3.UriOverride)\n- [2.0.0-beta08](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/2.0.0-beta08/Google.Cloud.Tasks.V2Beta3.UriOverride) \n\n public sealed class UriOverride : IMessage\u003cUriOverride\u003e, IEquatable\u003cUriOverride\u003e, IDeepCloneable\u003cUriOverride\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Tasks v2beta3 API class UriOverride.\n\nURI Override.\n\nWhen specified, all the HTTP tasks inside the queue will be partially or\nfully overridden depending on the configured values. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e UriOverride \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UriOverride](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.UriOverride), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UriOverride](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.UriOverride), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UriOverride](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.UriOverride), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Tasks.V2Beta3](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3)\n\nAssembly\n--------\n\nGoogle.Cloud.Tasks.V2Beta3.dll\n\nConstructors\n------------\n\n### UriOverride()\n\n public UriOverride()\n\n### UriOverride(UriOverride)\n\n public UriOverride(UriOverride other)\n\nProperties\n----------\n\n### HasHost\n\n public bool HasHost { get; }\n\nGets whether the \"host\" field is set\n\n### HasPort\n\n public bool HasPort { get; }\n\nGets whether the \"port\" field is set\n\n### HasScheme\n\n public bool HasScheme { get; }\n\nGets whether the \"scheme\" field is set\n\n### Host\n\n public string Host { get; set; }\n\nHost override.\n\nWhen specified, replaces the host part of the task URL. For example,\nif the task URL is \"\u003chttps://www.google.com\u003e,\" and host value is set to\n\"example.net\", the overridden URI will be changed to \"\u003chttps://example.net\u003e.\"\nHost value cannot be an empty string (INVALID_ARGUMENT).\n\n### PathOverride\n\n public PathOverride PathOverride { get; set; }\n\nURI path.\n\nWhen specified, replaces the existing path of the task URL. Setting the\npath value to an empty string clears the URI path segment.\n\n### Port\n\n public long Port { get; set; }\n\nPort override.\n\nWhen specified, replaces the port part of the task URI. For instance,\nfor a URI \u003chttp://www.google.com/foo\u003e and port=123, the overridden URI\nbecomes \u003chttp://www.google.com:123/foo\u003e. Note that the port value must be a\npositive integer. Setting the port to 0 (Zero) clears the URI port.\n\n### QueryOverride\n\n public QueryOverride QueryOverride { get; set; }\n\nURI Query.\n\nWhen specified, replaces the query part of the task URI. Setting the\nquery value to an empty string clears the URI query segment.\n\n### Scheme\n\n public UriOverride.Types.Scheme Scheme { get; set; }\n\nScheme override.\n\nWhen specified, the task URI scheme is replaced by the provided value (HTTP\nor HTTPS).\n\n### UriOverrideEnforceMode\n\n public UriOverride.Types.UriOverrideEnforceMode UriOverrideEnforceMode { get; set; }\n\nURI Override Enforce Mode\n\nWhen specified, determines the Target UriOverride mode. If not specified,\nit defaults to ALWAYS."]]