Set-AzApiManagementApiSchema

Modifies an API Schema

Syntax

Set-AzApiManagementApiSchema
   -Context <PsApiManagementContext>
   -ApiId <String>
   -SchemaId <String>
   [-SchemaDocumentContentType <String>]
   [-SchemaDocument <String>]
   [-SchemaDocumentFilePath <String>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzApiManagementApiSchema
   -InputObject <PsApiManagementApiSchema>
   [-SchemaDocumentContentType <String>]
   [-SchemaDocument <String>]
   [-SchemaDocumentFilePath <String>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzApiManagementApiSchema
   -ResourceId <String>
   [-SchemaDocumentContentType <String>]
   [-SchemaDocument <String>]
   [-SchemaDocumentFilePath <String>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzApiManagementApiSchema cmdlet modifies an Azure API Management API Schema.

Examples

Example 1: Modifies an API Schema

PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>Set-AzApiManagementApiSchema -Context $ApiMgmtContext -ApiId "echo-api" -SchemaId "2"

The example updates the Api Schema

Example 2

Modifies an API Schema. (autogenerated)

 
Set-AzApiManagementApiSchema -ApiId 'echo-api' -Context  -SchemaDocumentContentType swaggerdefinition -SchemaDocumentFilePath C:\Users\sasolank\Downloads\petstoreschema.json -SchemaId '2'

Parameters

-ApiId

Identifier of existing API. This parameter is required.

Type:String
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-Context

Instance of PsApiManagementContext. This parameter is required.

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

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Instance of PsApiManagementApiSchema. This parameter is required.

Type:Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-PassThru

If specified then instance of Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApi type representing the set API.

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

Arm ResourceId of Diagnostic or Api Schema. This parameter is required.

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

Api schema document as a string. This parameter is required is -SchemaDocumentFile is not specified.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SchemaDocumentContentType

ContentType of the api Schema. This parameter is optional.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SchemaDocumentFilePath

Api schema document file path. This parameter is required is -SchemaDocument is not specified.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SchemaId

Identifier of existing Schema. This parameter is required.

Type:String
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PsApiManagementContext

String

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementApiSchema

SwitchParameter

Outputs

PsApiManagementApi