ps/Modules/Alkami.DevOps.Common/Public/Get-SlackAction.ps1

34 lines
705 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Get-SlackAction {
<#
.SYNOPSIS
Used to create interactive elements in messages
.PARAMETER Text
The text to display
.PARAMETER Url
The URL the user will interact with
.PARAMETER Type
Defaults to button
#>
[CmdletBinding()]
[OutputType([object])]
param (
[Parameter(Mandatory = $true)]
[string]$Text,
[Parameter(Mandatory = $true)]
[string]$Url,
[Parameter(Mandatory = $false)]
[ValidateSet('button')] # We only usually offer one option type. Feel free to update when you've got a new use-case
[string]$Type = 'button'
)
return @{
text = $Text
url = $Url
type = $Type
}
}