< Back
Set-AzureRmApiManagementSubscription
Post
NAME Set-AzureRmApiManagementSubscription
SYNOPSIS
Sets existing subscription details.
SYNTAX
Set-AzureRmApiManagementSubscription -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-ExpiresOn <DateTime>] [-Name
<String>] [-PassThru] [-PrimaryKey <String>] [-SecondaryKey <String>] [-State {Suspended | Active | Expired | Submitted | Rejected | Cancelled}]
[-StateComment <String>] -SubscriptionId <String> [<CommonParameters>]
DESCRIPTION
The Set-AzureRmApiManagementSubscription cmdlet sets existing subscription details.
PARAMETERS
-Context <PsApiManagementContext>
Specifies a PsApiManagementContext object.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExpiresOn <DateTime>
Specifies a subscription expiration date. The default value of this parameter is $Null.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies a subscription name.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
passthru
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PrimaryKey <String>
Specifies the subscription primary key. This parameter is generated automatically if not specified. This parameter must be 1 to 300 characters
long.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SecondaryKey <String>
Specifies the subscription secondary key. This parameter is generated automatically if not specified. This parameter must be 1 to 300
characters long.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-State <PsApiManagementSubscriptionState>
Specifies the subscription state. The default value of this parameter is $Null.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-StateComment <String>
Specifies the subscription state comment. The default value of this parameter is $Null.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SubscriptionId <String>
Specifies the subscription ID.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscripition
NOTES
Example 1: Set the state and primary and secondary keys for a subscription
PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\\>Set-AzureRmApiManagementSubscription -Context $apimContext -SubscriptionId -0123456789 -PrimaryKey "80450f7d0b6d481382113073f67822c1"
-SecondaryKey "97d6112c3a8f48d5bf0266b7a09a761c" -State "Active"
This command sets the primary and secondary keys for a subscription and activates it.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... bscription
Get-AzureRmApiManagementSubscription
New-AzureRmApiManagementSubscription
Remove-AzureRmApiManagementSubscription
SYNOPSIS
Sets existing subscription details.
SYNTAX
Set-AzureRmApiManagementSubscription -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-ExpiresOn <DateTime>] [-Name
<String>] [-PassThru] [-PrimaryKey <String>] [-SecondaryKey <String>] [-State {Suspended | Active | Expired | Submitted | Rejected | Cancelled}]
[-StateComment <String>] -SubscriptionId <String> [<CommonParameters>]
DESCRIPTION
The Set-AzureRmApiManagementSubscription cmdlet sets existing subscription details.
PARAMETERS
-Context <PsApiManagementContext>
Specifies a PsApiManagementContext object.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExpiresOn <DateTime>
Specifies a subscription expiration date. The default value of this parameter is $Null.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies a subscription name.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
passthru
Required? false
Position? named
Default value False
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PrimaryKey <String>
Specifies the subscription primary key. This parameter is generated automatically if not specified. This parameter must be 1 to 300 characters
long.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SecondaryKey <String>
Specifies the subscription secondary key. This parameter is generated automatically if not specified. This parameter must be 1 to 300
characters long.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-State <PsApiManagementSubscriptionState>
Specifies the subscription state. The default value of this parameter is $Null.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-StateComment <String>
Specifies the subscription state comment. The default value of this parameter is $Null.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-SubscriptionId <String>
Specifies the subscription ID.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementSubscripition
NOTES
Example 1: Set the state and primary and secondary keys for a subscription
PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\\>Set-AzureRmApiManagementSubscription -Context $apimContext -SubscriptionId -0123456789 -PrimaryKey "80450f7d0b6d481382113073f67822c1"
-SecondaryKey "97d6112c3a8f48d5bf0266b7a09a761c" -State "Active"
This command sets the primary and secondary keys for a subscription and activates it.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... bscription
Get-AzureRmApiManagementSubscription
New-AzureRmApiManagementSubscription
Remove-AzureRmApiManagementSubscription