Skip to content

Doesn't work with the new version of the Azure modules #1

@lanatmwan

Description

@lanatmwan

The find command was removed in favor of just using Get-AzResource. Therefore, I believe the code can be simplified to just this:

function Get-AzAPIConnections
{
<#
 .SYNOPSIS
 Get the API connections in the subscription.

 .DESCRIPTION
 Get the set of Logic App Api connections created in your subscription.  Specify the api name to just get the Api connections for that Api.

 .PARAMETER Name
 The name of the Api connection to be retrieved. This parameter supports wildcards at the beginning and/or end of the string.

 .EXAMPLE
 #Get all Api connections in your subscription
 Get-AzAPIConnections

 .EXAMPLE
 #Get all Api connections for the dropbox api in your subscription
 Get-AzAPIConnections dropbox

 .NOTES
 Updated from original to work with new versions of Azure Powershell modules
 https://github.com/logicappsio/List-APIConnections/blob/master/List-ApiConnections.ps1 
#>

    param
    (
        [parameter(ValueFromPipeline)]
        [ValidateNotNullOrEmpty()]
        [string]
        $Name
    )

    process
    {
        Get-AzResource -ResourceType 'microsoft.web/connections' @PsBoundParameters
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions