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

35 lines
824 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Get-SlackAttachmentFields {
<#
.SYNOPSIS
Used to create a Field object for the Slack Attachment that attaches to the Slack Message.
.PARAMETER Title
Shown as a bold heading displayed in the field object.
.PARAMETER Value
The text value displayed in the field object.
.PARAMETER Short
Indicates whether the field object is short enough to be displayed side-by-side with other field objects. Defaults to false.
#>
[CmdletBinding()]
[OutputType([object])]
param (
[Parameter(Mandatory = $false)]
[string]$Title = "",
[Parameter(Mandatory = $false)]
[string]$Value = "",
[Parameter(Mandatory = $false)]
[switch]$Short
)
$result = @{
title = $Title
value = $Value
short = $Short
}
return $result
}