Skip to content

Commit

Permalink
Release notes for 1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stuart-macleod-akamai committed May 2, 2023
1 parent 777d8d8 commit b25e046
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

# Changelog

## 1.11.0 - (2/5/2023)

### Hostname Bucket support, cleanup & many fixes

- [Property] - Added functions to cover the new Hostname Buckets feature
- [Cleanup] - Functions for the following deprecated APIs have been removed: Diagnostic Tools, DataStream 1, SPS
- [Image & Video Manager] - Added PolicySet functions, and moved various existing endpoints from v0 to v2
- [AppSec] - Updated Activate-AppSecConfiguration to use new endpoint, broken due to the previous path being deprecated
- [AppSec] - Added new function List-AppSecAvailableHostnames
- [Property] - Fixed Type in PeerReviewedBy parameter
- [Reporting] - Updated $ReportType variable to $Name, in-line with API definition. -ReportType can still be used due to a backward-compatible alias
- [SiteShield] - Updated $SiteShieldID variable to $ID, in-line with API definition. -SiteshieldID can still be used due to a backward-compatible alias
- [Cloudlets] - Fixed a bug in New-CloudletPolicy which did not clone existing policy rules
- [Cloudlets] - Fixed a typo which prevented List-CloudletLoadBalancers from appearing
- [Purge] - Deprecated functions removed and section default has been changed from 'ccu' to 'default', in-line with other commands
- [MediaDeliveryReports] - Fixed a bug which prevented Get-AMDDeliveryData from functioning corrected
- [EdgeDiagnostics] - Changed Get-DiagnosticLink to New-DiagnosticLink, in-line with its method
- [Netstorage] - Fixed a bug which did not read credentials correctly from auth file sections other than 'default'
- [MSL] - Fixed missing Path variable in New-MSLOrigin and Set-MSLOrigin
- [GTM] - Fixed path bug in Get-GTMDatacenterLatency

> Note: This is likely to be the last release of version 1 of the AkamaiPowershell module. We are working on a completely overhauled version 2, so all new features will be available there. Any major bugs will still be back-ported to v1
## 1.10.0 - (23/02/2023)

### Adding support for alternate auth options and structural improvements
Expand Down
32 changes: 8 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,34 @@
# Akamai Powershell

This module is designed to abstract the sometimes complex Akamai {OPEN} API commands, and their auth in particular. It can be used in Powershell 5.x or later (6+ is recommended), and there is no reason it won't work on MacOS or Linux, though these are also currently outside the scope of testing. It is in no way complete, but rather is meant to be a collaborative effort to provide Powershell implementation of most (if not all) Akamai APIs. Pull requests are welcome, and encouraged!
This module is designed to abstract the sometimes complex Akamai API commands, and their auth in particular. It can be used in Powershell 5.x or later (6+ is recommended), and has been tested on MacOS and Linux. It is in no way complete, but rather is meant to be a collaborative effort to provide Powershell implementation of most (if not all) Akamai APIs. Pull requests are welcome, and encouraged!

The central function of the module is Invoke-AkamaiRestMethod, which is a heavily modified version of the deprecated Invoke-AkamaiOpen you can find [here](https://github.com/akamai/AkamaiOPEN-edgegrid-powershell).

_Note: NO WARRANTY of any kind is offered, or should be inferred. These APIs are very powerful and this module will do little beyond basic syntax checking and will not prevent you doing unspeakable things to your infrastructure if you instruct it to do so._

### Usage

1. Create and populate your .edgerc file in accordance with Akamai recommendations [here](https://developer.akamai.com/legacy/introduction/Conf_Client.html) though I would recommend skipping the Python script and just writing the .edgerc file manually.
2. Install with command `Install-Module AkamaiPowershell` and accept the prompt
3. Import the module using command `Import-Module AkamaiPowershell`

### Getting Started

The module contains hundreds of functions from 30+ APIs, so there is a lot included. Here are some tips to help you:

- All functions for a given API should contain the same keyword, which you can filter a `Get-Command` command with. For example, all Property API commands contain the word "Property" so you could list the relevant commands by typing `Get-Command *Property* -Module AkamaiPowershell`
- Functions generally use standard Powershell verbs, with a few notable exceptions. Typically the commands break down like this
- `List-` functions list the assets you wish. You can use `List-` or `Get-` interchangeably, so long as the suffix is unchanged (it is generally plural) as each `List-` function has a `Get-` alias
- `Get-` (when singular, e.g. `Get-Property`) will find a single entity of an asset, and typically requires that asset's Name or ID. Name support is included in several APIs so you can issue commands such as `Get-Property -PropertyName MyProperty` without knowing the ID in advance
- If your command requires a version number, `Property`, `Cloudlet` and `AppSec` APIs allow for the word 'latest' for version. e.g. `Get-AppSecConfigurationVersion -ConfigName MyConfig -VersionNumber latest`
- `New-` functions create new assets, or versions. `Remove-` functions delete assets and `Set-` functions perform updates
- Many functions support pipelining. For example you might get the rules for a property with the command `$Rules = Get-PropertyRuleTree -PropertyName MyProperty -PropertyVersion latest`, then update an option on the `$Rules` object. Then when you are ready you can issue `$Rules | Set-PropertyRuleTree -PropertyName MyProperty -PropertyVersion latest`, which you will notice is exactly the same as the `Get-` command, but with only 2 characters changed.
- If you need help with syntax you can use autocomplete or `Get-Help My-Function`. Detailed Help documentation has not yet been included but the `Get-Help` command will list the available options and which ones are required.
- Whether installing the module via `Install-Module` or cloning this repo you will have access to the source code. If you can't figure out how a function works then it should be a simple matter to find the .ps1 file on disk and open it in your IDE. Most functions are very simple and shouldn't require much expertise to diagnose, and each function has its own file so most are quite short.
We have produced an ever-growing set of documentation which should tell you most of what you need to know. You can find it here - https://techdocs.akamai.com/powershell/docs/overview

### Proxy Support

If you wish to use an https proxy with your commands, simply set the _https_proxy_ environment variable to your proxy address (e.g. http://localhost:8888). Once complete set the variable back to $null. Remember that this var might be persistent so could cause odd behaviors if left in place and the proxy disabled.
If you wish to use an https proxy with your commands, simply set the _$env:https_proxy_ environment variable to your proxy address (e.g. http://localhost:8888). Once complete set the variable back to $null. Remember that this variable will presist for the remainder of your session, so could cause odd behaviors if left in place and the proxy disabled.

### Contribution

If you find there are functions missing (and there are many missing) please contribute to the module, following these recommendations
If you find there are functions missing please contribute to the module, following these recommendations

1. All functions must be (where practical) single-use functions, not multi-function scripts. If you wish to write complex scripts, great, but keep this module to just building blocks.
2. All functions take optional parameters for your .edgerc file and the section to read from. The default is always ~/.edgerc, and the default section 'default'. Entering the credential attributes as individual params is currently not supported, and would be a hassle to implement.
2. All functions must contain parameters for EdgeRCFile and Section
3. All functions must support AccountSwitchKey params. This is a feature only used by Partners and Akamai internal users, but keeps the function universally usable.
4. Please use approved Powershell verbs where applicable. The use of List is fine, as are others when the approved verb would be confusing (like deleting or invalidating from cache. 'removing' isn't really a thing)
4. Please use approved Powershell verbs where applicable. We are moving to a 100% approved-verb model in version 2
5. Please arrange functions into folders based on the name of the API as Akamai have stated it (see the existing folder structure for examples)
6. Update functions (POST/PUT) should have a $Body param for the user to specify the JSON body for the request or an -InputFile param to specify body from a file. If you also wish to allow users to specify individual params and construct the request in the function, that is fine, but make sure the JSON body and individual params are in different Parameter Sets to avoid confusion. Check New-PropertyVersion for an example
6. Update functions (POST/PUT) should have a $Body param for the user to specify the JSON body for the request, or an -InputFile param to specify body from a file if appropriate. If you also wish to allow users to specify individual params and construct the request in the function, that is fine, but make sure the JSON body and individual params are in different Parameter Sets to avoid confusion. Check New-PropertyVersion for an example
7. Similarly to 6. include a pipeline option for any New- or Set- functions. This requires begin/process/end code blocks and param options

### Licensing

Copyright 2019 Akamai Technologies
Copyright 2023 Akamai Technologies

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down

0 comments on commit b25e046

Please sign in to comment.