C# Class Google.PowerShell.Common.CloudSdkSettings

Wrapper over the settings files created by the Google Cloud SDK. No data is cached, so it is possible to have race conditions between gcloud and PowerShell. This is by design. gcloud is the source of truth for data.
Show file Open project: GoogleCloudPlatform/google-cloud-powershell Class Usage Examples

Public Methods

Method Description
GetAnonymousClientID ( ) : string

Client ID refers to the random UUID generated to group telemetry reporting. The file is generated on-demand by the Python code. Returns a new UUID if the file isn't found. (Meaning we will generate new UUIDs until the Python code gets executed.)

GetDefaultProject ( ) : string

Returns the default project for the Google Cloud SDK.

GetOptIntoUsageReporting ( ) : bool

Returns whether or not the user has opted-into of telemetry reporting. Defaults to false (opted-out).

GetSettingsValue ( string settingName ) : string

Returns the setting with the given name from the currently active gcloud configuration.

Private Methods

Method Description
CloudSdkSettings ( ) : System

Method Details

GetAnonymousClientID() public static method

Client ID refers to the random UUID generated to group telemetry reporting. The file is generated on-demand by the Python code. Returns a new UUID if the file isn't found. (Meaning we will generate new UUIDs until the Python code gets executed.)
public static GetAnonymousClientID ( ) : string
return string

GetDefaultProject() public static method

Returns the default project for the Google Cloud SDK.
public static GetDefaultProject ( ) : string
return string

GetOptIntoUsageReporting() public static method

Returns whether or not the user has opted-into of telemetry reporting. Defaults to false (opted-out).
public static GetOptIntoUsageReporting ( ) : bool
return bool

GetSettingsValue() public static method

Returns the setting with the given name from the currently active gcloud configuration.
public static GetSettingsValue ( string settingName ) : string
settingName string
return string