public ServicePerimeterName(string accessPolicyId, string servicePerimeterId)
Constructs a new instance of a ServicePerimeterName class from the component parts of pattern
accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}
public static string Format(string accessPolicyId, string servicePerimeterId)
Formats the IDs into the string representation of this ServicePerimeterName with pattern
accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}.
public static string FormatAccessPolicyServicePerimeter(string accessPolicyId, string servicePerimeterId)
Formats the IDs into the string representation of this ServicePerimeterName with pattern
accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}.
If true will successfully store an unparseable resource name into the UnparsedResource
property; otherwise will throw an ArgumentException if an unparseable resource name is
specified.
If true will successfully store an unparseable resource name into the UnparsedResource
property; otherwise will throw an ArgumentException if an unparseable resource name is
specified.
[[["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 \u003ccode\u003eServicePerimeterName\u003c/code\u003e class in the Identity Access Context Manager v1 API represents a resource name for a \u003ccode\u003eServicePerimeter\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API available is 2.5.0, with several prior versions also documented, ranging from 1.2.0 to 2.4.0.\u003c/p\u003e\n"],["\u003cp\u003eThis class implements \u003ccode\u003eIResourceName\u003c/code\u003e and \u003ccode\u003eIEquatable<ServicePerimeterName>\u003c/code\u003e and contains properties like \u003ccode\u003eAccessPolicyId\u003c/code\u003e, \u003ccode\u003eServicePerimeterId\u003c/code\u003e, \u003ccode\u003eIsKnownPattern\u003c/code\u003e, \u003ccode\u003eType\u003c/code\u003e, and \u003ccode\u003eUnparsedResource\u003c/code\u003e to manage resource name components and formats.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for parsing, formatting, and validating \u003ccode\u003eServicePerimeterName\u003c/code\u003e strings based on the pattern \u003ccode\u003eaccessPolicies/{access_policy}/servicePerimeters/{service_perimeter}\u003c/code\u003e, and can handle unparsed resource names.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServicePerimeterName\u003c/code\u003e class includes constructors and methods for handling various resource name manipulations, and it supports operators to compare between two instances.\u003c/p\u003e\n"]]],[],null,["# Identity Access Context Manager v1 API - Class ServicePerimeterName (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [2.4.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.4.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [2.3.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.3.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [2.2.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.2.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [2.1.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.1.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [2.0.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/2.0.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [1.5.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.5.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [1.4.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.4.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [1.3.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.3.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName)\n- [1.2.0](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/1.2.0/Google.Identity.AccessContextManager.V1.ServicePerimeterName) \n\n public sealed class ServicePerimeterName : IResourceName, IEquatable\u003cServicePerimeterName\u003e\n\nReference documentation and code samples for the Identity Access Context Manager v1 API class ServicePerimeterName.\n\nResource name for the `ServicePerimeter` resource. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ServicePerimeterName \n\nImplements\n----------\n\n[IResourceName](https://github.com/googleapis/gax-dotnet/blob/83f42b5edc4529818dbdb34d9ea9ecc3c04f7b6e/Google.Api.Gax/IResourceName.cs), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) \n\nInherited Members\n-----------------\n\n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype)\n\nNamespace\n---------\n\n[Google.Identity.AccessContextManager.V1](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1)\n\nAssembly\n--------\n\nGoogle.Identity.AccessContextManager.V1.dll\n\nConstructors\n------------\n\n### ServicePerimeterName(string, string)\n\n public ServicePerimeterName(string accessPolicyId, string servicePerimeterId)\n\nConstructs a new instance of a [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) class from the component parts of pattern\n`accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`\n\nProperties\n----------\n\n### AccessPolicyId\n\n public string AccessPolicyId { get; }\n\nThe `AccessPolicy` ID. Will not be `null`, unless this instance contains an unparsed resource\nname.\n\n### IsKnownPattern\n\n public bool IsKnownPattern { get; }\n\nWhether this instance contains a resource name with a known pattern.\n\n### ServicePerimeterId\n\n public string ServicePerimeterId { get; }\n\nThe `ServicePerimeter` ID. Will not be `null`, unless this instance contains an unparsed resource\nname.\n\n### Type\n\n public ServicePerimeterName.ResourceNameType Type { get; }\n\nThe [ServicePerimeterName.ResourceNameType](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName.ResourceNameType) of the contained resource name.\n\n### UnparsedResource\n\n public UnparsedResourceName UnparsedResource { get; }\n\nThe contained [UnparsedResourceName](https://github.com/googleapis/gax-dotnet/blob/83f42b5edc4529818dbdb34d9ea9ecc3c04f7b6e/Google.Api.Gax/UnparsedResourceName.cs). Only non-`null` if this instance contains an\nunparsed resource name.\n\nMethods\n-------\n\n### Format(string, string)\n\n public static string Format(string accessPolicyId, string servicePerimeterId)\n\nFormats the IDs into the string representation of this [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) with pattern\n`accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`.\n\n### FormatAccessPolicyServicePerimeter(string, string)\n\n public static string FormatAccessPolicyServicePerimeter(string accessPolicyId, string servicePerimeterId)\n\nFormats the IDs into the string representation of this [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) with pattern\n`accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`.\n\n### FromAccessPolicyServicePerimeter(string, string)\n\n public static ServicePerimeterName FromAccessPolicyServicePerimeter(string accessPolicyId, string servicePerimeterId)\n\nCreates a [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) with the pattern\n`accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`.\n\n### FromUnparsed(UnparsedResourceName)\n\n public static ServicePerimeterName FromUnparsed(UnparsedResourceName unparsedResourceName)\n\nCreates a [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) containing an unparsed resource name.\n\n### GetHashCode()\n\n public override int GetHashCode()\n\nReturns a hash code for this resource name.\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### Parse(string)\n\n public static ServicePerimeterName Parse(string servicePerimeterName)\n\nParses the given resource name string into a new [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`\n\n\u003cbr /\u003e\n\n### Parse(string, bool)\n\n public static ServicePerimeterName Parse(string servicePerimeterName, bool allowUnparsed)\n\nParses the given resource name string into a new [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) instance; optionally\nallowing an unparseable resource name.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\n### ToString()\n\n public override string ToString()\n\nThe string representation of the resource name.\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### TryParse(string, out ServicePerimeterName)\n\n public static bool TryParse(string servicePerimeterName, out ServicePerimeterName result)\n\nTries to parse the given resource name string into a new [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) instance.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`\n\n\u003cbr /\u003e\n\n### TryParse(string, bool, out ServicePerimeterName)\n\n public static bool TryParse(string servicePerimeterName, bool allowUnparsed, out ServicePerimeterName result)\n\nTries to parse the given resource name string into a new [ServicePerimeterName](/dotnet/docs/reference/Google.Identity.AccessContextManager.V1/latest/Google.Identity.AccessContextManager.V1.ServicePerimeterName) instance;\noptionally allowing an unparseable resource name.\n\n**Remarks** \nTo parse successfully, the resource name must be formatted as one of the following:\n\n- `accessPolicies/{access_policy}/servicePerimeters/{service_perimeter}`\n\nOr may be in any format if `allowUnparsed` is `true`.\n\n\u003cbr /\u003e\n\nOperators\n---------\n\n### operator ==(ServicePerimeterName, ServicePerimeterName)\n\n public static bool operator ==(ServicePerimeterName a, ServicePerimeterName b)\n\nDetermines whether two specified resource names have the same value.\n\n### operator !=(ServicePerimeterName, ServicePerimeterName)\n\n public static bool operator !=(ServicePerimeterName a, ServicePerimeterName b)\n\nDetermines whether two specified resource names have different values."]]