Skip to content

Commit

Permalink
Branding migration
Browse files Browse the repository at this point in the history
  • Loading branch information
webtonize committed Mar 29, 2023
1 parent c49193c commit a250829
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
14 changes: 7 additions & 7 deletions docs/Get-ElectricityMapsBestAzureRegion.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Get-ElectricityMapsBestAzureRegion

## SYNOPSIS
Get the best Azure region from a provided list of regions based on CO2 Signal emissions data.
Get the best Azure region from a provided list of regions based on ElectricityMaps emissions data.

## SYNTAX

Expand All @@ -10,7 +10,7 @@ Get-ElectricityMapsBestAzureRegion [-Regions] <String[]> [-AuthToken] <String> [
```

## DESCRIPTION
Retrieves the best Azure region from a provided list of regions based on CO2 Signal emissions data.
Retrieves the best Azure region from a provided list of regions based on ElectricityMaps emissions data.

## EXAMPLES

Expand All @@ -27,7 +27,7 @@ Get-ElectricityMapsBestAzureRegion -Regions @("westeurope", "northeurope", "east
## PARAMETERS

### -Regions
The list of Azure Regions to get the CO2 Signal value for.
The list of Azure Regions to get the ElectricityMaps value for.

```yaml
Type: String[]
Expand All @@ -42,7 +42,7 @@ Accept wildcard characters: False
```
### -AuthToken
The CO2 Signal API token to use for authentication.
The ElectricityMaps API token to use for authentication.
```yaml
Type: String
Expand All @@ -62,16 +62,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## INPUTS
### System.String[]
### - The Azure Regions to get the CO2 Signal value for.
### - The Azure Regions to get the ElectricityMaps value for.
## OUTPUTS
### System.Management.Automation.PSObject
### - Timestamp: The timestamp of the CO2 Signal data.
### - Timestamp: The timestamp of the ElectricityMaps data.
### - CarbonIntensity: The carbon intensity of the electricity.
### - CarbonIntensityUnit: The unit of measure of the carbon intensity value.
### - FossilFuelPercentage: The percentage of fossil fuel used to generate electricity.
### - Region: The Azure Region.
### - CountryCode: The country location code from CO2 Signal.
### - CountryCode: The country location code from ElectricityMaps.
## NOTES
You will need to register an account for an API token from https://www.co2signal.com/ to use this function.
Expand Down
14 changes: 7 additions & 7 deletions docs/Get-ElectricityMapsForAzureRegion.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Get-ElectricityMapsForAzureRegion

## SYNOPSIS
Get CO2 Signal value for Azure Region
Get ElectricityMaps value for Azure Region

## SYNTAX

Expand All @@ -10,7 +10,7 @@ Get-ElectricityMapsForAzureRegion [-Region] <String> [-AuthToken] <String> [<Com
```

## DESCRIPTION
Retrieves the CO2 Signal value for the specified Azure Region.
Retrieves the ElectricityMaps value for the specified Azure Region.

## EXAMPLES

Expand All @@ -27,7 +27,7 @@ Get-ElectricityMapsForAzureRegion -Region "westeurope" -AuthToken $token
## PARAMETERS

### -Region
The Azure Region to get the CO2 Signal value for.
The Azure Region to get the ElectricityMaps value for.

```yaml
Type: String
Expand All @@ -42,7 +42,7 @@ Accept wildcard characters: False
```
### -AuthToken
The CO2 Signal API token to use for authentication.
The ElectricityMaps API token to use for authentication.
```yaml
Type: String
Expand All @@ -62,16 +62,16 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## INPUTS
### System.String
### - The Azure Region to get the CO2 Signal value for.
### - The Azure Region to get the ElectricityMaps value for.
## OUTPUTS
### System.Management.Automation.PSObject
### - Timestamp: The timestamp of the CO2 Signal data.
### - Timestamp: The timestamp of the ElectricityMaps data.
### - CarbonIntensity: The carbon intensity of the electricity.
### - CarbonIntensityUnit: The unit of measure of the carbon intensity value.
### - FossilFuelPercentage: The percentage of fossil fuel used to generate electricity.
### - Region: The Azure Region.
### - CountryCode: The country location code from CO2 Signal.
### - CountryCode: The country location code from ElectricityMaps.
## NOTES
You will need to register an account for an API token from https://www.co2signal.com/ to use this function.
You will also need a connected Azure PowerShell session.
Expand Down
18 changes: 9 additions & 9 deletions src/PSElectricityMaps/Get-ElectricityMapsBestAzureRegion.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<#
.SYNOPSIS
Get the best Azure region from a provided list of regions based on CO2 Signal emissions data.
Get the best Azure region from a provided list of regions based on ElectricityMaps emissions data.
.DESCRIPTION
Retrieves the best Azure region from a provided list of regions based on CO2 Signal emissions data.
Retrieves the best Azure region from a provided list of regions based on ElectricityMaps emissions data.
.PARAMETER Regions
The list of Azure Regions to get the CO2 Signal value for.
The list of Azure Regions to get the ElectricityMaps value for.
.PARAMETER AuthToken
The CO2 Signal API token to use for authentication.
The ElectricityMaps API token to use for authentication.
.EXAMPLE
Get-ElectricityMapsBestAzureRegion -Regions @("westeurope", "northeurope", "eastus") -AuthToken $token
Expand All @@ -31,16 +31,16 @@
.INPUTS
System.String[]
- The Azure Regions to get the CO2 Signal value for.
- The Azure Regions to get the ElectricityMaps value for.
.OUTPUTS
System.Management.Automation.PSObject
- Timestamp: The timestamp of the CO2 Signal data.
- Timestamp: The timestamp of the ElectricityMaps data.
- CarbonIntensity: The carbon intensity of the electricity.
- CarbonIntensityUnit: The unit of measure of the carbon intensity value.
- FossilFuelPercentage: The percentage of fossil fuel used to generate electricity.
- Region: The Azure Region.
- CountryCode: The country location code from CO2 Signal.
- CountryCode: The country location code from ElectricityMaps.
#>
Expand All @@ -50,15 +50,15 @@ function Get-ElectricityMapsBestAzureRegion {
[Parameter(
Mandatory = $true,
ValueFromPipeline = $true,
HelpMessage = "The list of Azure Regions to get the CO2 Signal value for."
HelpMessage = "The list of Azure Regions to get the ElectricityMaps value for."
)]
[ValidateNotNullOrEmpty()]
[string[]]
$Regions,

[Parameter(
Mandatory = $true,
HelpMessage = "The CO2 Signal API token to use for authentication."
HelpMessage = "The ElectricityMaps API token to use for authentication."
)]
[ValidateNotNullOrEmpty()]
[string]
Expand Down
22 changes: 11 additions & 11 deletions src/PSElectricityMaps/Get-ElectricityMapsForAzureRegion.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<#
.SYNOPSIS
Get CO2 Signal value for Azure Region
Get ElectricityMaps value for Azure Region
.DESCRIPTION
Retrieves the CO2 Signal value for the specified Azure Region.
Retrieves the ElectricityMaps value for the specified Azure Region.
.PARAMETER Region
The Azure Region to get the CO2 Signal value for.
The Azure Region to get the ElectricityMaps value for.
.PARAMETER AuthToken
The CO2 Signal API token to use for authentication.
The ElectricityMaps API token to use for authentication.
.EXAMPLE
Get-ElectricityMapsForAzureRegion -Region "westeurope" -AuthToken $token
Expand All @@ -31,32 +31,32 @@
.INPUTS
System.String
- The Azure Region to get the CO2 Signal value for.
- The Azure Region to get the ElectricityMaps value for.
.OUTPUTS
System.Management.Automation.PSObject
- Timestamp: The timestamp of the CO2 Signal data.
- Timestamp: The timestamp of the ElectricityMaps data.
- CarbonIntensity: The carbon intensity of the electricity.
- CarbonIntensityUnit: The unit of measure of the carbon intensity value.
- FossilFuelPercentage: The percentage of fossil fuel used to generate electricity.
- Region: The Azure Region.
- CountryCode: The country location code from CO2 Signal.
- CountryCode: The country location code from ElectricityMaps.
#>
function Get-ElectricityMapsForAzureRegion {
[CmdletBinding()]
param (
[Parameter(
Mandatory = $true,
ValueFromPipeline = $true,
HelpMessage = "The Azure Region to get the CO2 Signal value for."
HelpMessage = "The Azure Region to get the ElectricityMaps value for."
)]
[ValidateNotNullOrEmpty()]
[string]
$Region,

[Parameter(
Mandatory = $true,
HelpMessage = "The CO2 Signal API token to use for authentication."
HelpMessage = "The ElectricityMaps API token to use for authentication."
)]
[ValidateNotNullOrEmpty()]
[string]
Expand All @@ -76,9 +76,9 @@ function Get-ElectricityMapsForAzureRegion {
$headers = @{
"auth-token" = $AuthToken
}
Write-Verbose "Calling CO2 Signal API: $uri"
Write-Verbose "Calling ElectricityMaps API: $uri"
$response = Invoke-RestMethod -Uri $uri -Headers $headers -Method Get -ContentType "application/json"
Write-Verbose "CO2 Signal API response: $response"
Write-Verbose "ElectricityMaps API response: $response"
return New-Object psobject -Property @{
CarbonIntensity = $response.data.carbonIntensity
CarbonIntensityUnit = $response.units.carbonIntensity
Expand Down

0 comments on commit a250829

Please sign in to comment.