public static class Project
Operations for Cloud Console Projects.
Namespace
Google.Cloud.Diagnostics.CommonAssembly
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. |