Redigera

Dela via


Set-AzApiManagementProduct

Sets the API Management product details.

Syntax

Set-AzApiManagementProduct
   -Context <PsApiManagementContext>
   -ProductId <String>
   [-Title <String>]
   [-Description <String>]
   [-LegalTerms <String>]
   [-SubscriptionRequired <Boolean>]
   [-ApprovalRequired <Boolean>]
   [-SubscriptionsLimit <Int32>]
   [-State <PsApiManagementProductState>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzApiManagementProduct cmdlet sets the API Management product details.

Examples

Example 1: Update the product details

$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Set-AzApiManagementProduct -Context $apimContext -ProductId "0123456789" -Title "Starter" -Description "Starter Product" -LegalTerms "Free for all" -SubscriptionRequired $True -State "NotPublished"

This command updates the API Management product details, requires a subscription, and then unpublishes.

Parameters

-ApprovalRequired

Indicates whether the subscription to the product requires approval. The default value is $False.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Context

Specifies an instance of the PsApiManagementContext object.

Type:PsApiManagementContext
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies the product description.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-LegalTerms

Specifies the legal terms of use of the product.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

passthru

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ProductId

Specifies the identifier of the existing product.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-State

Specifies the product state. psdx_paramvalues

  • NotPublished
  • Published
Type:Nullable<T>[PsApiManagementProductState]
Accepted values:NotPublished, Published
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SubscriptionRequired

Indicates whether the product requires a subscription. The default value for this parameter is $True.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SubscriptionsLimit

Specifies the maximum number of simultaneous subscriptions. The default value for this parameter is None.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Title

Specifies the product title this cmdlet sets.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PsApiManagementContext

String

Nullable<T>[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

Nullable<T>[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

Nullable<T>[[Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProductState, Microsoft.Azure.PowerShell.Cmdlets.ApiManagement.ServiceManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

SwitchParameter

Outputs

PsApiManagementProduct