public sealed class AclPolicyName : IResourceName, IEquatable<AclPolicyName>Reference documentation and code samples for the Google Cloud Memorystore for Redis (cluster management) v1 API class AclPolicyName.
Resource name for the AclPolicy resource.
Namespace
Google.Cloud.Redis.Cluster.V1Assembly
Google.Cloud.Redis.Cluster.V1.dll
Constructors
AclPolicyName(string, string, string)
public AclPolicyName(string projectId, string locationId, string aclPolicyId)Constructs a new instance of a AclPolicyName class from the component parts of pattern
projects/{project}/locations/{location}/aclPolicies/{acl_policy}
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
aclPolicyId |
stringThe |
Properties
AclPolicyId
public string AclPolicyId { get; }The AclPolicy ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
IsKnownPattern
public bool IsKnownPattern { get; }Whether this instance contains a resource name with a known pattern.
| Property Value | |
|---|---|
| Type | Description |
bool |
|
LocationId
public string LocationId { get; }The Location ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
ProjectId
public string ProjectId { get; }The Project ID. Will not be null, unless this instance contains an unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Type
public AclPolicyName.ResourceNameType Type { get; }The AclPolicyName.ResourceNameType of the contained resource name.
| Property Value | |
|---|---|
| Type | Description |
AclPolicyNameResourceNameType |
|
UnparsedResource
public UnparsedResourceName UnparsedResource { get; }The contained UnparsedResourceName. Only non-null if this instance contains an
unparsed resource name.
| Property Value | |
|---|---|
| Type | Description |
UnparsedResourceName |
|
Methods
Format(string, string, string)
public static string Format(string projectId, string locationId, string aclPolicyId)Formats the IDs into the string representation of this AclPolicyName with pattern
projects/{project}/locations/{location}/aclPolicies/{acl_policy}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
aclPolicyId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AclPolicyName with pattern
|
FormatProjectLocationAclPolicy(string, string, string)
public static string FormatProjectLocationAclPolicy(string projectId, string locationId, string aclPolicyId)Formats the IDs into the string representation of this AclPolicyName with pattern
projects/{project}/locations/{location}/aclPolicies/{acl_policy}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
aclPolicyId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of this AclPolicyName with pattern
|
FromProjectLocationAclPolicy(string, string, string)
public static AclPolicyName FromProjectLocationAclPolicy(string projectId, string locationId, string aclPolicyId)Creates a AclPolicyName with the pattern
projects/{project}/locations/{location}/aclPolicies/{acl_policy}.
| Parameters | |
|---|---|
| Name | Description |
projectId |
stringThe |
locationId |
stringThe |
aclPolicyId |
stringThe |
| Returns | |
|---|---|
| Type | Description |
AclPolicyName |
A new instance of AclPolicyName constructed from the provided ids. |
FromUnparsed(UnparsedResourceName)
public static AclPolicyName FromUnparsed(UnparsedResourceName unparsedResourceName)Creates a AclPolicyName containing an unparsed resource name.
| Parameter | |
|---|---|
| Name | Description |
unparsedResourceName |
UnparsedResourceNameThe unparsed resource name. Must not be |
| Returns | |
|---|---|
| Type | Description |
AclPolicyName |
A new instance of AclPolicyName containing the provided
|
GetHashCode()
public override int GetHashCode()Returns a hash code for this resource name.
| Returns | |
|---|---|
| Type | Description |
int |
|
Parse(string)
public static AclPolicyName Parse(string aclPolicyName)Parses the given resource name string into a new AclPolicyName instance.
| Parameter | |
|---|---|
| Name | Description |
aclPolicyName |
stringThe resource name in string form. Must not be |
| Returns | |
|---|---|
| Type | Description |
AclPolicyName |
The parsed AclPolicyName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/aclPolicies/{acl_policy}
Parse(string, bool)
public static AclPolicyName Parse(string aclPolicyName, bool allowUnparsed)Parses the given resource name string into a new AclPolicyName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
aclPolicyName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
| Returns | |
|---|---|
| Type | Description |
AclPolicyName |
The parsed AclPolicyName if successful. |
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/aclPolicies/{acl_policy}
Or may be in any format if allowUnparsed is true.
ToString()
public override string ToString()The string representation of the resource name.
| Returns | |
|---|---|
| Type | Description |
string |
The string representation of the resource name. |
TryParse(string, out AclPolicyName)
public static bool TryParse(string aclPolicyName, out AclPolicyName result)Tries to parse the given resource name string into a new AclPolicyName instance.
| Parameters | |
|---|---|
| Name | Description |
aclPolicyName |
stringThe resource name in string form. Must not be |
result |
AclPolicyNameWhen this method returns, the parsed AclPolicyName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/aclPolicies/{acl_policy}
TryParse(string, bool, out AclPolicyName)
public static bool TryParse(string aclPolicyName, bool allowUnparsed, out AclPolicyName result)Tries to parse the given resource name string into a new AclPolicyName instance; optionally allowing an unparseable resource name.
| Parameters | |
|---|---|
| Name | Description |
aclPolicyName |
stringThe resource name in string form. Must not be |
allowUnparsed |
boolIf |
result |
AclPolicyNameWhen this method returns, the parsed AclPolicyName, or |
| Returns | |
|---|---|
| Type | Description |
bool |
|
To parse successfully, the resource name must be formatted as one of the following:
projects/{project}/locations/{location}/aclPolicies/{acl_policy}
Or may be in any format if allowUnparsed is true.
Operators
operator ==(AclPolicyName, AclPolicyName)
public static bool operator ==(AclPolicyName a, AclPolicyName b)Determines whether two specified resource names have the same value.
| Parameters | |
|---|---|
| Name | Description |
a |
AclPolicyNameThe first resource name to compare, or null. |
b |
AclPolicyNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |
operator !=(AclPolicyName, AclPolicyName)
public static bool operator !=(AclPolicyName a, AclPolicyName b)Determines whether two specified resource names have different values.
| Parameters | |
|---|---|
| Name | Description |
a |
AclPolicyNameThe first resource name to compare, or null. |
b |
AclPolicyNameThe second resource name to compare, or null. |
| Returns | |
|---|---|
| Type | Description |
bool |
true if the value of |