편집

다음을 통해 공유


Get-AzApiManagementApiSchema

Get the details of the API Schema

Syntax

Get-AzApiManagementApiSchema
   -Context <PsApiManagementContext>
   -ApiId <String>
   [-SchemaId <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzApiManagementApiSchema
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzApiManagementApiSchema cmdlet gets the details of the API Schema

Examples

Example 1: Get the details of all the Api Schema of an Api

$context = New-AzApiManagementContext -ResourceId /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
Get-AzApiManagementApiSchema -Context $context -ApiId wsdlapitest

SchemaId           : 2a03e1b4-1826-4e59-b372-4711f575db28
Api Id             : wsdlapitest
Schema ContentType : xsdschema
Schema Document    : <s:schema elementFormDefault="qualified"....

SchemaId           : b6e5497d-f65a-4851-9f5b-b5684cdae688
Api Id             : wsdlapitest
Schema ContentType : xsdschema
Schema Document    : <?xml version=""1.0"" encoding=""UTF-8""....

This command gets all the API schemas associated with an Api swagger-petstore-extensive for particular ApiManagement Context.

Example 2: Get the specific schema associated with an Api

$context = New-AzApiManagementContext -ResourceId /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
Get-AzApiManagementApiSchema -Context $context -ApiId swagger-petstore-extensive -SchemaId 5cc9cf67e6ed3b1154e638bd

SchemaId           : 5cc9cf67e6ed3b1154e638bd
Api Id             : swagger-petstore-extensive
Schema ContentType : swaggerdefinition
Schema Document    : {
                       "definitions": {
                         "pet": {
                        ....

This command gets the API schema 5cc9cf67e6ed3b1154e638bd associated with an Api swagger-petstore-extensive for particular ApiManagement Context.

Parameters

-ApiId

API identifier to look for. If specified will try to get the API by the Id.

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

-Context

Instance of PsApiManagementContext. This parameter is required.

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

-ResourceId

Arm Resource Identifier of a Api Schema. If specified will try to find api schema by the identifier. This parameter is required.

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

-SchemaId

The identifier of the Schema.

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

Inputs

PsApiManagementContext

String

Outputs

PsApiManagementApiSchema