Skip to content

Split Az.Purview Examples in generation #17294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ Add the administrator for root collection associated with this account.

### Example 1: Add the administrator for root collection
```powershell
PS C:\> Add-AzPurviewAccountRootCollectionAdmin -AccountName test-pa -ResourceGroupName test-rg -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0

Add-AzPurviewAccountRootCollectionAdmin -AccountName test-pa -ResourceGroupName test-rg -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0
```

Add the administrator for root collection associated with the account named 'test-pa'.

### Example 2: Add the administrator for root collection by InputObject
```powershell
PS C:\> $got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Add-AzPurviewAccountRootCollectionAdmin -InputObject $got -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0
$got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Add-AzPurviewAccountRootCollectionAdmin -InputObject $got -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0
```

Add the administrator for root collection associated with the account named 'test-pa' by InputObject.
Expand Down
19 changes: 13 additions & 6 deletions src/Purview/Purview.Autorest/docs/Get-AzPurviewAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ Get an account

### Example 1: List All Purview Accounts
```powershell
PS C:\> Get-AzPurviewAccount
Get-AzPurviewAccount
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- --------
xxxxxxxx-a087-43aa-8a7f-c17a4bbd4d36 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus pvac 8/4/2021 8:34:28 AM [email protected] User
Expand All @@ -55,8 +57,10 @@ List all purview accounts.

### Example 2: Get Purview Account by Resource Group Name and Name
```powershell
PS C:\> Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- ----------------------- -----------------
xxxxxxxx-7956-4978-87e8-9ddd82cfe2b7 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 6:18:57 AM [email protected] User 8/17/2021 6:18:5…
Expand All @@ -66,8 +70,10 @@ Get the purview account name test-rg in resource group test-pa

### Example 3: List Purview Accounts in a Specified Resource Group
```powershell
PS C:\> Get-AzPurviewAccount -ResourceGroupName test-rg
Get-AzPurviewAccount -ResourceGroupName test-rg
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- ----------------------- -----------------
xxxxxxxx-7956-4978-87e8-9ddd82cfe2b7 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 6:18:57 AM [email protected] User 8/17/2021 6:18:5…
Expand All @@ -77,10 +83,11 @@ List the purview accounts in resource group test-pa

### Example 4: Get Purview Account by InputObject
```powershell
PS C:\> $got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Get-AzADDomainService -InputObject $got

$got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Get-AzADDomainService -InputObject $got
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- ----------------------- -----------------
xxxxxxxx-7956-4978-87e8-9ddd82cfe2b7 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 6:18:57 AM [email protected] User 8/17/2021 6:18:5…
Expand Down
4 changes: 3 additions & 1 deletion src/Purview/Purview.Autorest/docs/Get-AzPurviewAccountKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ List the authorization keys associated with this account.

### Example 1: List the authorization keys associated with a specified account.
```powershell
PS C:\> Get-AzPurviewAccountKey -AccountName test-pa -ResourceGroupName test-rg
Get-AzPurviewAccountKey -AccountName test-pa -ResourceGroupName test-rg
```

```output
AtlasKafkaPrimaryEndpoint
-------------------------
Endpoint=sb://atlas-xxxxxxxx-5348-4811-a336-759242a25d37.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAcces…
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ Get the default account for the scope.

### Example 1: Get the default account for the scope Tenant.
```powershell
PS C:\> Get-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
Get-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
```

```output
AccountName ResourceGroupName Scope ScopeTenantId ScopeType SubscriptionId
----------- ----------------- ----- ------------- --------- --------------
test-pa test-rg xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a Tenant xxxxxxxx-1bf0-4dda-aec3
Expand Down
4 changes: 3 additions & 1 deletion src/Purview/Purview.Autorest/docs/New-AzPurviewAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ Creates or updates an account

### Example 1: Create a purview account
```powershell
PS C:\> New-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Location eastus -IdentityType SystemAssigned -SkuCapacity 4 -SkuName Standard
New-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Location eastus -IdentityType SystemAssigned -SkuCapacity 4 -SkuName Standard
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy
------------------- ---------------- ------------ -------- ---- ------------------- -----------
xxxxxxxx-9e08-4873-8b0d-1442be9e5b14 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 7:47:10 AM xxx.xxx…
Expand Down
8 changes: 3 additions & 5 deletions src/Purview/Purview.Autorest/docs/Remove-AzPurviewAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ Deletes an account resource

### Example 1: Delete a purview account
```powershell
PS C:\> Remove-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg

Remove-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
```

Delete a purview account named 'test-pa'

### Example 2: Delete a purview account by InputObject
```powershell
PS C:\> $get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Remove-AzPurviewAccount -InputObject $get

$get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Remove-AzPurviewAccount -InputObject $get
```

Delete a purview account named 'test-pa' by InputObject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Removes the default account from the scope.

### Example 1: Removes the default account from the scope
```powershell
PS C:\> Remove-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
Remove-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
```

Removes the default account from the scope Tenant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ Sets the default account for the scope.

### Example 1: Sets the default account for the scope.
```powershell
PS C:\> Set-AzPurviewDefaultAccount -AccountName test-pa -ResourceGroupName test-rg -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a
Set-AzPurviewDefaultAccount -AccountName test-pa -ResourceGroupName test-rg -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a
```

```output
AccountName ResourceGroupName Scope ScopeTenantId ScopeType SubscriptionId
----------- ----------------- ----- ------------- --------- --------------
test-pa test-rg xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a Tenant xxxxxxxx-1bf0-4dda-aec3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ Checks if account name is available.

### Example 1: Check if account name is available
```powershell
PS C:\> Test-AzPurviewAccountNameAvailability -Name test-pa -Type Tenant
Test-AzPurviewAccountNameAvailability -Name test-pa -Type Tenant
```

```output
Message NameAvailable Reason
------- ------------- ------
The name test-pa is invalid, please use another name. False Invalid
Expand Down
10 changes: 7 additions & 3 deletions src/Purview/Purview.Autorest/docs/Update-AzPurviewAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ Updates an account

### Example 1: Update a purview account
```powershell
PS C:\> Update-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Tag @{"k"="v"} | fl
Update-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Tag @{"k"="v"} | fl
```

```output
CloudConnectorAwsExternalId : xxxxxxxxxx-d074-4f8f-9d7f-10811b250738
CreatedAt : 8/17/2021 6:18:57 AM
CreatedBy : [email protected]
Expand Down Expand Up @@ -91,9 +93,11 @@ Update the tag of a purview account named 'test-pa'

### Example 2: Update a purview account by InputObject
```powershell
PS C:\> $get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Update-AzPurviewAccount -InputObject $get -Tag @{"k"="v"}
$get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Update-AzPurviewAccount -InputObject $get -Tag @{"k"="v"}
```

```output
CloudConnectorAwsExternalId : xxxxxxxxxx-d074-4f8f-9d7f-10811b250738
CreatedAt : 8/17/2021 6:18:57 AM
CreatedBy : [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
### Example 1: Add the administrator for root collection

```powershell
PS C:\> Add-AzPurviewAccountRootCollectionAdmin -AccountName test-pa -ResourceGroupName test-rg -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0

Add-AzPurviewAccountRootCollectionAdmin -AccountName test-pa -ResourceGroupName test-rg -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0
```

Add the administrator for root collection associated with the account named 'test-pa'.

### Example 2: Add the administrator for root collection by InputObject
```powershell
PS C:\> $got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Add-AzPurviewAccountRootCollectionAdmin -InputObject $got -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0
$got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Add-AzPurviewAccountRootCollectionAdmin -InputObject $got -ObjectId xxxxxxxx-5be9-4f43-abd2-04561777c8b0
```

Add the administrator for root collection associated with the account named 'test-pa' by InputObject.
Expand Down
19 changes: 13 additions & 6 deletions src/Purview/Purview.Autorest/examples/Get-AzPurviewAccount.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: List All Purview Accounts
```powershell
PS C:\> Get-AzPurviewAccount
Get-AzPurviewAccount
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- --------
xxxxxxxx-a087-43aa-8a7f-c17a4bbd4d36 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus pvac 8/4/2021 8:34:28 AM [email protected] User
Expand All @@ -13,8 +15,10 @@ List all purview accounts.

### Example 2: Get Purview Account by Resource Group Name and Name
```powershell
PS C:\> Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- ----------------------- -----------------
xxxxxxxx-7956-4978-87e8-9ddd82cfe2b7 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 6:18:57 AM [email protected] User 8/17/2021 6:18:5…
Expand All @@ -24,8 +28,10 @@ Get the purview account name test-rg in resource group test-pa

### Example 3: List Purview Accounts in a Specified Resource Group
```powershell
PS C:\> Get-AzPurviewAccount -ResourceGroupName test-rg
Get-AzPurviewAccount -ResourceGroupName test-rg
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- ----------------------- -----------------
xxxxxxxx-7956-4978-87e8-9ddd82cfe2b7 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 6:18:57 AM [email protected] User 8/17/2021 6:18:5…
Expand All @@ -35,10 +41,11 @@ List the purview accounts in resource group test-pa

### Example 4: Get Purview Account by InputObject
```powershell
PS C:\> $got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Get-AzADDomainService -InputObject $got

$got = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Get-AzADDomainService -InputObject $got
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt
------------------- ---------------- ------------ -------- ---- ------------------- ------------------- ----------------------- -----------------
xxxxxxxx-7956-4978-87e8-9ddd82cfe2b7 xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 6:18:57 AM [email protected] User 8/17/2021 6:18:5…
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: List the authorization keys associated with a specified account.
```powershell
PS C:\> Get-AzPurviewAccountKey -AccountName test-pa -ResourceGroupName test-rg
Get-AzPurviewAccountKey -AccountName test-pa -ResourceGroupName test-rg
```

```output
AtlasKafkaPrimaryEndpoint
-------------------------
Endpoint=sb://atlas-xxxxxxxx-5348-4811-a336-759242a25d37.servicebus.windows.net/;SharedAccessKeyName=AlternateSharedAccessKey;SharedAcces…
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Get the default account for the scope Tenant.
```powershell
PS C:\> Get-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
Get-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
```

```output
AccountName ResourceGroupName Scope ScopeTenantId ScopeType SubscriptionId
----------- ----------------- ----- ------------- --------- --------------
test-pa test-rg xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a Tenant xxxxxxxx-1bf0-4dda-aec3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Create a purview account
```powershell
PS C:\> New-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Location eastus -IdentityType SystemAssigned -SkuCapacity 4 -SkuName Standard
New-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Location eastus -IdentityType SystemAssigned -SkuCapacity 4 -SkuName Standard
```

```output
IdentityPrincipalId IdentityTenantId IdentityType Location Name SystemDataCreatedAt SystemDataCreatedBy
------------------- ---------------- ------------ -------- ---- ------------------- -----------
xxxxxxxx-9e08-4873-8b0d-1442be9e5b14 54826b22-38d6-4fb2-bad9-b7b93a3e9c5a SystemAssigned eastus test-pa 8/17/2021 7:47:10 AM xxx.xxx…
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
### Example 1: Delete a purview account

```powershell
PS C:\> Remove-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg

Remove-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
```

Delete a purview account named 'test-pa'

### Example 2: Delete a purview account by InputObject
```powershell
PS C:\> $get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Remove-AzPurviewAccount -InputObject $get

$get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Remove-AzPurviewAccount -InputObject $get
```

Delete a purview account named 'test-pa' by InputObject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Example 1: Removes the default account from the scope
```powershell
PS C:\> Remove-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
Remove-AzPurviewDefaultAccount -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a -ScopeType Tenant
```

Removes the default account from the scope Tenant.
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Sets the default account for the scope.
```powershell
PS C:\> Set-AzPurviewDefaultAccount -AccountName test-pa -ResourceGroupName test-rg -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a
Set-AzPurviewDefaultAccount -AccountName test-pa -ResourceGroupName test-rg -ScopeTenantId xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a
```

```output
AccountName ResourceGroupName Scope ScopeTenantId ScopeType SubscriptionId
----------- ----------------- ----- ------------- --------- --------------
test-pa test-rg xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a xxxxxxxx-38d6-4fb2-bad9-b7b93a3e9c5a Tenant xxxxxxxx-1bf0-4dda-aec3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Check if account name is available
```powershell
PS C:\> Test-AzPurviewAccountNameAvailability -Name test-pa -Type Tenant
Test-AzPurviewAccountNameAvailability -Name test-pa -Type Tenant
```

```output
Message NameAvailable Reason
------- ------------- ------
The name test-pa is invalid, please use another name. False Invalid
Expand Down
10 changes: 7 additions & 3 deletions src/Purview/Purview.Autorest/examples/Update-AzPurviewAccount.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
### Example 1: Update a purview account
```powershell
PS C:\> Update-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Tag @{"k"="v"} | fl
Update-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg -Tag @{"k"="v"} | fl
```

```output
CloudConnectorAwsExternalId : xxxxxxxxxx-d074-4f8f-9d7f-10811b250738
CreatedAt : 8/17/2021 6:18:57 AM
CreatedBy : [email protected]
Expand Down Expand Up @@ -58,9 +60,11 @@ Update the tag of a purview account named 'test-pa'

### Example 2: Update a purview account by InputObject
```powershell
PS C:\> $get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
PS C:\> Update-AzPurviewAccount -InputObject $get -Tag @{"k"="v"}
$get = Get-AzPurviewAccount -Name test-pa -ResourceGroupName test-rg
Update-AzPurviewAccount -InputObject $get -Tag @{"k"="v"}
```

```output
CloudConnectorAwsExternalId : xxxxxxxxxx-d074-4f8f-9d7f-10811b250738
CreatedAt : 8/17/2021 6:18:57 AM
CreatedBy : [email protected]
Expand Down