Skip to content

Commit c7f9a8a

Browse files
aladdindockceiw
andauthored
Add new examples to ApiManagement, DevTestLabs, EventHub, LogicApp, ServiceBus (#12064)
- Add new examples to the following modules: ApiManagement DevTestLabs EventHub LogicApp ServiceBus Co-authored-by: Maoliang Huang <[email protected]>
1 parent e54c41a commit c7f9a8a

File tree

70 files changed

+470
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+470
-182
lines changed

src/ApiManagement/ApiManagement/help/Get-AzApiManagementApiSchema.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The **Get-AzApiManagementApiSchema** cmdlet gets the details of the API Schema
2929

3030
## EXAMPLES
3131

32-
### Example 1 : Get the details of all the Api Schema of an Api
32+
### Example 1: Get the details of all the Api Schema of an Api
3333
```powershell
3434
PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceId /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
3535
PS D:\github\azure-powershell> Get-AzApiManagementApiSchema -Context $context -ApiId wsdlapitest
@@ -47,7 +47,7 @@ Schema Document : <?xml version=""1.0"" encoding=""UTF-8""....
4747

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

50-
### Example 2 : Get the specific schema associated with an Api
50+
### Example 2: Get the specific schema associated with an Api
5151
```powershell
5252
PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceId /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
5353
PS D:\github\azure-powershell> Get-AzApiManagementApiSchema -Context $context -ApiId swagger-petstore-extensive -SchemaId 5cc9cf67e6ed3b1154e638bd

src/ApiManagement/ApiManagement/help/Get-AzApiManagementApiVersionSet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The **Get-AzApiManagementApiVersionSet** cmdlet gets the details of the API Vers
3131

3232
### Example 1
3333

34-
### Example 1: Get all API Version Sets
34+
### Example 2: Get all API Version Sets
3535
```powershell
3636
PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
3737
PS C:\>Get-AzApiManagementApiVersionSet -Context $ApiMgmtContext
@@ -70,7 +70,7 @@ ServiceName : contoso
7070

7171
This command gets all of the API Version sets for the specified context.
7272

73-
### Example 2: Get a API Version Set by ID
73+
### Example 3: Get a API Version Set by ID
7474
```powershell
7575
PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
7676
PS C:\>Get-AzApiManagementApiVersionSet -Context $ApiMgmtContext -ApiVersionSetId $ApiVersionSetId

src/ApiManagement/ApiManagement/help/Get-AzApiManagementIdentityProviderClientSecret.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Get the identity provider client secret.
2222

2323
## EXAMPLES
2424

25-
### Example 2: Get the client secret of AAD Type Identity Provider
26-
```
25+
### Example 1: Get the client secret of AAD Type Identity Provider
26+
```powershell
2727
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
2828
PS C:\> Get-AzApiManagementIdentityProviderClientSecret -Context $apimContext -Type Aad
2929
```

src/ApiManagement/ApiManagement/help/Get-AzApiManagementSubscription.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,39 +56,39 @@ Keys will not be included into result details. To get keys, use **Get-AzApiManag
5656
## EXAMPLES
5757

5858
### Example 1: Get all subscriptions
59-
```
59+
```powershell
6060
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-East-US" -ServiceName "contoso"
6161
PS C:\>Get-AzApiManagementSubscription -Context $apimContext
6262
```
6363

6464
This command gets all subscriptions.
6565

6666
### Example 2: Get a subscription with a specified ID
67-
```
67+
```powershell
6868
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-East-US" -ServiceName "contoso"
6969
PS C:\>Get-AzApiManagementSubscription -Context $apimContext -SubscriptionId "0123456789"
7070
```
7171

7272
This command gets a subscription by ID.
7373

7474
### Example 3: Get all subscriptions for a user
75-
```
75+
```powershell
7676
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-East-US" -ServiceName "contoso"
7777
PS C:\>Get-AzApiManagementSubscription -Context $apimContext -UserId "777"
7878
```
7979

8080
This command gets a user's subscriptions.
8181

8282
### Example 4: Get all subscriptions for a product
83-
```
83+
```powershell
8484
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-East-US" -ServiceName "contoso"
8585
PS C:\>Get-AzApiManagementSubscription -Context $apimContext -ProductId "999"
8686
```
8787

8888
This command gets all subscriptions for the product.
8989

9090
### Example 5: Get all subscriptions for a Scope
91-
```
91+
```powershell
9292
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-East-US" -ServiceName "contoso"
9393
PS C:\>Get-AzApiManagementSubscription -Context $apimContext -Scope "/apis"
9494
@@ -115,8 +115,8 @@ ServiceName : contoso
115115

116116
This command gets all subscriptions which are configured for global api scope
117117

118-
### Example 5: Get all subscriptions for a product and user scope
119-
```
118+
### Example 6: Get all subscriptions for a product and user scope
119+
```powershell
120120
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-East-US" -ServiceName "contoso"
121121
PS C:\>Get-AzApiManagementSubscription -Context $apimContext -ProductId 59b872f28a82740f547e6270 -UserId 1
122122

src/ApiManagement/ApiManagement/help/Get-AzApiManagementUser.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,39 @@ The **Get-AzApiManagementUser** cmdlet gets a specified user, or all users, if n
3838
## EXAMPLES
3939

4040
### Example 1: Get all users
41-
```
41+
```powershell
4242
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
4343
PS C:\>Get-AzApiManagementUser -Context $apimContext
4444
```
4545

4646
This command gets all users.
4747

4848
### Example 2: Get a user by ID
49-
```
49+
```powershell
5050
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
5151
PS C:\>Get-AzApiManagementUser -Context $apimContext -UserId "0123456789"
5252
```
5353

5454
This command gets a user by ID.
5555

56-
### Example: Get users by last name
57-
```
56+
### Example 3: Get users by last name
57+
```powershell
5858
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
5959
PS C:\>Get-AzApiManagementUser -Context $apimContext -LastName "Fuller"
6060
```
6161

6262
This command gets users that have a specified last name, Fuller.
6363

6464
### Example 4: Get a user by email address
65-
```
65+
```powershell
6666
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
6767
PS C:\>Get-AzApiManagementUser -Context $apimContext -Email "[email protected]"
6868
```
6969

7070
This command gets the user that has the specified email address.
7171

7272
### Example 5: Get all users within a group
73-
```
73+
```powershell
7474
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
7575
PS C:\>Get-AzApiManagementUser -Context $apimContext -GroupId "0001"
7676
```

src/ApiManagement/ApiManagement/help/Import-AzApiManagementApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ The **Import-AzApiManagementApi** cmdlet imports an Azure API Management API fro
3636

3737
## EXAMPLES
3838

39-
### Example 1 Import an API from a WADL file
39+
### Example 1: Import an API from a WADL file
4040
```powershell
4141
PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
4242
PS C:\>Import-AzApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Wadl" -SpecificationPath "C:\contoso\specifications\echoapi.wadl" -Path "apis"
4343
```
4444

4545
This command imports an API from the specified WADL file.
4646

47-
### Example 2 Import an API from a Swagger file
47+
### Example 2: Import an API from a Swagger file
4848
```powershell
4949
PS C:\>$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
5050
PS C:\>Import-AzApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Swagger" -SpecificationPath "C:\contoso\specifications\echoapi.swagger" -Path "apis"

src/ApiManagement/ApiManagement/help/New-AzApiManagementApi.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PS C:\>New-AzApiManagementApi -Context $ApiMgmtContext -Name "Echo api" -Service
3636

3737
This command creates an API named EchoApi with the specified URL.
3838

39-
### Example 1: Create an API by copying all operation, Tags, Products and Policies from echo-api and into an ApiVersionSet
39+
### Example 2: Create an API by copying all operation, Tags, Products and Policies from echo-api and into an ApiVersionSet
4040
```powershell
4141
PS D:\github\azure-powershell>$context = New-AzApiManagementContext -ResourceId /subscriptions/subid/resourceGroups/Api-Default-West-US/providers/Microsoft.ApiManagement/service/contoso
4242
PS D:\github\azure-powershell>$versionSet = Get-AzApiManagementApiVersionSet -Context $context -ApiVersionSetId "xmsVersionSet"
@@ -71,6 +71,14 @@ ServiceName : contoso
7171

7272
This command creates an API `echoapiv3` in ApiVersionSet `xmsVersionSet` and copies all operation, Tags and Policies from source Api `echo-api`. It overrides the SubscriptionRequired, ServiceUrl, Path, Protocols
7373

74+
### Example 3
75+
76+
Creates an API. (autogenerated)
77+
78+
```powershell <!-- Aladdin Generated Example -->
79+
New-AzApiManagementApi -ApiId '0001' -Context <PsApiManagementContext> -Name 'Echo api' -Path 'echov3' -Protocols Http -ServiceUrl 'https://contoso.com/apis/echo'
80+
```
81+
7482
## PARAMETERS
7583

7684
### -ApiId

src/ApiManagement/ApiManagement/help/New-AzApiManagementApiSchema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Creates the new API Schema of the API.
3131

3232
## EXAMPLES
3333

34-
### Example 1 : Create new Schema for Swagger Petstore Extensive API
34+
### Example 1: Create new Schema for Swagger Petstore Extensive API
3535
```powershell
3636
PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceId /subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ApiManagement/service/sdktestapim4163
3737
PS D:\github\azure-powershell> New-AzApiManagementApiSchema -Context $context -ApiId swagger-petstore-extensive -SchemaDocumentContentType swaggerdefinition -SchemaDocumentFilePath C:\Users\sasolank\Downloads\petstoreschema.json

src/ApiManagement/ApiManagement/help/New-AzApiManagementAuthorizationServer.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ PS C:\>New-AzApiManagementAuthorizationServer -Context $ApiMgmtContext -Name "Co
3838

3939
This command creates an authorization server.
4040

41+
### Example 2
42+
43+
Creates an authorization server. (autogenerated)
44+
45+
```powershell <!-- Aladdin Generated Example -->
46+
New-AzApiManagementAuthorizationServer -AccessTokenSendingMethods AuthorizationHeader -AuthorizationEndpointUrl 'https://contoso/auth' -AuthorizationRequestMethods Get -ClientAuthenticationMethods Basic -ClientId 'clientid' -ClientRegistrationPageUrl 'https://contoso/signup' -ClientSecret '0000000000000000000000000000000000000' -Context <PsApiManagementContext> -GrantTypes AuthorizationCode -Name 'Contoso OAuth2 server' -ServerId '0123456789' -TokenBodyParameters @{'par1'='val1'} -TokenEndpointUrl 'https://contoso/token'
47+
```
48+
4149
## PARAMETERS
4250

4351
### -AccessTokenSendingMethods

src/ApiManagement/ApiManagement/help/New-AzApiManagementBackend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Creates a new backend entity in Api Management.
2626

2727
## EXAMPLES
2828

29-
### Create Backend 123 with a Basic Authorization Scheme
29+
### Example 1: Create Backend 123 with a Basic Authorization Scheme
3030
```powershell
3131
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
3232
PS C:\>$credential = New-AzApiManagementBackendCredential -AuthorizationHeaderScheme basic -AuthorizationHeaderParameter opensesame -Query @{"sv" = @('xx', 'bb'); "sr" = @('cc')} -Header @{"x-my-1" = @('val1', 'val2')}

src/ApiManagement/ApiManagement/help/New-AzApiManagementBackendCredential.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Creates a new Backend Credential contract.
2323

2424
## EXAMPLES
2525

26-
### Create a Backend Credentials In-Memory Object
26+
### Example 1: Create a Backend Credentials In-Memory Object
2727
```powershell
2828
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
2929
PS C:\>$credential = New-AzApiManagementBackendCredential -AuthorizationHeaderScheme basic -AuthorizationHeaderParameter opensesame -Query @{"sv" = @('xx', 'bb'); "sr" = @('cc')} -Header @{"x-my-1" = @('val1', 'val2')}

src/ApiManagement/ApiManagement/help/New-AzApiManagementBackendProxy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Creates a new Backend Proxy Object which can be piped when creating a new Backen
2222

2323
## EXAMPLES
2424

25-
### Create a Backend Proxy In-Memory Object
25+
### Example 1: Create a Backend Proxy In-Memory Object
2626
```powershell
2727
PS C:\>$secpassword = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
2828
PS C:\>$proxyCreds = New-Object System.Management.Automation.PSCredential ("foo", $secpassword)

src/ApiManagement/ApiManagement/help/New-AzApiManagementCertificate.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ PS C:\>New-AzApiManagementCertificate -Context $ApiMgmtContext -PfxFilePath "C:\
3838

3939
This command uploads a certificate to Api Management. This certificate can be used for mutual authentication with backend using policies.
4040

41+
### Example 2
42+
43+
Creates an API Management certificate to be used during Authentication with Backend. (autogenerated)
44+
45+
```powershell <!-- Aladdin Generated Example -->
46+
New-AzApiManagementCertificate -CertificateId '0123456789' -Context <PsApiManagementContext> -PfxFilePath 'C:\contoso\certificates\apimanagement.pfx' -PfxPassword '1111'
47+
```
48+
4149
## PARAMETERS
4250

4351
### -CertificateId

src/ApiManagement/ApiManagement/help/New-AzApiManagementDiagnostic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The cmdlet **New-AzApiManagementDiagnostic** creates a diagnostic entity either
2525

2626
## EXAMPLES
2727

28-
### Example 1 : Create a new Global scope Diagnostic
28+
### Example 1: Create a new Global scope Diagnostic
2929
```powershell
3030
PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
3131
PS D:\github\azure-powershell> $logger = Get-AzApiManagementLogger -Context $context -LoggerId "backendapisachinc"

src/ApiManagement/ApiManagement/help/New-AzApiManagementGroup.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,21 @@ The **New-AzApiManagementGroup** cmdlet creates an API management group.
2525
## EXAMPLES
2626

2727
### Example 1: Create a management group
28-
```
28+
```powershell
2929
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
3030
PS C:\>New-AzApiManagementGroup -Context $apimContext -Name "Group0001"
3131
```
3232

3333
This command creates a management group.
3434

35+
### Example 2
36+
37+
Creates an API management group. (autogenerated)
38+
39+
```powershell <!-- Aladdin Generated Example -->
40+
New-AzApiManagementGroup -Context <PsApiManagementContext> -Description 'Create Echo Api V4' -GroupId '0001' -Name 'Group0001' -Type Custom
41+
```
42+
3543
## PARAMETERS
3644

3745
### -Context

src/ApiManagement/ApiManagement/help/New-AzApiManagementHttpMessageDiagnostic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The cmdlet **New-AzApiManagementHttpMessageDiagnostic** creates the Http Message
2222

2323
## EXAMPLES
2424

25-
### Example 1 : Create a Basic Http Message diagnostic Setting
25+
### Example 1: Create a Basic Http Message diagnostic Setting
2626
```powershell
2727
PS C:\> New-AzApiManagementHttpMessageDiagnostic -Headers 'Content-Type', 'UserAgent' -BodyBytes 100
2828

src/ApiManagement/ApiManagement/help/New-AzApiManagementLogger.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ PS C:\>New-AzApiManagementLogger -Context $apimContext -LoggerId "Logger123" -Na
3939

4040
This command creates a logger named ContosoSdkEventHub by using the specified connection string.
4141

42+
### Example 2
43+
44+
Creates an API Management Logger. (autogenerated)
45+
46+
```powershell <!-- Aladdin Generated Example -->
47+
New-AzApiManagementLogger -Context <PsApiManagementContext> -InstrumentationKey <String> -LoggerId 'Logger123'
48+
```
49+
4250
## PARAMETERS
4351

4452
### -ConnectionString

src/ApiManagement/ApiManagement/help/New-AzApiManagementOpenIdConnectProvider.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,21 @@ The **New-AzApiManagementOpenIdConnectProvider** cmdlet creates an OpenID Connec
2525
## EXAMPLES
2626

2727
### Example 1: Create a provider
28-
```
28+
```powershell
2929
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
3030
PS C:\>New-AzApiManagementOpenIdConnectProvider -Context $apimContext -OpenIdConnectProviderId "OICProvider01" -Name "Contoso OpenID Connect Provider" -MetadataEndpointUri "https://openid.provider/configuration" -ClientId "12432143" -Description "OpenID Connect provider description"
3131
```
3232

3333
This command creates an OpenID Connect **Provider** named Contoso OpenID Connect Provider
3434

35+
### Example 2
36+
37+
Creates an OpenID Connect provider. (autogenerated)
38+
39+
```powershell <!-- Aladdin Generated Example -->
40+
New-AzApiManagementOpenIdConnectProvider -ClientId '12432143' -ClientSecret '000000000000000000000000000000000000000000' -Context <PsApiManagementContext> -Description 'OpenID Connect provider description' -MetadataEndpointUri 'https://openid.provider/configuration' -Name 'Contoso OpenID Connect Provider' -OpenIdConnectProviderId 'OICProvider01'
41+
```
42+
3543
## PARAMETERS
3644

3745
### -ClientId

src/ApiManagement/ApiManagement/help/New-AzApiManagementSamplingSetting.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The cmdlet **New-AzApiManagementSamplingSetting** creates a new sampling setting
2222

2323
## EXAMPLES
2424

25-
### Example 1 : Create a basic Sampling setting
25+
### Example 1: Create a basic Sampling setting
2626
```powershell
2727
PS C:\> New-AzApiManagementSamplingSetting -SamplingType fixed -Percentage 100
2828
@@ -33,6 +33,14 @@ fixed 100
3333

3434
Creates a sampling setting of `Fixed` type with logging for 100% of the requests / responses
3535

36+
### Example 2
37+
38+
Create a new sampling setting for the Diagnostic. (autogenerated)
39+
40+
```powershell <!-- Aladdin Generated Example -->
41+
New-AzApiManagementSamplingSetting -SamplingPercentage 100 -SamplingType fixed
42+
```
43+
3644
## PARAMETERS
3745

3846
### -DefaultProfile

src/ApiManagement/ApiManagement/help/New-AzApiManagementSslSetting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This command is to be used with New-AzApiManagement command.
2424

2525
## EXAMPLES
2626

27-
### Example 1 : Create an SSL Setting to enable TLS 1.0 on both Backend and Frontend
27+
### Example 1: Create an SSL Setting to enable TLS 1.0 on both Backend and Frontend
2828
```powershell
2929
PS D:\github\azure-powershell\artifacts\Debug\Az.ApiManagement> $enableTls=@{"Tls10" = "True"}
3030
PS D:\github\azure-powershell\artifacts\Debug\Az.ApiManagement> New-AzApiManagementSslSetting -FrontendProtocol $enableTls -BackendProtocol $enableTls

src/ApiManagement/ApiManagement/help/New-AzApiManagementUserToken.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The cmdlet **New-AzApiManagementUserToken** generates a Shared Access Token for
2323

2424
## EXAMPLES
2525

26-
### Example 1 : Generate a Shared Access Token for Git User
26+
### Example 1: Generate a Shared Access Token for Git User
2727
```powershell
2828
PS D:\github\azure-powershell> $context = New-AzApiManagementContext -ResourceGroupName powershelltest -ServiceName
2929
powershellsdkservice
@@ -37,6 +37,14 @@ integration 5/3/2019 2:02:34 PM Primary integration&201905031402&zOwopJChWAA6oaq
3737

3838
This script get the Git user configured in ApiManagement service and generates a Shared Access Token using the Primary Key valid for 8 hours.
3939

40+
### Example 2
41+
42+
Generates a Shared Access Token for the User. (autogenerated)
43+
44+
```powershell <!-- Aladdin Generated Example -->
45+
New-AzApiManagementUserToken -Context <PsApiManagementContext> -Expiry <DateTime> -UserId <String>
46+
```
47+
4048
## PARAMETERS
4149

4250
### -Context

0 commit comments

Comments
 (0)