public static class Project
Reference documentation and code samples for the Google.Cloud.Diagnostics.Common class Project.
Operations for Cloud Console Projects.
Namespace
GoogleCloudGoogle.Cloud.DiagnosticsCommonAssembly
Google.Cloud.Diagnostics.Common.dll
Methods
GetAndCheckProjectId(string, MonitoredResource)
public static string GetAndCheckProjectId(string projectId, MonitoredResource monitoredResource = null)
Determines the correct project id from a string project id and a MonitoredResource. If the specified project id is not null, it is returned. Otherwise, if the project id of the MonitoredResource is not null, it is returned. It both are null, an InvalidOperationException is thrown.
Parameters | |
---|---|
Name | Description |
projectId | string The Google Cloud project ID. Can be null. |
monitoredResource | MonitoredResource Optional, The monitored resource. If unset the monitored resource will be auto detected. |
Returns | |
---|---|
Type | Description |
string | The Google Cloud project ID. |
GetAndCheckServiceName(string, MonitoredResource)
public static string GetAndCheckServiceName(string serviceName, MonitoredResource monitoredResource = null)
Determines the correct service name from a string serviceName
and a MonitoredResource.
If the specified service name is not null, it is returned. Otherwise, if the service name of
the MonitoredResource is not null, it is returned. It both are null,
an InvalidOperationException is thrown.
Parameters | |
---|---|
Name | Description |
serviceName | string The service name. Can be null. |
monitoredResource | MonitoredResource Optional, The monitored resource. If unset the monitored resource will be auto detected. |
Returns | |
---|---|
Type | Description |
string | The service name that was passed in or detected. |
GetAndCheckServiceVersion(string, MonitoredResource)
public static string GetAndCheckServiceVersion(string serviceVersion, MonitoredResource monitoredResource = null)
Determines the correct service version from a string serviceVersion
and a MonitoredResource.
If the specified service version is not null, it is returned. Otherwise, if the service version of
the MonitoredResource provided or detected is not null, it is returned. It both are null,
an InvalidOperationException is thrown.
Parameters | |
---|---|
Name | Description |
serviceVersion | string The service version. Can be null. |
monitoredResource | MonitoredResource Optional, The monitored resource. If unset the monitored resource will be auto detected. |
Returns | |
---|---|
Type | Description |
string | The Google App Engine service version. |
GetProjectId(string, MonitoredResource)
public static string GetProjectId(string projectId, MonitoredResource monitoredResource = null)
Determines the correct project ID from a string projectId
and a MonitoredResource.
If the specified project ID is not null, it is returned. Otherwise, if the project ID of
the MonitoredResource is not null, it is returned. It both are null, null is returned.
Parameters | |
---|---|
Name | Description |
projectId | string The project ID. Can be null. |
monitoredResource | MonitoredResource Optional, The monitored resource. If unset the monitored resource will be auto detected. |
Returns | |
---|---|
Type | Description |
string | The Google Cloud project ID. |
GetServiceName(string, MonitoredResource)
public static string GetServiceName(string serviceName, MonitoredResource monitoredResource = null)
Determines the correct service name from a string serviceName
and a MonitoredResource.
If the specified service name is not null, it is returned. Otherwise, if the service name of
the MonitoredResource is not null, it is returned. It both are null, null is returned.
Parameters | |
---|---|
Name | Description |
serviceName | string The service name. Can be null. |
monitoredResource | MonitoredResource Optional, The monitored resource. If unset the monitored resource will be auto detected. |
Returns | |
---|---|
Type | Description |
string | The service name that was passed in or detected. |
GetServiceVersion(string, MonitoredResource)
public static string GetServiceVersion(string serviceVersion, MonitoredResource monitoredResource = null)
Determines the correct service version from a string serviceVersion
and a MonitoredResource.
If the specified service version is not null, it is returned. Otherwise, if the service version of
the MonitoredResource provided or detected is not null, it is returned. It both are null, null is resturned.
Parameters | |
---|---|
Name | Description |
serviceVersion | string The service version. Can be null. |
monitoredResource | MonitoredResource Optional, The monitored resource. If unset the monitored resource will be auto detected. |
Returns | |
---|---|
Type | Description |
string | The service version that was passed in or detected. |