public sealed class RequestMetadata : IMessage<RequestMetadata>, IEquatable<RequestMetadata>, IDeepCloneable<RequestMetadata>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Audit API class RequestMetadata.
The IP address of the caller.
For a caller from the internet, this will be the public IPv4 or IPv6
address. For calls made from inside Google's internal production network
from one GCP service to another, caller_ip will be redacted to "private".
For a caller from a Compute Engine VM with a external IP address,
caller_ip will be the VM's external IP address. For a caller from a
Compute Engine VM without a external IP address, if the VM is in the same
organization (or project) as the accessed resource, caller_ip will be the
VM's internal IPv4 address, otherwise caller_ip will be redacted to
"gce-internal-ip". See https://cloud.google.com/compute/docs/vpc/ for more
information.
The network of the caller.
Set only if the network host project is part of the same GCP organization
(or project) as the accessed resource.
See https://cloud.google.com/compute/docs/vpc/ for more information.
This is a scheme-less URI full resource name. For example:
public AttributeContext.Types.Peer DestinationAttributes { get; set; }
The destination of a network activity, such as accepting a TCP connection.
In a multi hop network activity, the destination represents the receiver of
the last hop. Only two fields are used in this message, Peer.port and
Peer.ip. These fields are optionally populated by those services utilizing
the IAM condition feature.
public AttributeContext.Types.Request RequestAttributes { get; set; }
Request attributes used in IAM condition evaluation. This field contains
request attributes like request time and access levels associated with
the request.
To get the whole view of the attributes used in IAM
condition evaluation, the user must also look into
AuditLog.authentication_info.resource_attributes.
[[["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-08-28 UTC."],[[["\u003cp\u003eThe latest version of the Google Cloud Audit API class RequestMetadata is 2.5.0, with documentation available for versions ranging from 1.0.0 to 2.5.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRequestMetadata\u003c/code\u003e class provides metadata about a request, including the caller's IP address, network, and user agent, as well as destination and request attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCallerIp\u003c/code\u003e property identifies the IP address of the caller, with special handling for calls made within Google's internal network or from Compute Engine VMs.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRequestMetadata\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, allowing it to be used in various contexts within the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003eThe class has properties like \u003ccode\u003eCallerNetwork\u003c/code\u003e, \u003ccode\u003eCallerSuppliedUserAgent\u003c/code\u003e, \u003ccode\u003eDestinationAttributes\u003c/code\u003e and \u003ccode\u003eRequestAttributes\u003c/code\u003e, that can provide additional info about the user and their request.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Audit API - Class RequestMetadata (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.Audit/latest/Google.Cloud.Audit.RequestMetadata)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Audit/2.4.0/Google.Cloud.Audit.RequestMetadata)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Audit/2.3.0/Google.Cloud.Audit.RequestMetadata)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Audit/2.2.0/Google.Cloud.Audit.RequestMetadata)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Audit/2.1.0/Google.Cloud.Audit.RequestMetadata)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Audit/2.0.0/Google.Cloud.Audit.RequestMetadata)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Audit/1.1.0/Google.Cloud.Audit.RequestMetadata)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Audit/1.0.0/Google.Cloud.Audit.RequestMetadata) \n\n public sealed class RequestMetadata : IMessage\u003cRequestMetadata\u003e, IEquatable\u003cRequestMetadata\u003e, IDeepCloneable\u003cRequestMetadata\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Audit API class RequestMetadata.\n\nMetadata about the request. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RequestMetadata \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RequestMetadata](/dotnet/docs/reference/Google.Cloud.Audit/latest/Google.Cloud.Audit.RequestMetadata), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RequestMetadata](/dotnet/docs/reference/Google.Cloud.Audit/latest/Google.Cloud.Audit.RequestMetadata), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RequestMetadata](/dotnet/docs/reference/Google.Cloud.Audit/latest/Google.Cloud.Audit.RequestMetadata), [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.Audit](/dotnet/docs/reference/Google.Cloud.Audit/latest/Google.Cloud.Audit)\n\nAssembly\n--------\n\nGoogle.Cloud.Audit.dll\n\nConstructors\n------------\n\n### RequestMetadata()\n\n public RequestMetadata()\n\n### RequestMetadata(RequestMetadata)\n\n public RequestMetadata(RequestMetadata other)\n\nProperties\n----------\n\n### CallerIp\n\n public string CallerIp { get; set; }\n\nThe IP address of the caller.\nFor a caller from the internet, this will be the public IPv4 or IPv6\naddress. For calls made from inside Google's internal production network\nfrom one GCP service to another, `caller_ip` will be redacted to \"private\".\nFor a caller from a Compute Engine VM with a external IP address,\n`caller_ip` will be the VM's external IP address. For a caller from a\nCompute Engine VM without a external IP address, if the VM is in the same\norganization (or project) as the accessed resource, `caller_ip` will be the\nVM's internal IPv4 address, otherwise `caller_ip` will be redacted to\n\"gce-internal-ip\". See \u003chttps://cloud.google.com/compute/docs/vpc/\u003e for more\ninformation.\n\n### CallerNetwork\n\n public string CallerNetwork { get; set; }\n\nThe network of the caller.\nSet only if the network host project is part of the same GCP organization\n(or project) as the accessed resource.\nSee \u003chttps://cloud.google.com/compute/docs/vpc/\u003e for more information.\nThis is a scheme-less URI full resource name. For example: \n\n \"//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID\"\n\n### CallerSuppliedUserAgent\n\n public string CallerSuppliedUserAgent { get; set; }\n\nThe user agent of the caller.\nThis information is not authenticated and should be treated accordingly.\nFor example:\n\n- `google-api-python-client/1.4.0`: The request was made by the Google API client for Python.\n- `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the Google Cloud SDK CLI (gcloud).\n- `AppEngine-Google; (+http://code.google.com/appengine; appid:\n s~my-project`: The request was made from the `my-project` App Engine app.\n\n### DestinationAttributes\n\n public AttributeContext.Types.Peer DestinationAttributes { get; set; }\n\nThe destination of a network activity, such as accepting a TCP connection.\nIn a multi hop network activity, the destination represents the receiver of\nthe last hop. Only two fields are used in this message, Peer.port and\nPeer.ip. These fields are optionally populated by those services utilizing\nthe IAM condition feature.\n\n### RequestAttributes\n\n public AttributeContext.Types.Request RequestAttributes { get; set; }\n\nRequest attributes used in IAM condition evaluation. This field contains\nrequest attributes like request time and access levels associated with\nthe request.\n\nTo get the whole view of the attributes used in IAM\ncondition evaluation, the user must also look into\n`AuditLog.authentication_info.resource_attributes`."]]