Cloud Run Admin v2 API - Class SecretName (2.12.0)

public sealed class SecretName : IResourceName, IEquatable<SecretName>

Reference documentation and code samples for the Cloud Run Admin v2 API class SecretName.

Resource name for the Secret resource.

Inheritance

object > SecretName

Namespace

Google.Cloud.Run.V2

Assembly

Google.Cloud.Run.V2.dll

Constructors

SecretName(string, string)

public SecretName(string projectId, string secretId)

Constructs a new instance of a SecretName class from the component parts of pattern projects/{project}/secrets/{secret}

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

secretId string

The Secret ID. Must not be null or empty.

Properties

IsKnownPattern

public bool IsKnownPattern { get; }

Whether this instance contains a resource name with a known pattern.

Property Value
Type Description
bool

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

SecretId

public string SecretId { get; }

The Secret ID. Will not be null, unless this instance contains an unparsed resource name.

Property Value
Type Description
string

Type

public SecretName.ResourceNameType Type { get; }

The SecretName.ResourceNameType of the contained resource name.

Property Value
Type Description
SecretNameResourceNameType

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)

public static string Format(string projectId, string secretId)

Formats the IDs into the string representation of this SecretName with pattern projects/{project}/secrets/{secret}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

secretId string

The Secret ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this SecretName with pattern projects/{project}/secrets/{secret}.

FormatProjectSecret(string, string)

public static string FormatProjectSecret(string projectId, string secretId)

Formats the IDs into the string representation of this SecretName with pattern projects/{project}/secrets/{secret}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

secretId string

The Secret ID. Must not be null or empty.

Returns
Type Description
string

The string representation of this SecretName with pattern projects/{project}/secrets/{secret}.

FromProjectSecret(string, string)

public static SecretName FromProjectSecret(string projectId, string secretId)

Creates a SecretName with the pattern projects/{project}/secrets/{secret}.

Parameters
Name Description
projectId string

The Project ID. Must not be null or empty.

secretId string

The Secret ID. Must not be null or empty.

Returns
Type Description
SecretName

A new instance of SecretName constructed from the provided ids.

FromUnparsed(UnparsedResourceName)

public static SecretName FromUnparsed(UnparsedResourceName unparsedResourceName)

Creates a SecretName containing an unparsed resource name.

Parameter
Name Description
unparsedResourceName