public sealed class SecurityMarks : IMessage<SecurityMarks>, IEquatable<SecurityMarks>, IDeepCloneable<SecurityMarks>, IBufferMessage, IMessage
Reference documentation and code samples for the Security Command Center v2 API class SecurityMarks.
User specified security marks that are attached to the parent Security
Command Center resource. Security marks are scoped within a Security Command
Center organization -- they can be modified and viewed by all users who have
proper permissions on the organization.
[[["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-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eSecurityMarks\u003c/code\u003e class within the Google Cloud Security Center v2 API, specifically for the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSecurityMarks\u003c/code\u003e class represents user-specified security marks attached to resources, which are accessible and modifiable by users with proper organization permissions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSecurityMarks\u003c/code\u003e instances are associated with a canonical name and a relative resource name, which can include organizations, folders, or projects, along with assets, sources, findings and their locations.\u003c/p\u003e\n"],["\u003cp\u003eThe 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, and includes properties like \u003ccode\u003eCanonicalName\u003c/code\u003e, \u003ccode\u003eMarks\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, and \u003ccode\u003eSecurityMarksName\u003c/code\u003e to manage the security marks.\u003c/p\u003e\n"],["\u003cp\u003eThe mutable user specified security marks are contained in the Marks property, and those keys and values have specific character requirements.\u003c/p\u003e\n"]]],[],null,["# Security Command Center v2 API - Class SecurityMarks (1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.SecurityMarks)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/1.1.0/Google.Cloud.SecurityCenter.V2.SecurityMarks)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/1.0.0/Google.Cloud.SecurityCenter.V2.SecurityMarks) \n\n public sealed class SecurityMarks : IMessage\u003cSecurityMarks\u003e, IEquatable\u003cSecurityMarks\u003e, IDeepCloneable\u003cSecurityMarks\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Security Command Center v2 API class SecurityMarks.\n\nUser specified security marks that are attached to the parent Security\nCommand Center resource. Security marks are scoped within a Security Command\nCenter organization -- they can be modified and viewed by all users who have\nproper permissions on the organization. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SecurityMarks \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SecurityMarks](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.SecurityMarks), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SecurityMarks](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.SecurityMarks), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SecurityMarks](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.SecurityMarks), [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.SecurityCenter.V2](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.SecurityCenter.V2.dll\n\nConstructors\n------------\n\n### SecurityMarks()\n\n public SecurityMarks()\n\n### SecurityMarks(SecurityMarks)\n\n public SecurityMarks(SecurityMarks other)\n\nProperties\n----------\n\n### CanonicalName\n\n public string CanonicalName { get; set; }\n\nThe canonical name of the marks. The following list shows some examples:\n\n- `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`\n- `folders/{folder_id}/assets/{asset_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`\n- `projects/{project_number}/assets/{asset_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`\n\n### Marks\n\n public MapField\u003cstring, string\u003e Marks { get; }\n\nMutable user specified security marks belonging to the parent resource.\nConstraints are as follows:\n\n- Keys and values are treated as case insensitive\n- Keys must be between 1 - 256 characters (inclusive)\n- Keys must be letters, numbers, underscores, or dashes\n- Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)\n\n### Name\n\n public string Name { get; set; }\n\nThe relative resource name of the SecurityMarks. See:\n\u003chttps://cloud.google.com/apis/design/resource_names#relative_resource_name\u003e\nThe following list shows some examples:\n\n- `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`\n\n### SecurityMarksName\n\n public SecurityMarksName SecurityMarksName { get; set; }\n\n[SecurityMarksName](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.SecurityMarksName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.SecurityCenter.V2/latest/Google.Cloud.SecurityCenter.V2.SecurityMarks#Google_Cloud_SecurityCenter_V2_SecurityMarks_Name) resource name property."]]