Get-AzApiManagementGroup
Gets all or specific API management groups.
Syntax
GetAllGroups (Default)
Get-AzApiManagementGroup
-Context <PsApiManagementContext>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByGroupId
Get-AzApiManagementGroup
-Context <PsApiManagementContext>
[-GroupId <String>]
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByUserId
Get-AzApiManagementGroup
-Context <PsApiManagementContext>
[-Name <String>]
[-UserId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
GetByProductId
Get-AzApiManagementGroup
-Context <PsApiManagementContext>
[-Name <String>]
[-ProductId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzApiManagementGroup cmdlet gets all or specific API management groups.
Examples
Example 1: Get all groups
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementGroup -Context $apimContext
This command gets all groups.
Example 2: Get a group by ID
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementGroup -Context $apimContext -GroupId "0123456789"
This command gets the group ID named 0123456789.
Example 3: Get a group by name
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementGroup -Context $apimContext -Name "Group0002"
This command gets the group named Group0002.
Example 4: Get all user groups
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Get-AzApiManagementGroup -Context $apimContext -UserId "0123456789"
This command gets all user groups with the user ID named 0123456789.
Parameters
-Context
Specifies an instance of PsApiManagementContext.
Parameter properties
| Type: | PsApiManagementContext |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-GroupId
Specifies the group ID. If specified, the cmdlet attempts to find the group by the identifier.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
GetByGroupId
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-Name
Specifies the name of the management group.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-ProductId
Identifier of existing product. If specified will return all groups the product assigned to. This parameter is optional.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
GetByProductId
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-UserId
Specifies the identifier of existing product. If specified the cmdlet will return all groups the product assigned to.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
GetByUserId
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.