Skip to content

Commit

Permalink
module - changing verbose URI reference
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Aug 21, 2021
1 parent f5d5481 commit e7fe007
Show file tree
Hide file tree
Showing 75 changed files with 96 additions and 97 deletions.
20 changes: 10 additions & 10 deletions .vscode/tss.code-snippets
Expand Up @@ -58,8 +58,8 @@
" }",
" \\$invokeParams.Body = (\\$newBody | ConvertTo-Json)",
"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$uri with:`n \\$newBody\"",
" if (-not \\$PSCmdlet.ShouldProcess(\"${12:Reference} \\$${4}\", \"\\$(\\$invokeParams.Method) \\$uri with \\$(\\$invokeParams.Body)\")) { return }",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri) with:`n \\$newBody\"",
" if (-not \\$PSCmdlet.ShouldProcess(\"${12:Reference} \\$${4}\", \"\\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri) with \\$(\\$invokeParams.Body)\")) { return }",
" try {",
" \\$apiResponse = Invoke-TssApi @invokeParams",
" \\$restResponse = . \\$ProcessResponse \\$apiResponse",
Expand Down Expand Up @@ -147,7 +147,7 @@
" }",
" \\$invokeParams.Uri = \\$uri",
"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$uri\"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri)\"",
" try {",
" \\$apiResponse = Invoke-TssApi @invokeParams",
" \\$restResponse = . \\$ProcessResponse \\$apiResponse",
Expand Down Expand Up @@ -226,7 +226,7 @@
" \\$invokeParams.Uri = \\$uri",
" \\$invokeParams.Method = 'GET'",
"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$uri\"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri)\"",
" try {",
" \\$apiResponse = Invoke-TssApi @invokeParams",
" \\$restResponse = . \\$ProcessResponse \\$apiResponse",
Expand Down Expand Up @@ -303,8 +303,8 @@
" \\$invokeParams.Uri = \\$uri",
" \\$invokeParams.Method = 'DELETE'",
"",
" if (-not \\$PSCmdlet.ShouldProcess(${12:Item Description},\"\\$(\\$invokeParams.Method) \\$uri\")) { return }",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$uri with \\$body\"",
" if (-not \\$PSCmdlet.ShouldProcess(${12:Item Description},\"\\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri)\")) { return }",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri) with \\$body\"",
" try {",
" \\$apiResponse = Invoke-TssApi @invokeParams",
" \\$restResponse = . \\$ProcessResponse \\$apiResponse",
Expand Down Expand Up @@ -402,8 +402,8 @@
"",
" \\$invokeParams.Body = \\$setBody | ConvertTo-Json",
"",
" if (\\$PSCmdlet.ShouldProcess(\"${8} ID: \\${12}\", \"\\$(\\$invokeParams.Method) \\$uri with:`n\\$(\\$invokeParams.Body)`n\")) {",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$uri with:`n\\$(\\$invokeParams.Body)`n\"",
" if (\\$PSCmdlet.ShouldProcess(\"${8} ID: \\${12}\", \"\\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri) with:`n\\$(\\$invokeParams.Body)`n\")) {",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri) with:`n\\$(\\$invokeParams.Body)`n\"",
" try {",
" \\$apiResponse = Invoke-TssApi @invokeParams",
" \\$restResponse = . \\$ProcessResponse \\$apiResponse",
Expand Down Expand Up @@ -903,7 +903,7 @@
" \\$invokeParams.Uri = \\$uri",
" \\$invokeParams.Method = 'GET'",
"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$uri\"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri)\"",
" try {",
" \\$apiResponse = Invoke-TssApi @invokeParams",
" \\$restResponse = . \\$ProcessResponse \\$apiResponse",
Expand All @@ -927,7 +927,7 @@
"prefix": "tssrestbasic2",
"body": [
" if (-not \\$PSCmdlet.ShouldProcess(\"${1:reference name} ID: \\$${2:parameter}\", \"\\$(\\$invokeParams.Method) \\$uri\")) { return }",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$uri\"",
" Write-Verbose \"Performing the operation \\$(\\$invokeParams.Method) \\$(\\$invokeParams.Uri)\"",
" try {",
" \\$apiResponse = Invoke-TssApi @invokeParams",
" \\$restResponse = . \\$ProcessResponse \\$apiResponse",
Expand Down
3 changes: 1 addition & 2 deletions src/functions/configurations/Get-TssConfiguration.ps1
Expand Up @@ -43,7 +43,6 @@ function Get-TssConfiguration {
Write-Verbose "Provided command parameters: $(. $GetInvocation $PSCmdlet.MyInvocation)"
if ($tssParams.ContainsKey('TssSession') -and $TssSession.IsValidSession()) {
. $CheckVersion $TssSession '10.9.000032' $PSCmdlet.MyInvocation
$restResponse = $null
$uri = $TssSession.ApiUrl, 'configuration', 'general' -join '/'

$uriParams = @()
Expand All @@ -65,7 +64,7 @@ function Get-TssConfiguration {
$invokeParams.Uri = $uri, $params -join '?'
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/diagnostics/Search-TssSystemLog.ps1
Expand Up @@ -71,7 +71,7 @@ function Search-TssSystemLog {
}
$invokeParams.Uri = $uri

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
Expand Up @@ -70,7 +70,7 @@ function Search-TssDirectoryServiceDomain {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
Expand Up @@ -49,7 +49,7 @@ function Get-TssEventPipelinePolicy {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
Expand Up @@ -61,7 +61,7 @@ function Get-TssEventPipelinePolicyActivity {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
Expand Up @@ -54,8 +54,8 @@ function Remove-TssEventPipeline {
$invokeParams.Uri = $uri
$invokeParams.Method = 'DELETE'

if (-not $PSCmdlet.ShouldProcess($pipeline,"$($invokeParams.Method) $uri")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
if (-not $PSCmdlet.ShouldProcess($pipeline,"$($invokeParams.Method) $($invokeParams.Uri)")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/event-pipeline/Get-TssEventPipeline.ps1
Expand Up @@ -49,7 +49,7 @@ function Get-TssEventPipeline {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/event-pipeline/Get-TssEventPipelineRun.ps1
Expand Up @@ -54,7 +54,7 @@ function Get-TssEventPipelineRun {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/event-pipeline/Search-TssEventPipeline.ps1
Expand Up @@ -91,7 +91,7 @@ function Search-TssEventPipeline {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
Expand Up @@ -59,8 +59,8 @@ function Remove-TssFolderPermission {
$invokeParams.Uri = $uri
$invokeParams.Method = 'DELETE'

if (-not $PSCmdlet.ShouldProcess("FolderPermissionId: $folderPermission", "$($invokeParams.Method) $uri")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
if (-not $PSCmdlet.ShouldProcess("FolderPermissionId: $folderPermission", "$($invokeParams.Method) $($invokeParams.Uri)")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
Expand Up @@ -77,7 +77,7 @@ function Search-TssFolderPermission {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
4 changes: 2 additions & 2 deletions src/functions/folders/Get-TssFolder.ps1
Expand Up @@ -94,7 +94,7 @@ function Get-TssFolder {
$invokeParams.Uri = $Uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand All @@ -118,7 +118,7 @@ function Get-TssFolder {
$invokeParams.Uri = $Uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/folders/Get-TssFolderAudit.ps1
Expand Up @@ -51,7 +51,7 @@ function Get-TssFolderAudit {
$invokeParams.Method = 'GET'


Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/folders/Get-TssFolderState.ps1
Expand Up @@ -63,7 +63,7 @@ function Get-TssFolderState {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/folders/Remove-TssFolder.ps1
Expand Up @@ -51,7 +51,7 @@ function Remove-TssFolder {
$invokeParams.Method = 'DELETE'


if (-not $PSCmdlet.ShouldProcess("FolderId: $folder", "$($invokeParams.Method) $uri")) { return }
if (-not $PSCmdlet.ShouldProcess("FolderId: $folder", "$($invokeParams.Method) $($invokeParams.Uri)")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $uri with $body"
try {
$apiResponse = Invoke-TssApi @invokeParams
Expand Down
2 changes: 1 addition & 1 deletion src/functions/folders/Remove-TssFolderTemplate.ps1
Expand Up @@ -56,7 +56,7 @@ function Remove-TssFolderTemplate {
$invokeParams.Method = 'DELETE'


if (-not $PSCmdlet.ShouldProcess("FolderId: $folder", "$($invokeParams.Method) $uri")) { return }
if (-not $PSCmdlet.ShouldProcess("FolderId: $folder", "$($invokeParams.Method) $($invokeParams.Uri)")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $uri with $body"
try {
$apiResponse = Invoke-TssApi @invokeParams
Expand Down
2 changes: 1 addition & 1 deletion src/functions/folders/Search-TssFolder.ps1
Expand Up @@ -81,7 +81,7 @@ function Search-TssFolder {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/groups/Find-TssGroup.ps1
Expand Up @@ -82,7 +82,7 @@ function Find-TssGroup {
}
$invokeParams.Uri = $uri

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/groups/Get-TssGroupMember.ps1
Expand Up @@ -76,7 +76,7 @@ function Get-TssGroupMember {
}

$invokeParams.Uri = $uri
Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/groups/Get-TssGroupRole.ps1
Expand Up @@ -49,7 +49,7 @@ function Get-TssGroupRole {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
4 changes: 2 additions & 2 deletions src/functions/groups/Remove-TssGroupMember.ps1
Expand Up @@ -53,8 +53,8 @@ function Remove-TssGroupMember {
$invokeParams.Uri = $uri
$invokeParams.Method = 'DELETE'

if (-not $PSCmdlet.ShouldProcess("Group ID: $Id | User ID: $UserId", "$($invokeParams.Method) $uri")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
if (-not $PSCmdlet.ShouldProcess("Group ID: $Id | User ID: $UserId", "$($invokeParams.Method) $($invokeParams.Uri)")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/groups/Search-TssGroup.ps1
Expand Up @@ -76,7 +76,7 @@ function Search-TssGroup {
$invokeParams.Uri = $uri

$invokeParams.Method = 'GET'
Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/metadata/Get-TssMetadataField.ps1
Expand Up @@ -41,7 +41,7 @@ function Get-TssMetadataField {
$invokeParams.Uri = $uri
$invokeParams.Method = 'GET'

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
4 changes: 2 additions & 2 deletions src/functions/metadata/Remove-TssMetadata.ps1
Expand Up @@ -59,8 +59,8 @@ function Remove-TssMetadata {
$invokeParams.Uri = $uri
$invokeParams.Method = 'DELETE'

if (-not $PSCmdlet.ShouldProcess("Metadata Item: $ItemId","$($invokeParams.Method) $uri")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
if (-not $PSCmdlet.ShouldProcess("Metadata Item: $ItemId","$($invokeParams.Method) $($invokeParams.Uri)")) { return }
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/metadata/Search-TssMetadata.ps1
Expand Up @@ -77,7 +77,7 @@ function Search-TssMetadata {
}
$invokeParams.Uri = $uri

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/metadata/Search-TssMetadataHistory.ps1
Expand Up @@ -84,7 +84,7 @@ function Search-TssMetadataHistory {
}
$invokeParams.Uri = $uri

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down
2 changes: 1 addition & 1 deletion src/functions/metadata/Search-TssMetadataSection.ps1
Expand Up @@ -75,7 +75,7 @@ function Search-TssMetadataSection {
}
$invokeParams.Uri = $uri

Write-Verbose "Performing the operation $($invokeParams.Method) $uri"
Write-Verbose "Performing the operation $($invokeParams.Method) $($invokeParams.Uri)"
try {
$apiResponse = Invoke-TssApi @invokeParams
$restResponse = . $ProcessResponse $apiResponse
Expand Down

0 comments on commit e7fe007

Please sign in to comment.