I am trying to set up a custom domain in api management using a bash script. I know it can be done using powershell
# Upload the custom ssl certificate to be applied to Proxy endpoint / Api Gateway endpoint
$proxyCertUploadResult = Import-AzApiManagementHostnameCertificate -Name $apimServiceName -
ResourceGroupName $resourceGroupName -HostnameType "Proxy" -PfxPath $proxyCertificatePath -
PfxPassword $proxyCertificatePassword
# Upload the custom ssl certificate to be applied to Portal endpoint
$portalCertUploadResult = Import-AzApiManagementHostnameCertificate -Name $apimServiceName -
ResourceGroupName $resourceGroupName -HostnameType "Portal" -PfxPath $portalCertificatePath -
PfxPassword $portalCertificatePassword
# Create the HostnameConfiguration object for Portal endpoint
$PortalHostnameConf = New-AzApiManagementHostnameConfiguration -Hostname $proxyHostname -
CertificateThumbprint $proxyCertUploadResult.Thumbprint
# Create the HostnameConfiguration object for Proxy endpoint
$ProxyHostnameConf = New-AzApiManagementHostnameConfiguration -Hostname $portalHostname -
CertificateThumbprint $portalCertUploadResult.Thumbprint
# Apply the configuration to API Management
Set-AzApiManagementHostnames -Name $apimServiceName -ResourceGroupName $resourceGroupName `
-PortalHostnameConfiguration $PortalHostnameConf -ProxyHostnameConfiguration $ProxyHostnameConf
Is it possible to do a similar thing using bash?