Skip to content

Commit aa68640

Browse files
authored
Split Az.TimeSeriesInsights Examples in generation (#17378)
* Split Az.TimeSeriesInsights Examples in generation * Split Az.TimSeriesInsights Examples in generation
1 parent aea7953 commit aa68640

32 files changed

+232
-180
lines changed

src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ Gets the access policy with the specified name in the specified environment.
3737

3838
### Example 1: List all access policies under a specified environment
3939
```powershell
40-
PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup
41-
40+
Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup
41+
```
42+
```output
4243
Name Type
4344
---- ----
4445
policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies
@@ -49,8 +50,9 @@ This command lists all access policies under a specified environment.
4950

5051
### Example 2: Get a specified access policy by name
5152
```powershell
52-
PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001
53-
53+
Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001
54+
```
55+
```output
5456
Name Type
5557
---- ----
5658
policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies
@@ -60,9 +62,10 @@ This command gets a specified access policy.
6062

6163
### Example 3: Get a specified access policy by object
6264
```powershell
63-
PS C:\>$ap = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsi-envv8u56x -ResourceGroupName tsi-test-i01k5l -Name tsi-apilgj5y
64-
PS C:\>Get-AzTimeSeriesInsightsAccessPolicy -InputObject $ap
65-
65+
$ap = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsi-envv8u56x -ResourceGroupName tsi-test-i01k5l -Name tsi-apilgj5y
66+
Get-AzTimeSeriesInsightsAccessPolicy -InputObject $ap
67+
```
68+
```output
6669
Name Type
6770
---- ----
6871
policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies

src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ Gets the environment with the specified name in the specified subscription and r
4343

4444
### Example 1: Get a time series insights environment
4545
```powershell
46-
PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001
47-
46+
Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001
47+
```
48+
```output
4849
DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com
4950
DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046
5051
DataRetentionTime : 1.01:25:00
@@ -72,8 +73,9 @@ This command gets a time series insights environment.
7273

7374
### Example 2: List all time series insights environments
7475
```powershell
75-
PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup
76-
76+
Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup
77+
```
78+
```output
7779
DataAccessFqdn : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86.env.timeseries.azure.com
7880
DataAccessId : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86
7981
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/
@@ -123,9 +125,10 @@ This command lists all time series insights environments in a resource group.
123125

124126
### Example 3: Get a time series insights environment by object
125127
```powershell
126-
PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName tsi-test-i01k5l -Name tsi-envv8u56x
127-
PS C:\> Get-AzTimeSeriesInsightsEnvironment -InputObject $env
128-
128+
$env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName tsi-test-i01k5l -Name tsi-envv8u56x
129+
Get-AzTimeSeriesInsightsEnvironment -InputObject $env
130+
```
131+
```output
129132
DataAccessFqdn : d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com
130133
DataAccessId : d76a61f2-8a30-41a5-9587-f241eb9b48d9
131134
DataRetentionTime : 1.01:25:00

src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ Gets the event source with the specified name in the specified environment.
3737

3838
### Example 1: List all event sources under the specified environment
3939
```powershell
40-
PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001
41-
40+
Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001
41+
```
42+
```output
4243
ConsumerGroupName : testgroup2
4344
EventHubName : hubname001
4445
EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.EventHub/namespaces/spacename001/eventhubs/hu
@@ -72,8 +73,9 @@ This command lists all event sources under the specified environments.
7273

7374
### Example 2: Get a specified event source by name
7475
```powershell
75-
PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001
76-
76+
Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001
77+
```
78+
```output
7779
ConsumerGroupName : testgroup2
7880
EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001
7981
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve
@@ -92,9 +94,10 @@ This command gets a specific event source.
9294

9395
### Example 3: Get a specified event source by object
9496
```powershell
95-
PS C:\> $es = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsi-esrfyi9h
96-
PS C:\> Get-AzTimeSeriesInsightsEventSource -InputObject $es
97-
97+
$es = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsi-esrfyi9h
98+
Get-AzTimeSeriesInsightsEventSource -InputObject $es
99+
```
100+
```output
98101
ConsumerGroupName : tsi-test-i01k5l
99102
EventHubName : eventhubname-d2rvmp
100103
EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp

src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ Gets the reference data set with the specified name in the specified environment
3737

3838
### Example 1: List all reference data sets under the specified environment
3939
```powershell
40-
PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup
41-
40+
Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup
41+
```
42+
```output
4243
Location Name Type
4344
-------- ---- ----
4445
eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets
@@ -49,8 +50,9 @@ This command lists all reference data sets under the specified environment.
4950

5051
### Example 2: Get a specified reference data set by name
5152
```powershell
52-
PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001
53-
53+
Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001
54+
```
55+
```output
5456
Location Name Type
5557
-------- ---- ----
5658
eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets
@@ -60,9 +62,10 @@ This command gets a specified reference data set.
6062

6163
### Example 3: Get a specified reference data set by object
6264
```powershell
63-
PS C:\> $ds = Get-AzTimeSeriesInsightsReferenceDataSet -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsirdsqwufij
64-
PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds
65-
65+
$ds = Get-AzTimeSeriesInsightsReferenceDataSet -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsirdsqwufij
66+
Get-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds
67+
```
68+
```output
6669
Location Name Type
6770
-------- ---- ----
6871
eastus2 tsirdsqwufij Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets

src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ Create or update an access policy in the specified environment.
2525

2626
### Example 1: Create an access policy for a specified environment
2727
```powershell
28-
PS C:\> New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -PrincipalObjectId ce74a389-b5e8-4f16-89c7-787031ddd903 -Role Contributor -Name policy001
29-
28+
New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -PrincipalObjectId ce74a389-b5e8-4f16-89c7-787031ddd903 -Role Contributor -Name policy001
29+
```
30+
```output
3031
Name Type
3132
---- ----
3233
policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies

src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,27 @@ Create an environment in the specified subscription and resource group.
3636

3737
### Example 1: Create a Gen1 time series insights environment
3838
```powershell
39-
PS C:\> $TimeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25
40-
PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Kind Gen1 -Location eastus -Sku S1 -DataRetentionTime $TimeSpan -Capacity 2
41-
42-
Kind Location Name SkuCapacity SkuName Type
43-
---- -------- ---- ----------- ------- ----
44-
Gen1 eastus tsitest001 2 S1 Microsoft.TimeSeriesInsights/Environments
39+
$TimeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25
40+
New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Kind Gen1 -Location eastus -Sku S1 -DataRetentionTime $TimeSpan -Capacity 2
41+
```
42+
```output
43+
Kind Location Name SkuCapacity SkuName Type
44+
---- -------- ---- ----------- ------- ----
45+
Gen1 eastus tsitest001 2 S1 Microsoft.TimeSeriesInsights/Environments
4546
```
4647

4748
This command creates a Gen1 time series insights environment.
4849

4950
### Example 2: Create a Gen2 time series insights environment
5051
```powershell
51-
PS C:\> $ks = Get-AzStorageAccountKey -ResourceGroupName "testgroup" -Name "staccount001"
52-
PS C:\> $k = $ks[0].Value | ConvertTo-SecureString -AsPlainText -Force
53-
PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest002 -Kind Gen2 -Location eastus -Sku L1 -StorageAccountName staccount001 -StorageAccountKey $k -TimeSeriesIdProperty @{name='cdc';type='string'}
54-
55-
Kind Location Name SkuCapacity SkuName Type
56-
---- -------- ---- ----------- ------- ----
57-
Gen2 eastus tsitest002 1 L1 Microsoft.TimeSeriesInsights/Environments
52+
$ks = Get-AzStorageAccountKey -ResourceGroupName "testgroup" -Name "staccount001"
53+
$k = $ks[0].Value | ConvertTo-SecureString -AsPlainText -Force
54+
New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest002 -Kind Gen2 -Location eastus -Sku L1 -StorageAccountName staccount001 -StorageAccountKey $k -TimeSeriesIdProperty @{name='cdc';type='string'}
55+
```
56+
```output
57+
Kind Location Name SkuCapacity SkuName Type
58+
---- -------- ---- ----------- ------- ----
59+
Gen2 eastus tsitest002 1 L1 Microsoft.TimeSeriesInsights/Environments
5860
```
5961

6062
This command creates a Gen2 time series insights environment.

src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ Create an event source under the specified environment.
3636

3737
### Example 1: Create an eventhub event source under the specified environment
3838
```powershell
39-
PS C:\> New-AzEventHubNamespace -Name spacename002 -ResourceGroupName testgroup -Location eastus
40-
PS C:\> $ev = New-AzEventHub -ResourceGroupName testgroup -NamespaceName spacename002 -Name hubname001 -MessageRetentionInDays 3 -PartitionCount 2
41-
PS C:\> $ks = Get-AzEventHubKey -ResourceGroupName testgroup -NamespaceName spacename002 -AuthorizationRuleName RootManageSharedAccessKey
42-
PS C:\> $k = $ks.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force
43-
PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name estest001 -EnvironmentName tsitest001 -Kind Microsoft.EventHub -ConsumerGroupName testgroup -Location eastus -KeyName RootManageSharedAccessKey -ServiceBusNameSpace spacename002 -EventHubName hubname001 -EventSourceResourceId $ev.id -SharedAccessKey $k
44-
39+
New-AzEventHubNamespace -Name spacename002 -ResourceGroupName testgroup -Location eastus
40+
$ev = New-AzEventHub -ResourceGroupName testgroup -NamespaceName spacename002 -Name hubname001 -MessageRetentionInDays 3 -PartitionCount 2
41+
$ks = Get-AzEventHubKey -ResourceGroupName testgroup -NamespaceName spacename002 -AuthorizationRuleName RootManageSharedAccessKey
42+
$k = $ks.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force
43+
New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name estest001 -EnvironmentName tsitest001 -Kind Microsoft.EventHub -ConsumerGroupName testgroup -Location eastus -KeyName RootManageSharedAccessKey -ServiceBusNameSpace spacename002 -EventHubName hubname001 -EventSourceResourceId $ev.id -SharedAccessKey $k
44+
```
45+
```output
4546
Kind Location Name Type
4647
---- -------- ---- ----
4748
Microsoft.EventHub eastus estest001 Microsoft.TimeSeriesInsights/Environments/EventSources
@@ -51,11 +52,12 @@ This command creates an eventhub event source under the specified environment.
5152

5253
### Example 2: Create an iothub event source under the specified environment
5354
```powershell
54-
PS C:\> $ev = New-AzIotHub -ResourceGroupName testgroup -Location eastus -Name iotname001 -SkuName S1 -Units 100
55-
PS C:\> $ks = Get-AzIotHubKey -ResourceGroupName testgroup -Name iotname001
56-
PS C:\> $k = $ks[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force
57-
PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name iots001 -EnvironmentName tsitest001 -Kind Microsoft.IoTHub -ConsumerGroupName testgroup -Location eastus -KeyName RootManageSharedAccessKey -IoTHubName iotname001 -EventSourceResourceId $ev.id -SharedAccessKey $k
58-
55+
$ev = New-AzIotHub -ResourceGroupName testgroup -Location eastus -Name iotname001 -SkuName S1 -Units 100
56+
$ks = Get-AzIotHubKey -ResourceGroupName testgroup -Name iotname001
57+
$k = $ks[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force
58+
New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name iots001 -EnvironmentName tsitest001 -Kind Microsoft.IoTHub -ConsumerGroupName testgroup -Location eastus -KeyName RootManageSharedAccessKey -IoTHubName iotname001 -EventSourceResourceId $ev.id -SharedAccessKey $k
59+
```
60+
```output
5961
Location Name Type Kind
6062
-------- ---- ---- ----
6163
eastus iots001 Microsoft.TimeSeriesInsights/Environments/EventSources Microsoft.IoTHub

src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ Create or update a reference data set in the specified environment.
2626

2727
### Example 1: Create a reference data set for a specified environment
2828
```powershell
29-
PS C:\> $mykeyproperties = @{ "name" = "device01"; "type" = "Double"}
30-
PS C:\> New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Location eastus -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties
31-
29+
$mykeyproperties = @{ "name" = "device01"; "type" = "Double"}
30+
New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Location eastus -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties
31+
```
32+
```output
3233
Location Name Type
3334
-------- ---- ----
3435
eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets

src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ Deletes the access policy with the specified name in the specified subscription,
3131

3232
### Example 1: Remove a specified access policy by name
3333
```powershell
34-
PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup
34+
Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup
3535
3636
```
3737

3838
This command removes a specified access policy.
3939

4040
### Example 2: Remove a specified access policy by object
4141
```powershell
42-
PS C:\> $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup
43-
PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -InputObject $policy
42+
$policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup
43+
Remove-AzTimeSeriesInsightsAccessPolicy -InputObject $policy
4444
4545
```
4646

src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ Deletes the environment with the specified name in the specified subscription an
3131

3232
### Example 1: Remove a time series insights environment by name
3333
```powershell
34-
PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill
34+
Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill
3535
3636
```
3737

3838
This command removes a time series insights environment.
3939

4040
### Example 2: Remove a time series insights environment by object
4141
```powershell
42-
PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill
43-
PS C:\> Remove-AzTimeSeriesInsightsEnvironment -InputObject $env
42+
$env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill
43+
Remove-AzTimeSeriesInsightsEnvironment -InputObject $env
4444
4545
```
4646

0 commit comments

Comments
 (0)