From b1f88b0f7e3022f804c1208f56d67ddd6dcc2003 Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 23 Mar 2020 16:06:43 +0800 Subject: [PATCH 1/7] Init version of timeseriesinsights --- .../New-AzTimeSeriesInsightsEnvironment.ps1 | 251 +++++++++++ .../New-AzTimeSeriesInsightsEventSource.ps1 | 228 ++++++++++ src/TimeSeriesInsights/custom/readme.md | 41 ++ .../docs/Az.TimeSeriesInsights.md | 61 +++ .../Get-AzTimeSeriesInsightsAccessPolicy.md | 188 ++++++++ .../Get-AzTimeSeriesInsightsEnvironment.md | 251 +++++++++++ .../Get-AzTimeSeriesInsightsEventSource.md | 220 ++++++++++ ...et-AzTimeSeriesInsightsReferenceDataSet.md | 188 ++++++++ .../New-AzTimeSeriesInsightsAccessPolicy.md | 214 +++++++++ .../New-AzTimeSeriesInsightsEnvironment.md | 414 ++++++++++++++++++ .../New-AzTimeSeriesInsightsEventSource.md | 371 ++++++++++++++++ ...ew-AzTimeSeriesInsightsReferenceDataSet.md | 242 ++++++++++ ...Remove-AzTimeSeriesInsightsAccessPolicy.md | 216 +++++++++ .../Remove-AzTimeSeriesInsightsEnvironment.md | 200 +++++++++ .../Remove-AzTimeSeriesInsightsEventSource.md | 216 +++++++++ ...ve-AzTimeSeriesInsightsReferenceDataSet.md | 217 +++++++++ ...Update-AzTimeSeriesInsightsAccessPolicy.md | 236 ++++++++++ .../Update-AzTimeSeriesInsightsEnvironment.md | 355 +++++++++++++++ .../Update-AzTimeSeriesInsightsEventSource.md | 228 ++++++++++ ...te-AzTimeSeriesInsightsReferenceDataSet.md | 220 ++++++++++ src/TimeSeriesInsights/docs/readme.md | 11 + .../Get-AzTimeSeriesInsightsAccessPolicy.md | 22 + .../Get-AzTimeSeriesInsightsEnvironment.md | 80 ++++ .../Get-AzTimeSeriesInsightsEventSource.md | 55 +++ ...et-AzTimeSeriesInsightsReferenceDataSet.md | 22 + .../New-AzTimeSeriesInsightsAccessPolicy.md | 10 + .../New-AzTimeSeriesInsightsEnvironment.md | 25 ++ .../New-AzTimeSeriesInsightsEventSource.md | 29 ++ ...ew-AzTimeSeriesInsightsReferenceDataSet.md | 11 + ...Remove-AzTimeSeriesInsightsAccessPolicy.md | 7 + .../Remove-AzTimeSeriesInsightsEnvironment.md | 8 + .../Remove-AzTimeSeriesInsightsEventSource.md | 8 + ...ve-AzTimeSeriesInsightsReferenceDataSet.md | 7 + ...Update-AzTimeSeriesInsightsAccessPolicy.md | 10 + .../Update-AzTimeSeriesInsightsEnvironment.md | 38 ++ .../Update-AzTimeSeriesInsightsEventSource.md | 19 + ...te-AzTimeSeriesInsightsReferenceDataSet.md | 10 + src/TimeSeriesInsights/readme.md | 123 ++++++ 38 files changed, 5052 insertions(+) create mode 100644 src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 create mode 100644 src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 create mode 100644 src/TimeSeriesInsights/custom/readme.md create mode 100644 src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/readme.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/readme.md diff --git a/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 new file mode 100644 index 000000000000..5885adb8387a --- /dev/null +++ b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 @@ -0,0 +1,251 @@ + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an environment in the specified subscription and resource group. +.Description +Create an environment in the specified subscription and resource group. + +.Link +https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsenvironment +#> +function New-AzTimeSeriesInsightsEnvironment { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource])] + [CmdletBinding(DefaultParameterSetName='standard', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Alias('EnvironmentName')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of the environment + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of an Azure Resource group. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [ArgumentCompleter({param ( $CommandName, $ParameterName, $WordToComplete, $CommandAst, $FakeBoundParameters ) return @('Standard', 'LongTerm')})] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind] + # The kind of the environment. + ${Kind}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The location of the resource. + ${Location}, + + [Parameter(ParameterSetName='standard', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.Int32] + # The capacity of the sku. + # For standard environments, this value can be changed to support scale out of environments after they have been created. + ${Capacity}, + + [Parameter(ParameterSetName='standard', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.TimeSpan] + # The data retention time. + ${DataRetentionTime}, + + [Parameter(ParameterSetName='standard')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[]] + # The list of event properties which will be used to partition data in the environment. + ${PartitionKeyProperty}, + + [Parameter(ParameterSetName='standard')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The behavior the Time Series Insights service should take when the environment's capacity has been exceeded + ${StorageLimitExceededBehavior}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName] + # The name of this SKU. + ${Sku}, + + [Parameter(ParameterSetName='longterm', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[]] + # The list of event properties which will be used to define the environment's time series id. + ${TimeSeriesIdProperty}, + + [Parameter(ParameterSetName='longterm', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the storage account that will hold the environment's long term data. + ${StorageAccountName}, + + [Parameter(ParameterSetName='longterm', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.Security.SecureString] + # The value of the management key that grants the Time Series Insights service write access to the storage account. + ${StorageAccountKey}, + + [Parameter(ParameterSetName='longterm')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.TimeSpan] + # ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store. + ${WarmStoreDataRetentionTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ICreateOrUpdateTrackedResourcePropertiesTags]))] + [System.Collections.Hashtable] + # Key-value pairs of additional properties for the resource. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + + + process { + try { + if ($PSBoundParameters['Kind'] -eq 'Standard') { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.StandardEnvironmentCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.StandardEnvironmentCreationProperties]::new() + + $Parameter.SkuCapacity = $PSBoundParameters['Capacity'] + $null = $PSBoundParameters.Remove('Capacity') + + $Parameter.Property.DataRetentionTime = $PSBoundParameters['DataRetentionTime'] + $null = $PSBoundParameters.Remove('DataRetentionTime') + + if ($PSBoundParameters.ContainsKey('PartitionKeyProperty')) { + $Parameter.Property.PartitionKeyProperty = $PSBoundParameters['PartitionKeyProperty'] + $null = $PSBoundParameters.Remove('PartitionKeyProperty') + } + + if ($PSBoundParameters.ContainsKey('StorageLimitExceededBehavior')) { + $Parameter.Property.StorageLimitExceededBehavior = $PSBoundParameters['StorageLimitExceededBehavior'] + $null = $PSBoundParameters.Remove('StorageLimitExceededBehavior') + } + } else { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.LongTermEnvironmentCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.LongTermEnvironmentCreationProperties]::new() + + $Parameter.Property.StorageConfigurationAccountName = $PSBoundParameters['StorageAccountName'] + $null = $PSBoundParameters.Remove('StorageAccountName') + + $Parameter.Property.StorageConfigurationManagementKey = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($PSBoundParameters['StorageAccountKey'])) + $null = $PSBoundParameters.Remove('StorageAccountKey') + + $Parameter.Property.TimeSeriesIdProperty = $PSBoundParameters['TimeSeriesIdProperty'] + $null = $PSBoundParameters.Remove('TimeSeriesIdProperty') + + # For L1, SkuCapacity is 1, which is a service side behavior + $Parameter.SkuCapacity = 1 + + if ($PSBoundParameters.ContainsKey('WarmStoreDataRetentionTime')) { + $Parameter.Property.WarmStoreConfigurationDataRetention = $PSBoundParameters['WarmStoreDataRetentionTime'] + $null = $PSBoundParameters.Remove('WarmStoreDataRetentionTime') + } + } + $Parameter.Kind = $PSBoundParameters['Kind'] + $null = $PSBoundParameters.Remove('Kind') + + $Parameter.Location = $PSBoundParameters['Location'] + $null = $PSBoundParameters.Remove('Location') + + $Parameter.SkuName = $PSBoundParameters['Sku'] + $null = $PSBoundParameters.Remove('Sku') + + if ($PSBoundParameters.ContainsKey('Tag')) { + $Parameter.Tag = $PSBoundParameters['Tag'] + $null = $PSBoundParameters.Remove('Tag') + } + + $null = $PSBoundParameters.Add('Parameter', $Parameter) + + Az.TimeSeriesInsights.internal\New-AzTimeSeriesInsightsEnvironment @PSBoundParameters + } catch { + throw + } + } +} + \ No newline at end of file diff --git a/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 new file mode 100644 index 000000000000..df4d6a14f535 --- /dev/null +++ b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an event source under the specified environment. +.Description +Create an event source under the specified environment. + +.Link +https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightseventsource +#> +function New-AzTimeSeriesInsightsEventSource { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource])] + [CmdletBinding(DefaultParameterSetName='eventhub', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # The name of the Time Series Insights environment associated with the specified resource group. + ${EnvironmentName}, + + [Parameter(Mandatory)] + [Alias('EventSourceName')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of the event source. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of an Azure Resource group. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [ArgumentCompleter({param ( $CommandName, $ParameterName, $WordToComplete, $CommandAst, $FakeBoundParameters ) return @('Microsoft.EventHub', 'Microsoft.IoTHub')})] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind] + # The kind of the event source. + ${Kind}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The location of the resource. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ICreateOrUpdateTrackedResourcePropertiesTags]))] + [System.Collections.Hashtable] + # Key-value pairs of additional properties for the resource. + ${Tag}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the event/iot hub's consumer group that holds the partitions from which events will be read. + ${ConsumerGroupName}, + + [Parameter(ParameterSetName='eventhub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the event hub. + ${EventHubName}, + + [Parameter(ParameterSetName='iothub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the iot hub. + ${IoTHubName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the SAS key that grants the Time Series Insights service access to the event/iot hub. + ${KeyName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The resource id of the event source in Azure Resource Manager. + ${EventSourceResourceId}, + + [Parameter(ParameterSetName='eventhub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the service bus that contains the event hub. + ${ServiceBusNameSpace}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.Security.SecureString] + # The value of the shared access key that grants the Time Series Insights service read access to the event/iot hub. + ${SharedAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The event property that will be used as the event source's timestamp. + ${TimeStampPropertyName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + + process { + try { + if ($PSBoundParameters['Kind'] -eq 'Microsoft.EventHub') { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.EventHubEventSourceCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.EventHubEventSourceCreationProperties]::new() + + $Parameter.Property.EventHubName = $PSBoundParameters['EventHubName'] + $null = $PSBoundParameters.Remove('EventHubName') + + $Parameter.Property.ServiceBusNameSpace = $PSBoundParameters['ServiceBusNameSpace'] + $null = $PSBoundParameters.Remove('ServiceBusNameSpace') + } else { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IoTHubEventSourceCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IoTHubEventSourceCreationProperties]::new() + + $Parameter.Property.IoTHubName = $PSBoundParameters['IoTHubName'] + $null = $PSBoundParameters.Remove('IoTHubName') + } + $Parameter.Kind = $PSBoundParameters['Kind'] + $null = $PSBoundParameters.Remove('Kind') + + $Parameter.Location = $PSBoundParameters['Location'] + $null = $PSBoundParameters.Remove('Location') + + $Parameter.Property.EventSourceResourceId = $PSBoundParameters['EventSourceResourceId'] + $null = $PSBoundParameters.Remove('EventSourceResourceId') + + $Parameter.Property.ConsumerGroupName = $PSBoundParameters['ConsumerGroupName'] + $null = $PSBoundParameters.Remove('ConsumerGroupName') + + $Parameter.Property.KeyName = $PSBoundParameters['KeyName'] + $null = $PSBoundParameters.Remove('KeyName') + + $Parameter.Property.SharedAccessKey = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($PSBoundParameters['SharedAccessKey'])) + $null = $PSBoundParameters.Remove('SharedAccessKey') + + if ($PSBoundParameters.ContainsKey('Tag')) { + $Parameter.Tag = $PSBoundParameters['Tag'] + $null = $PSBoundParameters.Remove('Tag') + } + + if ($PSBoundParameters.ContainsKey('TimeStampPropertyName')) { + $Parameter.Property.TimeStampPropertyName = $PSBoundParameters['TimeStampPropertyName'] + $null = $PSBoundParameters.Remove('TimeStampPropertyName') + } + + $null = $PSBoundParameters.Add('Parameter', $Parameter) + + Az.TimeSeriesInsights.internal\New-AzTimeSeriesInsightsEventSource @PSBoundParameters + } catch { + throw + } + } + + +} + \ No newline at end of file diff --git a/src/TimeSeriesInsights/custom/readme.md b/src/TimeSeriesInsights/custom/readme.md new file mode 100644 index 000000000000..72188c363c6a --- /dev/null +++ b/src/TimeSeriesInsights/custom/readme.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.TimeSeriesInsights` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.TimeSeriesInsights.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.TimeSeriesInsights` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.TimeSeriesInsights.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.TimeSeriesInsights.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.TimeSeriesInsights`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.TimeSeriesInsights`. +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.TimeSeriesInsights`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md b/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md new file mode 100644 index 000000000000..39a4ad65476b --- /dev/null +++ b/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md @@ -0,0 +1,61 @@ +--- +Module Name: Az.TimeSeriesInsights +Module Guid: 19712dc5-d904-4d19-bf3a-7a01dd02cc5d +Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.TimeSeriesInsights Module +## Description +Microsoft Azure PowerShell: TimeSeriesInsights cmdlets + +## Az.TimeSeriesInsights Cmdlets +### [Get-AzTimeSeriesInsightsAccessPolicy](Get-AzTimeSeriesInsightsAccessPolicy.md) +Gets the access policy with the specified name in the specified environment. + +### [Get-AzTimeSeriesInsightsEnvironment](Get-AzTimeSeriesInsightsEnvironment.md) +Gets the environment with the specified name in the specified subscription and resource group. + +### [Get-AzTimeSeriesInsightsEventSource](Get-AzTimeSeriesInsightsEventSource.md) +Gets the event source with the specified name in the specified environment. + +### [Get-AzTimeSeriesInsightsReferenceDataSet](Get-AzTimeSeriesInsightsReferenceDataSet.md) +Gets the reference data set with the specified name in the specified environment. + +### [New-AzTimeSeriesInsightsAccessPolicy](New-AzTimeSeriesInsightsAccessPolicy.md) +Create or update an access policy in the specified environment. + +### [New-AzTimeSeriesInsightsEnvironment](New-AzTimeSeriesInsightsEnvironment.md) +Create an environment in the specified subscription and resource group. + +### [New-AzTimeSeriesInsightsEventSource](New-AzTimeSeriesInsightsEventSource.md) +Create an event source under the specified environment. + +### [New-AzTimeSeriesInsightsReferenceDataSet](New-AzTimeSeriesInsightsReferenceDataSet.md) +Create or update a reference data set in the specified environment. + +### [Remove-AzTimeSeriesInsightsAccessPolicy](Remove-AzTimeSeriesInsightsAccessPolicy.md) +Deletes the access policy with the specified name in the specified subscription, resource group, and environment + +### [Remove-AzTimeSeriesInsightsEnvironment](Remove-AzTimeSeriesInsightsEnvironment.md) +Deletes the environment with the specified name in the specified subscription and resource group. + +### [Remove-AzTimeSeriesInsightsEventSource](Remove-AzTimeSeriesInsightsEventSource.md) +Deletes the event source with the specified name in the specified subscription, resource group, and environment + +### [Remove-AzTimeSeriesInsightsReferenceDataSet](Remove-AzTimeSeriesInsightsReferenceDataSet.md) +Deletes the reference data set with the specified name in the specified subscription, resource group, and environment + +### [Update-AzTimeSeriesInsightsAccessPolicy](Update-AzTimeSeriesInsightsAccessPolicy.md) +Updates the access policy with the specified name in the specified subscription, resource group, and environment. + +### [Update-AzTimeSeriesInsightsEnvironment](Update-AzTimeSeriesInsightsEnvironment.md) +Updates the environment with the specified name in the specified subscription and resource group. + +### [Update-AzTimeSeriesInsightsEventSource](Update-AzTimeSeriesInsightsEventSource.md) +Updates the event source with the specified name in the specified subscription, resource group, and environment. + +### [Update-AzTimeSeriesInsightsReferenceDataSet](Update-AzTimeSeriesInsightsReferenceDataSet.md) +Updates the reference data set with the specified name in the specified subscription, resource group, and environment. + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..b2c9b658e028 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Gets the access policy with the specified name in the specified environment. + +## SYNTAX + +### List (Default) +``` +Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsAccessPolicy -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets the access policy with the specified name in the specified environment. + +## EXAMPLES + +### Example 1: List all access policies under a specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +policy002 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command lists all access policies under a specified environment. + +### Example 2: Get a specified access policy +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command gets a specified access policy. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights access policy associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IAccessPolicyResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..bd07927232ed --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,251 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Gets the environment with the specified name in the specified subscription and resource group. + +## SYNTAX + +### List1 (Default) +``` +Get-AzTimeSeriesInsightsEnvironment [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName [-SubscriptionId ] + [-Expand ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsEnvironment -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +### List +``` +Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the environment with the specified name in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Get a time series insights environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command gets a time series insights environment. + +### Example 2: List all time series insights environments +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup + +DataAccessFqdn : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86.env.timeseries.azure.com +DataAccessId : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/ + tsill +IngressState : +Kind : LongTerm +Location : EastUs +Name : tsill +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 1 +SkuName : L1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageConfigurationAccountName : cdolauli +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimeSeriesIdProperty : {ccc} +Type : Microsoft.TimeSeriesInsights/Environments +WarmStoreConfigurationDataRetention : 00:00:00 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command lists all time series insights environments in a resource group. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Expand +Setting $expand=status will include the status of the internal services of the environment in the Time Series Insights service. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..28e69f50d162 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,220 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Gets the event source with the specified name in the specified environment. + +## SYNTAX + +### List (Default) +``` +Get-AzTimeSeriesInsightsEventSource -EnvironmentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsEventSource -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets the event source with the specified name in the specified environment. + +## EXAMPLES + +### Example 1: List all event sources under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 + +ConsumerGroupName : testgroup2 +EventHubName : hubname001 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.EventHub/namespaces/spacename001/eventhubs/hu + bname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/estest001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.EventHub +Location : eastus +Name : estest001 +ServiceBusNamespace : spacename001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command lists all event sources under the specified environments. + +### Example 2: Get a specified event source +```powershell +PS C:\> et-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command gets a specific event source. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights event source associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..71e32b3820d5 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Gets the reference data set with the specified name in the specified environment. + +## SYNTAX + +### List (Default) +``` +Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsReferenceDataSet -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the reference data set with the specified name in the specified environment. + +## EXAMPLES + +### Example 1: List all reference data sets under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +eastus dstest002 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command lists all reference data sets under the specified environment. + +### Get a specified reference data set +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command gets a specified reference data set. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights reference data set associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..430182482b7c --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,214 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Create or update an access policy in the specified environment. + +## SYNTAX + +``` +New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-PrincipalObjectId ] [-Role ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create or update an access policy in the specified environment. + +## EXAMPLES + +### Example 1: Create an access policy for a specified environment +```powershell +PS C:\> New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -PrincipalObjectId ce74a389-b5e8-4f16-89c7-787031ddd903 -Role Contributor -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command creates an access policy for a specified environment. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Description +An description of the access policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the access policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PrincipalObjectId +The objectId of the principal in Azure Active Directory. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Role +The list of roles the principal is assigned on the environment. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.AccessPolicyRole[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IAccessPolicyResource + +## ALIASES + +## NOTES + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..b40d12d786f4 --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,414 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Create an environment in the specified subscription and resource group. + +## SYNTAX + +### standard (Default) +``` +New-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName -Capacity + -DataRetentionTime -Kind -Location -Sku [-SubscriptionId ] + [-PartitionKeyProperty ] [-StorageLimitExceededBehavior ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### longterm +``` +New-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName -Kind -Location + -Sku -StorageAccountKey -StorageAccountName + -TimeSeriesIdProperty [-SubscriptionId ] [-Tag ] + [-WarmStoreDataRetentionTime ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create an environment in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Create a standard time series insights environment +```powershell +PS C:\> $TimeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Kind Standard -Location eastus -Sku S1 -DataRetentionTime $TimeSpan -Capacity 2 + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +Standard eastus tsitest001 2 S1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a standard time series insights environment. + +### Example 2: Create a longterm time series insights environment +```powershell +PS C:\> New-AzStorageAccount -ResourceGroupName testgroup -AccountName staccount001 -Location eastus -SkuName Standard_GRS +PS C:\> $ks = Get-AzStorageAccountKey -ResourceGroupName "testgroup" -Name "staccount001" +PS C:\> $k = $ks[0] | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest002 -Kind LongTerm -Location eastus -Sku L1 -StorageAccountName staccount001 -StorageAccountKey $k -TimeSeriesIdProperty @{name='cdc';type='string'} + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +LongTerm eastus tsitest002 1 L1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a longterm time series insights environment. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Capacity +The capacity of the sku. +For standard environments, this value can be changed to support scale out of environments after they have been created. + +```yaml +Type: System.Int32 +Parameter Sets: standard +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DataRetentionTime +The data retention time. + +```yaml +Type: System.TimeSpan +Parameter Sets: standard +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Kind +The kind of the environment. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Location +The location of the resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the environment + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PartitionKeyProperty +The list of event properties which will be used to partition data in the environment. +To construct, see NOTES section for PARTITIONKEYPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[] +Parameter Sets: standard +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Sku +The name of this SKU. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageAccountKey +The value of the management key that grants the Time Series Insights service write access to the storage account. + +```yaml +Type: System.Security.SecureString +Parameter Sets: longterm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageAccountName +The name of the storage account that will hold the environment's long term data. + +```yaml +Type: System.String +Parameter Sets: longterm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageLimitExceededBehavior +The behavior the Time Series Insights service should take when the environment's capacity has been exceeded + +```yaml +Type: System.String +Parameter Sets: standard +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -TimeSeriesIdProperty +The list of event properties which will be used to define the environment's time series id. +To construct, see NOTES section for TIMESERIESIDPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[] +Parameter Sets: longterm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WarmStoreDataRetentionTime +ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store. + +```yaml +Type: System.TimeSpan +Parameter Sets: longterm +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### PARTITIONKEYPROPERTY : The list of event properties which will be used to partition data in the environment. + - `[Name ]`: The name of the property. + - `[Type ]`: The type of the property. + +#### TIMESERIESIDPROPERTY : The list of event properties which will be used to define the environment's time series id. + - `[Name ]`: The name of the property. + - `[Type ]`: The type of the property. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..c4507fd76bb8 --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,371 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Create an event source under the specified environment. + +## SYNTAX + +### eventhub (Default) +``` +New-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + -ConsumerGroupName -EventHubName -EventSourceResourceId -KeyName + -Kind -Location -ServiceBusNameSpace -SharedAccessKey + [-SubscriptionId ] [-Tag ] [-TimeStampPropertyName ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### iothub +``` +New-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + -ConsumerGroupName -EventSourceResourceId -IoTHubName -KeyName + -Kind -Location -SharedAccessKey [-SubscriptionId ] [-Tag ] + [-TimeStampPropertyName ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create an event source under the specified environment. + +## EXAMPLES + +### Example 1: Create an eventhub event source under the specified environment +```powershell +PS C:\> $ev = New-AzEventHub -ResourceGroupName testgroup2 -NamespaceName spacename001 -Name hubname001 -MessageRetentionInDays 3 -PartitionCount 2 +PS C:\> $ks = Get-AzEventHubKey -ResourceGroupName testgroup2 -NamespaceName spacename001 -AuthorizationRuleName RootManageSharedAccessKey +PS C:\> $k = $ks.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name estest001 -EnvironmentName tsitest001 -Kind Microsoft.EventHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -ServiceBusNameSpace spacename001 -EventHubName hubname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Kind Location Name Type +---- -------- ---- ---- +Microsoft.EventHub eastus estest001 Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command creates an eventhub event source under the specified environment. + +### Example 2: Create an iothub event source under the specified environment +```powershell +PS C:\> $ev = New-AzIotHub -ResourceGroupName testgroup2 -Location eastus -Name iotname001 -SkuName S1 -Units 100 +PS C:\> $ks = Get-AzIotHubKey -ResourceGroupName testgroup2 -Name iotname001 +PS C:\> $k = $ks[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name iots001 +-EnvironmentName tsitest001 -Kind Microsoft.IoTHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -IoTHubName iotname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Location Name Type Kind +-------- ---- ---- ---- +eastus iots001 Microsoft.TimeSeriesInsights/Environments/EventSources Microsoft.IoTHub +``` + +This command creates an iothub event source under the specified environment. + +## PARAMETERS + +### -ConsumerGroupName +The name of the event/iot hub's consumer group that holds the partitions from which events will be read. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EventHubName +The name of the event hub. + +```yaml +Type: System.String +Parameter Sets: eventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EventSourceResourceId +The resource id of the event source in Azure Resource Manager. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -IoTHubName +The name of the iot hub. + +```yaml +Type: System.String +Parameter Sets: iothub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -KeyName +The name of the SAS key that grants the Time Series Insights service access to the event/iot hub. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Kind +The kind of the event source. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Location +The location of the resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the event source. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ServiceBusNameSpace +The name of the service bus that contains the event hub. + +```yaml +Type: System.String +Parameter Sets: eventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SharedAccessKey +The value of the shared access key that grants the Time Series Insights service read access to the event/iot hub. + +```yaml +Type: System.Security.SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -TimeStampPropertyName +The event property that will be used as the event source's timestamp. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource + +## ALIASES + +## NOTES + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..dbdcd7485872 --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,242 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Create or update a reference data set in the specified environment. + +## SYNTAX + +``` +New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name -ResourceGroupName + -KeyProperty -Location [-SubscriptionId ] + [-DataStringComparisonBehavior ] [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create or update a reference data set in the specified environment. + +## EXAMPLES + +### Example 1: Create a reference data set for a specified environment +```powershell +PS C:\> $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} +PS C:\> New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Location eastus -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command creates a reference data set for a specific environment. + +## PARAMETERS + +### -DataStringComparisonBehavior +The reference data set key comparison behavior can be set using this property. +By default, the value is 'Ordinal' - which means case sensitive key comparison will be performed while joining reference data with events or while adding new reference data. +When 'OrdinalIgnoreCase' is set, case insensitive comparison will be used. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.DataStringComparisonBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -KeyProperty +The list of key properties for the reference data set. +To construct, see NOTES section for KEYPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetKeyProperty[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Location +The location of the resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the reference data set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### KEYPROPERTY : The list of key properties for the reference data set. + - `[Name ]`: The name of the key property. + - `[Type ]`: The type of the key property. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..627b4f5b080c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,216 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Deletes the access policy with the specified name in the specified subscription, resource group, and environment + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsAccessPolicy -InputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the access policy with the specified name in the specified subscription, resource group, and environment + +## EXAMPLES + +### Example 1: Remove a specified access policy +```powershell +PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup + +``` + +This command removes a specified access policy. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights access policy associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..5dd00eca1b5c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Deletes the environment with the specified name in the specified subscription and resource group. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsEnvironment -InputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the environment with the specified name in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Remove a time series insights environment +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill + +``` + +This command removes a time series insights environment. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..8c4b37446b5f --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,216 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Deletes the event source with the specified name in the specified subscription, resource group, and environment + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsEventSource -InputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the event source with the specified name in the specified subscription, resource group, and environment + +## EXAMPLES + +### Example 1: Remove a specified event source +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup + +``` + +This removes a specific event source. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights event source associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..c7c8deae209c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,217 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Deletes the reference data set with the specified name in the specified subscription, resource group, and environment + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsReferenceDataSet -InputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the reference data set with the specified name in the specified subscription, resource group, and environment + +## EXAMPLES + +### Example 1: Remove a specified reference data set +```powershell +PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup + +``` + +This command removes a specified reference data set. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights reference data set associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..2bdfda120a6c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,236 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Updates the access policy with the specified name in the specified subscription, resource group, and environment. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-Role ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsAccessPolicy -InputObject [-Description ] + [-Role ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the access policy with the specified name in the specified subscription, resource group, and environment. + +## EXAMPLES + +### Example 1: Update a specified access policy +```powershell +PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup -Role Contributor,Reader + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command updates a specified access policy. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Description +An description of the access policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights access policy associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Role +The list of roles the principal is assigned on the environment. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.AccessPolicyRole[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IAccessPolicyResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..b6141ca0943b --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,355 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Updates the environment with the specified name in the specified subscription and resource group. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName [-SubscriptionId ] + [-Capacity ] [-DataRetentionTime ] [-PartitionKeyProperty ] + [-Sku ] [-StorageLimitExceededBehavior ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsEnvironment -InputObject [-Capacity ] + [-DataRetentionTime ] [-PartitionKeyProperty ] [-Sku ] + [-StorageLimitExceededBehavior ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the environment with the specified name in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Update a standard time series insights environment +```powershell +PS C:\> Update-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Capacity 5 -Sku S1 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 5 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command updates a standard time series insights environment. + +### Example 2: {{ Api definition for update a longterm environment is missing in swagger and should be added in the future}} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Capacity +The capacity of the sku. +For standard environments, this value can be changed to support scale out of environments after they have been created. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DataRetentionTime +ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. + +```yaml +Type: System.TimeSpan +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PartitionKeyProperty +The list of event properties which will be used to partition data in the environment. +To construct, see NOTES section for PARTITIONKEYPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Sku +The name of this SKU. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageLimitExceededBehavior +The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. +If "PauseIngress" is specified, new events will not be read from the event source. +If "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. +The default behavior is PurgeOldData. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.StorageLimitExceededBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the environment. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +#### PARTITIONKEYPROPERTY : The list of event properties which will be used to partition data in the environment. + - `[Name ]`: The name of the property. + - `[Type ]`: The type of the property. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..fe5013c066ea --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,228 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Updates the event source with the specified name in the specified subscription, resource group, and environment. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsEventSource -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the event source with the specified name in the specified subscription, resource group, and environment. + +## EXAMPLES + +### Example 1: Update a specified event source +```powershell +PS C:\> Update-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup -Tag @{"tgk"="001"} + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eventsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command updates a specific event source. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights event source associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the event source. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..692a916fcbf5 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,220 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Updates the reference data set with the specified name in the specified subscription, resource group, and environment. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name + -ResourceGroupName [-SubscriptionId ] [-Tag ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsReferenceDataSet -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the reference data set with the specified name in the specified subscription, resource group, and environment. + +## EXAMPLES + +### Example 1: Update a specified reference data set +```powershell +PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Tag @{"tstg"="lb001"} + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command updates a specified reference data set. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights reference data set associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the reference data set. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/readme.md b/src/TimeSeriesInsights/docs/readme.md new file mode 100644 index 000000000000..8f5f212dd65a --- /dev/null +++ b/src/TimeSeriesInsights/docs/readme.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.TimeSeriesInsights` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overriden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.TimeSeriesInsights` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..74c0a342fc1b --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,22 @@ +### Example 1: List all access policies under a specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +policy002 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command lists all access policies under a specified environment. + +### Example 2: Get a specified access policy +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command gets a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..c23a9307cb4e --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,80 @@ +### Example 1: Get a time series insights environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command gets a time series insights environment. + +### Example 2: List all time series insights environments +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup + +DataAccessFqdn : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86.env.timeseries.azure.com +DataAccessId : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/ + tsill +IngressState : +Kind : LongTerm +Location : EastUs +Name : tsill +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 1 +SkuName : L1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageConfigurationAccountName : cdolauli +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimeSeriesIdProperty : {ccc} +Type : Microsoft.TimeSeriesInsights/Environments +WarmStoreConfigurationDataRetention : 00:00:00 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command lists all time series insights environments in a resource group. + diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..6637ce338d89 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,55 @@ +### Example 1: List all event sources under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 + +ConsumerGroupName : testgroup2 +EventHubName : hubname001 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.EventHub/namespaces/spacename001/eventhubs/hu + bname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/estest001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.EventHub +Location : eastus +Name : estest001 +ServiceBusNamespace : spacename001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command lists all event sources under the specified environments. + +### Example 2: Get a specified event source +```powershell +PS C:\> et-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command gets a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..387b9bb9a1da --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,22 @@ +### Example 1: List all reference data sets under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +eastus dstest002 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command lists all reference data sets under the specified environment. + +### Get a specified reference data set +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command gets a specified reference data set. diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..090c9a3ff894 --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,10 @@ +### Example 1: Create an access policy for a specified environment +```powershell +PS C:\> New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -PrincipalObjectId ce74a389-b5e8-4f16-89c7-787031ddd903 -Role Contributor -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command creates an access policy for a specified environment. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..ca63b050201a --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,25 @@ +### Example 1: Create a standard time series insights environment +```powershell +PS C:\> $TimeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Kind Standard -Location eastus -Sku S1 -DataRetentionTime $TimeSpan -Capacity 2 + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +Standard eastus tsitest001 2 S1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a standard time series insights environment. + +### Example 2: Create a longterm time series insights environment +```powershell +PS C:\> New-AzStorageAccount -ResourceGroupName testgroup -AccountName staccount001 -Location eastus -SkuName Standard_GRS +PS C:\> $ks = Get-AzStorageAccountKey -ResourceGroupName "testgroup" -Name "staccount001" +PS C:\> $k = $ks[0] | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest002 -Kind LongTerm -Location eastus -Sku L1 -StorageAccountName staccount001 -StorageAccountKey $k -TimeSeriesIdProperty @{name='cdc';type='string'} + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +LongTerm eastus tsitest002 1 L1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a longterm time series insights environment. diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..61191fa4a568 --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,29 @@ +### Example 1: Create an eventhub event source under the specified environment +```powershell +PS C:\> $ev = New-AzEventHub -ResourceGroupName testgroup2 -NamespaceName spacename001 -Name hubname001 -MessageRetentionInDays 3 -PartitionCount 2 +PS C:\> $ks = Get-AzEventHubKey -ResourceGroupName testgroup2 -NamespaceName spacename001 -AuthorizationRuleName RootManageSharedAccessKey +PS C:\> $k = $ks.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name estest001 -EnvironmentName tsitest001 -Kind Microsoft.EventHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -ServiceBusNameSpace spacename001 -EventHubName hubname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Kind Location Name Type +---- -------- ---- ---- +Microsoft.EventHub eastus estest001 Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command creates an eventhub event source under the specified environment. + +### Example 2: Create an iothub event source under the specified environment +```powershell +PS C:\> $ev = New-AzIotHub -ResourceGroupName testgroup2 -Location eastus -Name iotname001 -SkuName S1 -Units 100 +PS C:\> $ks = Get-AzIotHubKey -ResourceGroupName testgroup2 -Name iotname001 +PS C:\> $k = $ks[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name iots001 +-EnvironmentName tsitest001 -Kind Microsoft.IoTHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -IoTHubName iotname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Location Name Type Kind +-------- ---- ---- ---- +eastus iots001 Microsoft.TimeSeriesInsights/Environments/EventSources Microsoft.IoTHub +``` + +This command creates an iothub event source under the specified environment. + diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..a6c1ae864bd7 --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,11 @@ +### Example 1: Create a reference data set for a specified environment +```powershell +PS C:\> $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} +PS C:\> New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Location eastus -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command creates a reference data set for a specific environment. diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..eaeefc5cc207 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,7 @@ +### Example 1: Remove a specified access policy +```powershell +PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup + +``` + +This command removes a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..ce2200de7176 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,8 @@ +### Example 1: Remove a time series insights environment +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill + +``` + +This command removes a time series insights environment. + diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..7be0d3d3e122 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,8 @@ +### Example 1: Remove a specified event source +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup + +``` + +This removes a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..1a4a36127f2f --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,7 @@ +### Example 1: Remove a specified reference data set +```powershell +PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup + +``` + +This command removes a specified reference data set. diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..540616982f45 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,10 @@ +### Example 1: Update a specified access policy +```powershell +PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup -Role Contributor,Reader + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command updates a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..c0d587b4d08b --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,38 @@ +### Example 1: Update a standard time series insights environment +```powershell +PS C:\> Update-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Capacity 5 -Sku S1 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 5 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command updates a standard time series insights environment. + +### Example 2: {{ Api definition for update a longterm environment is missing in swagger and should be added in the future}} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..df6267a75b30 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,19 @@ +### Example 1: Update a specified event source +```powershell +PS C:\> Update-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup -Tag @{"tgk"="001"} + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eventsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command updates a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..c62470c92a46 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,10 @@ +### Example 1: Update a specified reference data set +```powershell +PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Tag @{"tstg"="lb001"} + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command updates a specified reference data set. diff --git a/src/TimeSeriesInsights/readme.md b/src/TimeSeriesInsights/readme.md new file mode 100644 index 000000000000..4ceb216a5f4e --- /dev/null +++ b/src/TimeSeriesInsights/readme.md @@ -0,0 +1,123 @@ + +# Az.TimeSeriesInsights +This directory contains the PowerShell module for the TimeSeriesInsights service. + +--- +## Status +[![Az.TimeSeriesInsights](https://img.shields.io/powershellgallery/v/Az.TimeSeriesInsights.svg?style=flat-square&label=Az.TimeSeriesInsights "Az.TimeSeriesInsights")](https://www.powershellgallery.com/packages/Az.TimeSeriesInsights/) + +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 1.7.2 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.TimeSeriesInsights`, see [how-to.md](how-to.md). + + +--- +## Generation Requirements +Use of the beta version of `autorest.powershell` generator requires the following: +- [NodeJS LTS](https://nodejs.org) (10.15.x LTS preferred) + - **Note**: It *will not work* with Node < 10.x. Using 11.x builds may cause issues as they may introduce instability or breaking changes. +> If you want an easy way to install and update Node, [NVS - Node Version Switcher](../nodejs/installing-via-nvs.md) or [NVM - Node Version Manager](../nodejs/installing-via-nvm.md) is recommended. +- [AutoRest](https://aka.ms/autorest) v3 beta
`npm install -g autorest@autorest`
  +- PowerShell 6.0 or greater + - If you don't have it installed, you can use the cross-platform npm package
`npm install -g pwsh`
  +- .NET Core SDK 2.0 or greater + - If you don't have it installed, you can use the cross-platform npm package
`npm install -g dotnet-sdk-2.2`
  + +## Run Generation +In this directory, run AutoRest: +> `autorest-beta` + +--- +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../readme.azure.noprofile.md +input-file: + - $(repo)/specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/preview/2018-08-15-preview/timeseriesinsights.json + +module-version: 0.0.1 +title: TimeSeriesInsights +subject-prefix: $(service-name) + +directive: + # Fix errors in swagger + - from: swagger-document + where: $ + transform: return $.replace(/Microsoft.IotHub/g, "Microsoft.IoTHub") + # Remove the unneeded parameter set + - where: + variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + remove: true + - where: + subject: ReferenceDataSet|AccessPolicy + variant: ^Create$ + remove: true + - where: + subject: EventSource|Environment + variant: ^Create$|^CreateExpanded$ + hide: true + # Remove the set-* cmdlet + - where: + verb: Set + remove: true + # Hide the operation cmdlet + - where: + subject: Operation + hide: true + # correct some names + - where: + parameter-name: SkuCapacity + set: + parameter-name: Capacity + - where: + parameter-name: SkuName + set: + parameter-name: Sku + # Suppress the table format + - where: + model-name: StandardEnvironmentResource + set: + suppress-format: true + - where: + model-name: LongTermEnvironmentResource + set: + suppress-format: true + - where: + model-name: EventHubEventSourceResource + set: + suppress-format: true + - where: + model-name: IoTHubEventSourceResource + set: + suppress-format: true + # Correct some generated code + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IStandardEnvironmentCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IStandardEnvironmentCreationProperties Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ILongTermEnvironmentCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ILongTermEnvironmentCreationProperties Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventHubEventSourceCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventHubEventSourceCreationProperties Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IIoTHubEventSourceCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IIoTHubEventSourceCreationProperties Property'); +``` From 7872f64915599f66cb4280aec33b530104e0b589 Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 23 Mar 2020 16:06:43 +0800 Subject: [PATCH 2/7] Init version of timeseriesinsights --- .../New-AzTimeSeriesInsightsEnvironment.ps1 | 251 +++++++++++ .../New-AzTimeSeriesInsightsEventSource.ps1 | 228 ++++++++++ src/TimeSeriesInsights/custom/readme.md | 41 ++ .../docs/Az.TimeSeriesInsights.md | 61 +++ .../Get-AzTimeSeriesInsightsAccessPolicy.md | 188 ++++++++ .../Get-AzTimeSeriesInsightsEnvironment.md | 251 +++++++++++ .../Get-AzTimeSeriesInsightsEventSource.md | 220 ++++++++++ ...et-AzTimeSeriesInsightsReferenceDataSet.md | 188 ++++++++ .../New-AzTimeSeriesInsightsAccessPolicy.md | 214 +++++++++ .../New-AzTimeSeriesInsightsEnvironment.md | 414 ++++++++++++++++++ .../New-AzTimeSeriesInsightsEventSource.md | 371 ++++++++++++++++ ...ew-AzTimeSeriesInsightsReferenceDataSet.md | 242 ++++++++++ ...Remove-AzTimeSeriesInsightsAccessPolicy.md | 216 +++++++++ .../Remove-AzTimeSeriesInsightsEnvironment.md | 200 +++++++++ .../Remove-AzTimeSeriesInsightsEventSource.md | 216 +++++++++ ...ve-AzTimeSeriesInsightsReferenceDataSet.md | 217 +++++++++ ...Update-AzTimeSeriesInsightsAccessPolicy.md | 236 ++++++++++ .../Update-AzTimeSeriesInsightsEnvironment.md | 355 +++++++++++++++ .../Update-AzTimeSeriesInsightsEventSource.md | 228 ++++++++++ ...te-AzTimeSeriesInsightsReferenceDataSet.md | 220 ++++++++++ src/TimeSeriesInsights/docs/readme.md | 11 + .../Get-AzTimeSeriesInsightsAccessPolicy.md | 22 + .../Get-AzTimeSeriesInsightsEnvironment.md | 80 ++++ .../Get-AzTimeSeriesInsightsEventSource.md | 55 +++ ...et-AzTimeSeriesInsightsReferenceDataSet.md | 22 + .../New-AzTimeSeriesInsightsAccessPolicy.md | 10 + .../New-AzTimeSeriesInsightsEnvironment.md | 25 ++ .../New-AzTimeSeriesInsightsEventSource.md | 29 ++ ...ew-AzTimeSeriesInsightsReferenceDataSet.md | 11 + ...Remove-AzTimeSeriesInsightsAccessPolicy.md | 7 + .../Remove-AzTimeSeriesInsightsEnvironment.md | 8 + .../Remove-AzTimeSeriesInsightsEventSource.md | 8 + ...ve-AzTimeSeriesInsightsReferenceDataSet.md | 7 + ...Update-AzTimeSeriesInsightsAccessPolicy.md | 10 + .../Update-AzTimeSeriesInsightsEnvironment.md | 38 ++ .../Update-AzTimeSeriesInsightsEventSource.md | 19 + ...te-AzTimeSeriesInsightsReferenceDataSet.md | 10 + src/TimeSeriesInsights/readme.md | 129 ++++++ 38 files changed, 5058 insertions(+) create mode 100644 src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 create mode 100644 src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 create mode 100644 src/TimeSeriesInsights/custom/readme.md create mode 100644 src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/docs/readme.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md create mode 100644 src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md create mode 100644 src/TimeSeriesInsights/readme.md diff --git a/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 new file mode 100644 index 000000000000..5885adb8387a --- /dev/null +++ b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1 @@ -0,0 +1,251 @@ + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an environment in the specified subscription and resource group. +.Description +Create an environment in the specified subscription and resource group. + +.Link +https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsenvironment +#> +function New-AzTimeSeriesInsightsEnvironment { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource])] + [CmdletBinding(DefaultParameterSetName='standard', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Alias('EnvironmentName')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of the environment + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of an Azure Resource group. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [ArgumentCompleter({param ( $CommandName, $ParameterName, $WordToComplete, $CommandAst, $FakeBoundParameters ) return @('Standard', 'LongTerm')})] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind] + # The kind of the environment. + ${Kind}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The location of the resource. + ${Location}, + + [Parameter(ParameterSetName='standard', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.Int32] + # The capacity of the sku. + # For standard environments, this value can be changed to support scale out of environments after they have been created. + ${Capacity}, + + [Parameter(ParameterSetName='standard', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.TimeSpan] + # The data retention time. + ${DataRetentionTime}, + + [Parameter(ParameterSetName='standard')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[]] + # The list of event properties which will be used to partition data in the environment. + ${PartitionKeyProperty}, + + [Parameter(ParameterSetName='standard')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The behavior the Time Series Insights service should take when the environment's capacity has been exceeded + ${StorageLimitExceededBehavior}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName] + # The name of this SKU. + ${Sku}, + + [Parameter(ParameterSetName='longterm', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[]] + # The list of event properties which will be used to define the environment's time series id. + ${TimeSeriesIdProperty}, + + [Parameter(ParameterSetName='longterm', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the storage account that will hold the environment's long term data. + ${StorageAccountName}, + + [Parameter(ParameterSetName='longterm', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.Security.SecureString] + # The value of the management key that grants the Time Series Insights service write access to the storage account. + ${StorageAccountKey}, + + [Parameter(ParameterSetName='longterm')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.TimeSpan] + # ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store. + ${WarmStoreDataRetentionTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ICreateOrUpdateTrackedResourcePropertiesTags]))] + [System.Collections.Hashtable] + # Key-value pairs of additional properties for the resource. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + + + process { + try { + if ($PSBoundParameters['Kind'] -eq 'Standard') { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.StandardEnvironmentCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.StandardEnvironmentCreationProperties]::new() + + $Parameter.SkuCapacity = $PSBoundParameters['Capacity'] + $null = $PSBoundParameters.Remove('Capacity') + + $Parameter.Property.DataRetentionTime = $PSBoundParameters['DataRetentionTime'] + $null = $PSBoundParameters.Remove('DataRetentionTime') + + if ($PSBoundParameters.ContainsKey('PartitionKeyProperty')) { + $Parameter.Property.PartitionKeyProperty = $PSBoundParameters['PartitionKeyProperty'] + $null = $PSBoundParameters.Remove('PartitionKeyProperty') + } + + if ($PSBoundParameters.ContainsKey('StorageLimitExceededBehavior')) { + $Parameter.Property.StorageLimitExceededBehavior = $PSBoundParameters['StorageLimitExceededBehavior'] + $null = $PSBoundParameters.Remove('StorageLimitExceededBehavior') + } + } else { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.LongTermEnvironmentCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.LongTermEnvironmentCreationProperties]::new() + + $Parameter.Property.StorageConfigurationAccountName = $PSBoundParameters['StorageAccountName'] + $null = $PSBoundParameters.Remove('StorageAccountName') + + $Parameter.Property.StorageConfigurationManagementKey = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($PSBoundParameters['StorageAccountKey'])) + $null = $PSBoundParameters.Remove('StorageAccountKey') + + $Parameter.Property.TimeSeriesIdProperty = $PSBoundParameters['TimeSeriesIdProperty'] + $null = $PSBoundParameters.Remove('TimeSeriesIdProperty') + + # For L1, SkuCapacity is 1, which is a service side behavior + $Parameter.SkuCapacity = 1 + + if ($PSBoundParameters.ContainsKey('WarmStoreDataRetentionTime')) { + $Parameter.Property.WarmStoreConfigurationDataRetention = $PSBoundParameters['WarmStoreDataRetentionTime'] + $null = $PSBoundParameters.Remove('WarmStoreDataRetentionTime') + } + } + $Parameter.Kind = $PSBoundParameters['Kind'] + $null = $PSBoundParameters.Remove('Kind') + + $Parameter.Location = $PSBoundParameters['Location'] + $null = $PSBoundParameters.Remove('Location') + + $Parameter.SkuName = $PSBoundParameters['Sku'] + $null = $PSBoundParameters.Remove('Sku') + + if ($PSBoundParameters.ContainsKey('Tag')) { + $Parameter.Tag = $PSBoundParameters['Tag'] + $null = $PSBoundParameters.Remove('Tag') + } + + $null = $PSBoundParameters.Add('Parameter', $Parameter) + + Az.TimeSeriesInsights.internal\New-AzTimeSeriesInsightsEnvironment @PSBoundParameters + } catch { + throw + } + } +} + \ No newline at end of file diff --git a/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 new file mode 100644 index 000000000000..df4d6a14f535 --- /dev/null +++ b/src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an event source under the specified environment. +.Description +Create an event source under the specified environment. + +.Link +https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightseventsource +#> +function New-AzTimeSeriesInsightsEventSource { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource])] + [CmdletBinding(DefaultParameterSetName='eventhub', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # The name of the Time Series Insights environment associated with the specified resource group. + ${EnvironmentName}, + + [Parameter(Mandatory)] + [Alias('EventSourceName')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of the event source. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [System.String] + # Name of an Azure Resource group. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # Azure Subscription ID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [ArgumentCompleter({param ( $CommandName, $ParameterName, $WordToComplete, $CommandAst, $FakeBoundParameters ) return @('Microsoft.EventHub', 'Microsoft.IoTHub')})] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind] + # The kind of the event source. + ${Kind}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The location of the resource. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ICreateOrUpdateTrackedResourcePropertiesTags]))] + [System.Collections.Hashtable] + # Key-value pairs of additional properties for the resource. + ${Tag}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the event/iot hub's consumer group that holds the partitions from which events will be read. + ${ConsumerGroupName}, + + [Parameter(ParameterSetName='eventhub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the event hub. + ${EventHubName}, + + [Parameter(ParameterSetName='iothub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the iot hub. + ${IoTHubName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the SAS key that grants the Time Series Insights service access to the event/iot hub. + ${KeyName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The resource id of the event source in Azure Resource Manager. + ${EventSourceResourceId}, + + [Parameter(ParameterSetName='eventhub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The name of the service bus that contains the event hub. + ${ServiceBusNameSpace}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.Security.SecureString] + # The value of the shared access key that grants the Time Series Insights service read access to the event/iot hub. + ${SharedAccessKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')] + [System.String] + # The event property that will be used as the event source's timestamp. + ${TimeStampPropertyName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + + process { + try { + if ($PSBoundParameters['Kind'] -eq 'Microsoft.EventHub') { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.EventHubEventSourceCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.EventHubEventSourceCreationProperties]::new() + + $Parameter.Property.EventHubName = $PSBoundParameters['EventHubName'] + $null = $PSBoundParameters.Remove('EventHubName') + + $Parameter.Property.ServiceBusNameSpace = $PSBoundParameters['ServiceBusNameSpace'] + $null = $PSBoundParameters.Remove('ServiceBusNameSpace') + } else { + $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IoTHubEventSourceCreateOrUpdateParameters]::new() + $Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IoTHubEventSourceCreationProperties]::new() + + $Parameter.Property.IoTHubName = $PSBoundParameters['IoTHubName'] + $null = $PSBoundParameters.Remove('IoTHubName') + } + $Parameter.Kind = $PSBoundParameters['Kind'] + $null = $PSBoundParameters.Remove('Kind') + + $Parameter.Location = $PSBoundParameters['Location'] + $null = $PSBoundParameters.Remove('Location') + + $Parameter.Property.EventSourceResourceId = $PSBoundParameters['EventSourceResourceId'] + $null = $PSBoundParameters.Remove('EventSourceResourceId') + + $Parameter.Property.ConsumerGroupName = $PSBoundParameters['ConsumerGroupName'] + $null = $PSBoundParameters.Remove('ConsumerGroupName') + + $Parameter.Property.KeyName = $PSBoundParameters['KeyName'] + $null = $PSBoundParameters.Remove('KeyName') + + $Parameter.Property.SharedAccessKey = [System.Runtime.InteropServices.marshal]::PtrToStringAuto([System.Runtime.InteropServices.marshal]::SecureStringToBSTR($PSBoundParameters['SharedAccessKey'])) + $null = $PSBoundParameters.Remove('SharedAccessKey') + + if ($PSBoundParameters.ContainsKey('Tag')) { + $Parameter.Tag = $PSBoundParameters['Tag'] + $null = $PSBoundParameters.Remove('Tag') + } + + if ($PSBoundParameters.ContainsKey('TimeStampPropertyName')) { + $Parameter.Property.TimeStampPropertyName = $PSBoundParameters['TimeStampPropertyName'] + $null = $PSBoundParameters.Remove('TimeStampPropertyName') + } + + $null = $PSBoundParameters.Add('Parameter', $Parameter) + + Az.TimeSeriesInsights.internal\New-AzTimeSeriesInsightsEventSource @PSBoundParameters + } catch { + throw + } + } + + +} + \ No newline at end of file diff --git a/src/TimeSeriesInsights/custom/readme.md b/src/TimeSeriesInsights/custom/readme.md new file mode 100644 index 000000000000..72188c363c6a --- /dev/null +++ b/src/TimeSeriesInsights/custom/readme.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.TimeSeriesInsights` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.TimeSeriesInsights.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.TimeSeriesInsights` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.TimeSeriesInsights.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.TimeSeriesInsights.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.TimeSeriesInsights`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.TimeSeriesInsights`. +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.TimeSeriesInsights`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md b/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md new file mode 100644 index 000000000000..39a4ad65476b --- /dev/null +++ b/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md @@ -0,0 +1,61 @@ +--- +Module Name: Az.TimeSeriesInsights +Module Guid: 19712dc5-d904-4d19-bf3a-7a01dd02cc5d +Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.TimeSeriesInsights Module +## Description +Microsoft Azure PowerShell: TimeSeriesInsights cmdlets + +## Az.TimeSeriesInsights Cmdlets +### [Get-AzTimeSeriesInsightsAccessPolicy](Get-AzTimeSeriesInsightsAccessPolicy.md) +Gets the access policy with the specified name in the specified environment. + +### [Get-AzTimeSeriesInsightsEnvironment](Get-AzTimeSeriesInsightsEnvironment.md) +Gets the environment with the specified name in the specified subscription and resource group. + +### [Get-AzTimeSeriesInsightsEventSource](Get-AzTimeSeriesInsightsEventSource.md) +Gets the event source with the specified name in the specified environment. + +### [Get-AzTimeSeriesInsightsReferenceDataSet](Get-AzTimeSeriesInsightsReferenceDataSet.md) +Gets the reference data set with the specified name in the specified environment. + +### [New-AzTimeSeriesInsightsAccessPolicy](New-AzTimeSeriesInsightsAccessPolicy.md) +Create or update an access policy in the specified environment. + +### [New-AzTimeSeriesInsightsEnvironment](New-AzTimeSeriesInsightsEnvironment.md) +Create an environment in the specified subscription and resource group. + +### [New-AzTimeSeriesInsightsEventSource](New-AzTimeSeriesInsightsEventSource.md) +Create an event source under the specified environment. + +### [New-AzTimeSeriesInsightsReferenceDataSet](New-AzTimeSeriesInsightsReferenceDataSet.md) +Create or update a reference data set in the specified environment. + +### [Remove-AzTimeSeriesInsightsAccessPolicy](Remove-AzTimeSeriesInsightsAccessPolicy.md) +Deletes the access policy with the specified name in the specified subscription, resource group, and environment + +### [Remove-AzTimeSeriesInsightsEnvironment](Remove-AzTimeSeriesInsightsEnvironment.md) +Deletes the environment with the specified name in the specified subscription and resource group. + +### [Remove-AzTimeSeriesInsightsEventSource](Remove-AzTimeSeriesInsightsEventSource.md) +Deletes the event source with the specified name in the specified subscription, resource group, and environment + +### [Remove-AzTimeSeriesInsightsReferenceDataSet](Remove-AzTimeSeriesInsightsReferenceDataSet.md) +Deletes the reference data set with the specified name in the specified subscription, resource group, and environment + +### [Update-AzTimeSeriesInsightsAccessPolicy](Update-AzTimeSeriesInsightsAccessPolicy.md) +Updates the access policy with the specified name in the specified subscription, resource group, and environment. + +### [Update-AzTimeSeriesInsightsEnvironment](Update-AzTimeSeriesInsightsEnvironment.md) +Updates the environment with the specified name in the specified subscription and resource group. + +### [Update-AzTimeSeriesInsightsEventSource](Update-AzTimeSeriesInsightsEventSource.md) +Updates the event source with the specified name in the specified subscription, resource group, and environment. + +### [Update-AzTimeSeriesInsightsReferenceDataSet](Update-AzTimeSeriesInsightsReferenceDataSet.md) +Updates the reference data set with the specified name in the specified subscription, resource group, and environment. + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..b2c9b658e028 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Gets the access policy with the specified name in the specified environment. + +## SYNTAX + +### List (Default) +``` +Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsAccessPolicy -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets the access policy with the specified name in the specified environment. + +## EXAMPLES + +### Example 1: List all access policies under a specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +policy002 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command lists all access policies under a specified environment. + +### Example 2: Get a specified access policy +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command gets a specified access policy. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights access policy associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IAccessPolicyResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..bd07927232ed --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,251 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Gets the environment with the specified name in the specified subscription and resource group. + +## SYNTAX + +### List1 (Default) +``` +Get-AzTimeSeriesInsightsEnvironment [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName [-SubscriptionId ] + [-Expand ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsEnvironment -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +### List +``` +Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the environment with the specified name in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Get a time series insights environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command gets a time series insights environment. + +### Example 2: List all time series insights environments +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup + +DataAccessFqdn : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86.env.timeseries.azure.com +DataAccessId : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/ + tsill +IngressState : +Kind : LongTerm +Location : EastUs +Name : tsill +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 1 +SkuName : L1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageConfigurationAccountName : cdolauli +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimeSeriesIdProperty : {ccc} +Type : Microsoft.TimeSeriesInsights/Environments +WarmStoreConfigurationDataRetention : 00:00:00 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command lists all time series insights environments in a resource group. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Expand +Setting $expand=status will include the status of the internal services of the environment in the Time Series Insights service. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..28e69f50d162 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,220 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Gets the event source with the specified name in the specified environment. + +## SYNTAX + +### List (Default) +``` +Get-AzTimeSeriesInsightsEventSource -EnvironmentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsEventSource -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets the event source with the specified name in the specified environment. + +## EXAMPLES + +### Example 1: List all event sources under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 + +ConsumerGroupName : testgroup2 +EventHubName : hubname001 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.EventHub/namespaces/spacename001/eventhubs/hu + bname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/estest001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.EventHub +Location : eastus +Name : estest001 +ServiceBusNamespace : spacename001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command lists all event sources under the specified environments. + +### Example 2: Get a specified event source +```powershell +PS C:\> et-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command gets a specific event source. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights event source associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..71e32b3820d5 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,188 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/get-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# Get-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Gets the reference data set with the specified name in the specified environment. + +## SYNTAX + +### List (Default) +``` +Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzTimeSeriesInsightsReferenceDataSet -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the reference data set with the specified name in the specified environment. + +## EXAMPLES + +### Example 1: List all reference data sets under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +eastus dstest002 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command lists all reference data sets under the specified environment. + +### Get a specified reference data set +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command gets a specified reference data set. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights reference data set associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..430182482b7c --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,214 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Create or update an access policy in the specified environment. + +## SYNTAX + +``` +New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-PrincipalObjectId ] [-Role ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create or update an access policy in the specified environment. + +## EXAMPLES + +### Example 1: Create an access policy for a specified environment +```powershell +PS C:\> New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -PrincipalObjectId ce74a389-b5e8-4f16-89c7-787031ddd903 -Role Contributor -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command creates an access policy for a specified environment. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Description +An description of the access policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the access policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PrincipalObjectId +The objectId of the principal in Azure Active Directory. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Role +The list of roles the principal is assigned on the environment. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.AccessPolicyRole[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IAccessPolicyResource + +## ALIASES + +## NOTES + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..b40d12d786f4 --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,414 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Create an environment in the specified subscription and resource group. + +## SYNTAX + +### standard (Default) +``` +New-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName -Capacity + -DataRetentionTime -Kind -Location -Sku [-SubscriptionId ] + [-PartitionKeyProperty ] [-StorageLimitExceededBehavior ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### longterm +``` +New-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName -Kind -Location + -Sku -StorageAccountKey -StorageAccountName + -TimeSeriesIdProperty [-SubscriptionId ] [-Tag ] + [-WarmStoreDataRetentionTime ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create an environment in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Create a standard time series insights environment +```powershell +PS C:\> $TimeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Kind Standard -Location eastus -Sku S1 -DataRetentionTime $TimeSpan -Capacity 2 + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +Standard eastus tsitest001 2 S1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a standard time series insights environment. + +### Example 2: Create a longterm time series insights environment +```powershell +PS C:\> New-AzStorageAccount -ResourceGroupName testgroup -AccountName staccount001 -Location eastus -SkuName Standard_GRS +PS C:\> $ks = Get-AzStorageAccountKey -ResourceGroupName "testgroup" -Name "staccount001" +PS C:\> $k = $ks[0] | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest002 -Kind LongTerm -Location eastus -Sku L1 -StorageAccountName staccount001 -StorageAccountKey $k -TimeSeriesIdProperty @{name='cdc';type='string'} + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +LongTerm eastus tsitest002 1 L1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a longterm time series insights environment. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Capacity +The capacity of the sku. +For standard environments, this value can be changed to support scale out of environments after they have been created. + +```yaml +Type: System.Int32 +Parameter Sets: standard +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DataRetentionTime +The data retention time. + +```yaml +Type: System.TimeSpan +Parameter Sets: standard +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Kind +The kind of the environment. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Location +The location of the resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the environment + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PartitionKeyProperty +The list of event properties which will be used to partition data in the environment. +To construct, see NOTES section for PARTITIONKEYPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[] +Parameter Sets: standard +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Sku +The name of this SKU. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageAccountKey +The value of the management key that grants the Time Series Insights service write access to the storage account. + +```yaml +Type: System.Security.SecureString +Parameter Sets: longterm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageAccountName +The name of the storage account that will hold the environment's long term data. + +```yaml +Type: System.String +Parameter Sets: longterm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageLimitExceededBehavior +The behavior the Time Series Insights service should take when the environment's capacity has been exceeded + +```yaml +Type: System.String +Parameter Sets: standard +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -TimeSeriesIdProperty +The list of event properties which will be used to define the environment's time series id. +To construct, see NOTES section for TIMESERIESIDPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[] +Parameter Sets: longterm +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WarmStoreDataRetentionTime +ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store. + +```yaml +Type: System.TimeSpan +Parameter Sets: longterm +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### PARTITIONKEYPROPERTY : The list of event properties which will be used to partition data in the environment. + - `[Name ]`: The name of the property. + - `[Type ]`: The type of the property. + +#### TIMESERIESIDPROPERTY : The list of event properties which will be used to define the environment's time series id. + - `[Name ]`: The name of the property. + - `[Type ]`: The type of the property. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..c4507fd76bb8 --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,371 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Create an event source under the specified environment. + +## SYNTAX + +### eventhub (Default) +``` +New-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + -ConsumerGroupName -EventHubName -EventSourceResourceId -KeyName + -Kind -Location -ServiceBusNameSpace -SharedAccessKey + [-SubscriptionId ] [-Tag ] [-TimeStampPropertyName ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### iothub +``` +New-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + -ConsumerGroupName -EventSourceResourceId -IoTHubName -KeyName + -Kind -Location -SharedAccessKey [-SubscriptionId ] [-Tag ] + [-TimeStampPropertyName ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create an event source under the specified environment. + +## EXAMPLES + +### Example 1: Create an eventhub event source under the specified environment +```powershell +PS C:\> $ev = New-AzEventHub -ResourceGroupName testgroup2 -NamespaceName spacename001 -Name hubname001 -MessageRetentionInDays 3 -PartitionCount 2 +PS C:\> $ks = Get-AzEventHubKey -ResourceGroupName testgroup2 -NamespaceName spacename001 -AuthorizationRuleName RootManageSharedAccessKey +PS C:\> $k = $ks.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name estest001 -EnvironmentName tsitest001 -Kind Microsoft.EventHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -ServiceBusNameSpace spacename001 -EventHubName hubname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Kind Location Name Type +---- -------- ---- ---- +Microsoft.EventHub eastus estest001 Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command creates an eventhub event source under the specified environment. + +### Example 2: Create an iothub event source under the specified environment +```powershell +PS C:\> $ev = New-AzIotHub -ResourceGroupName testgroup2 -Location eastus -Name iotname001 -SkuName S1 -Units 100 +PS C:\> $ks = Get-AzIotHubKey -ResourceGroupName testgroup2 -Name iotname001 +PS C:\> $k = $ks[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name iots001 +-EnvironmentName tsitest001 -Kind Microsoft.IoTHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -IoTHubName iotname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Location Name Type Kind +-------- ---- ---- ---- +eastus iots001 Microsoft.TimeSeriesInsights/Environments/EventSources Microsoft.IoTHub +``` + +This command creates an iothub event source under the specified environment. + +## PARAMETERS + +### -ConsumerGroupName +The name of the event/iot hub's consumer group that holds the partitions from which events will be read. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EventHubName +The name of the event hub. + +```yaml +Type: System.String +Parameter Sets: eventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EventSourceResourceId +The resource id of the event source in Azure Resource Manager. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -IoTHubName +The name of the iot hub. + +```yaml +Type: System.String +Parameter Sets: iothub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -KeyName +The name of the SAS key that grants the Time Series Insights service access to the event/iot hub. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Kind +The kind of the event source. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Location +The location of the resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the event source. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ServiceBusNameSpace +The name of the service bus that contains the event hub. + +```yaml +Type: System.String +Parameter Sets: eventhub +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SharedAccessKey +The value of the shared access key that grants the Time Series Insights service read access to the event/iot hub. + +```yaml +Type: System.Security.SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -TimeStampPropertyName +The event property that will be used as the event source's timestamp. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource + +## ALIASES + +## NOTES + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..dbdcd7485872 --- /dev/null +++ b/src/TimeSeriesInsights/docs/New-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,242 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# New-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Create or update a reference data set in the specified environment. + +## SYNTAX + +``` +New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name -ResourceGroupName + -KeyProperty -Location [-SubscriptionId ] + [-DataStringComparisonBehavior ] [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create or update a reference data set in the specified environment. + +## EXAMPLES + +### Example 1: Create a reference data set for a specified environment +```powershell +PS C:\> $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} +PS C:\> New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Location eastus -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command creates a reference data set for a specific environment. + +## PARAMETERS + +### -DataStringComparisonBehavior +The reference data set key comparison behavior can be set using this property. +By default, the value is 'Ordinal' - which means case sensitive key comparison will be performed while joining reference data with events or while adding new reference data. +When 'OrdinalIgnoreCase' is set, case insensitive comparison will be used. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.DataStringComparisonBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -KeyProperty +The list of key properties for the reference data set. +To construct, see NOTES section for KEYPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetKeyProperty[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Location +The location of the resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +Name of the reference data set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the resource. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### KEYPROPERTY : The list of key properties for the reference data set. + - `[Name ]`: The name of the key property. + - `[Type ]`: The type of the key property. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..627b4f5b080c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,216 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Deletes the access policy with the specified name in the specified subscription, resource group, and environment + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsAccessPolicy -InputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the access policy with the specified name in the specified subscription, resource group, and environment + +## EXAMPLES + +### Example 1: Remove a specified access policy +```powershell +PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup + +``` + +This command removes a specified access policy. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights access policy associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..5dd00eca1b5c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Deletes the environment with the specified name in the specified subscription and resource group. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsEnvironment -InputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the environment with the specified name in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Remove a time series insights environment +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill + +``` + +This command removes a time series insights environment. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..8c4b37446b5f --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,216 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Deletes the event source with the specified name in the specified subscription, resource group, and environment + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsEventSource -InputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the event source with the specified name in the specified subscription, resource group, and environment + +## EXAMPLES + +### Example 1: Remove a specified event source +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup + +``` + +This removes a specific event source. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights event source associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..c7c8deae209c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,217 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/remove-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# Remove-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Deletes the reference data set with the specified name in the specified subscription, resource group, and environment + +## SYNTAX + +### Delete (Default) +``` +Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzTimeSeriesInsightsReferenceDataSet -InputObject + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the reference data set with the specified name in the specified subscription, resource group, and environment + +## EXAMPLES + +### Example 1: Remove a specified reference data set +```powershell +PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup + +``` + +This command removes a specified reference data set. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights reference data set associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### System.Boolean + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..2bdfda120a6c --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,236 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightsaccesspolicy +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsAccessPolicy + +## SYNOPSIS +Updates the access policy with the specified name in the specified subscription, resource group, and environment. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-Role ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsAccessPolicy -InputObject [-Description ] + [-Role ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the access policy with the specified name in the specified subscription, resource group, and environment. + +## EXAMPLES + +### Example 1: Update a specified access policy +```powershell +PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup -Role Contributor,Reader + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command updates a specified access policy. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Description +An description of the access policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights access policy associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: AccessPolicyName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Role +The list of roles the principal is assigned on the environment. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.AccessPolicyRole[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IAccessPolicyResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..b6141ca0943b --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,355 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightsenvironment +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsEnvironment + +## SYNOPSIS +Updates the environment with the specified name in the specified subscription and resource group. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsEnvironment -Name -ResourceGroupName [-SubscriptionId ] + [-Capacity ] [-DataRetentionTime ] [-PartitionKeyProperty ] + [-Sku ] [-StorageLimitExceededBehavior ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsEnvironment -InputObject [-Capacity ] + [-DataRetentionTime ] [-PartitionKeyProperty ] [-Sku ] + [-StorageLimitExceededBehavior ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the environment with the specified name in the specified subscription and resource group. + +## EXAMPLES + +### Example 1: Update a standard time series insights environment +```powershell +PS C:\> Update-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Capacity 5 -Sku S1 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 5 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command updates a standard time series insights environment. + +### Example 2: {{ Api definition for update a longterm environment is missing in swagger and should be added in the future}} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Capacity +The capacity of the sku. +For standard environments, this value can be changed to support scale out of environments after they have been created. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DataRetentionTime +ISO8601 timespan specifying the minimum number of days the environment's events will be available for query. + +```yaml +Type: System.TimeSpan +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: EnvironmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -PartitionKeyProperty +The list of event properties which will be used to partition data in the environment. +To construct, see NOTES section for PARTITIONKEYPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Sku +The name of this SKU. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.SkuName +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -StorageLimitExceededBehavior +The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. +If "PauseIngress" is specified, new events will not be read from the event source. +If "PurgeOldData" is specified, new events will continue to be read and old events will be deleted from the environment. +The default behavior is PurgeOldData. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.StorageLimitExceededBehavior +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the environment. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +#### PARTITIONKEYPROPERTY : The list of event properties which will be used to partition data in the environment. + - `[Name ]`: The name of the property. + - `[Type ]`: The type of the property. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..fe5013c066ea --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,228 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightseventsource +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsEventSource + +## SYNOPSIS +Updates the event source with the specified name in the specified subscription, resource group, and environment. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsEventSource -EnvironmentName -Name -ResourceGroupName + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsEventSource -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the event source with the specified name in the specified subscription, resource group, and environment. + +## EXAMPLES + +### Example 1: Update a specified event source +```powershell +PS C:\> Update-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup -Tag @{"tgk"="001"} + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eventsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command updates a specific event source. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights event source associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: EventSourceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the event source. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..692a916fcbf5 --- /dev/null +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,220 @@ +--- +external help file: +Module Name: Az.TimeSeriesInsights +online version: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/update-aztimeseriesinsightsreferencedataset +schema: 2.0.0 +--- + +# Update-AzTimeSeriesInsightsReferenceDataSet + +## SYNOPSIS +Updates the reference data set with the specified name in the specified subscription, resource group, and environment. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName -Name + -ResourceGroupName [-SubscriptionId ] [-Tag ] [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzTimeSeriesInsightsReferenceDataSet -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the reference data set with the specified name in the specified subscription, resource group, and environment. + +## EXAMPLES + +### Example 1: Update a specified reference data set +```powershell +PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Tag @{"tstg"="lb001"} + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command updates a specified reference data set. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -EnvironmentName +The name of the Time Series Insights environment associated with the specified resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +Dynamic: False +``` + +### -Name +The name of the Time Series Insights reference data set associated with the specified environment. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ReferenceDataSetName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -ResourceGroupName +Name of an Azure Resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -SubscriptionId +Azure Subscription ID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Tag +Key-value pairs of additional properties for the reference data set. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +Dynamic: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.ITimeSeriesInsightsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IReferenceDataSetResource + +## ALIASES + +## NOTES + +### COMPLEX PARAMETER PROPERTIES +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +#### INPUTOBJECT : Identity Parameter + - `[AccessPolicyName ]`: Name of the access policy. + - `[EnvironmentName ]`: Name of the environment + - `[EventSourceName ]`: The name of the Time Series Insights event source associated with the specified environment. + - `[Id ]`: Resource identity path + - `[ReferenceDataSetName ]`: Name of the reference data set. + - `[ResourceGroupName ]`: Name of an Azure Resource group. + - `[SubscriptionId ]`: Azure Subscription ID. + +## RELATED LINKS + diff --git a/src/TimeSeriesInsights/docs/readme.md b/src/TimeSeriesInsights/docs/readme.md new file mode 100644 index 000000000000..8f5f212dd65a --- /dev/null +++ b/src/TimeSeriesInsights/docs/readme.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.TimeSeriesInsights` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overriden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.TimeSeriesInsights` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..74c0a342fc1b --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,22 @@ +### Example 1: List all access policies under a specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +policy002 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command lists all access policies under a specified environment. + +### Example 2: Get a specified access policy +```powershell +PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command gets a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..c23a9307cb4e --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,80 @@ +### Example 1: Get a time series insights environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command gets a time series insights environment. + +### Example 2: List all time series insights environments +```powershell +PS C:\> Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup + +DataAccessFqdn : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86.env.timeseries.azure.com +DataAccessId : 3de1d1e1-4f9b-4bc6-aad3-a835597dcd86 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/ + tsill +IngressState : +Kind : LongTerm +Location : EastUs +Name : tsill +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 1 +SkuName : L1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageConfigurationAccountName : cdolauli +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimeSeriesIdProperty : {ccc} +Type : Microsoft.TimeSeriesInsights/Environments +WarmStoreConfigurationDataRetention : 00:00:00 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 2 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command lists all time series insights environments in a resource group. + diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..6637ce338d89 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,55 @@ +### Example 1: List all event sources under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 + +ConsumerGroupName : testgroup2 +EventHubName : hubname001 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.EventHub/namespaces/spacename001/eventhubs/hu + bname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/estest001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.EventHub +Location : eastus +Name : estest001 +ServiceBusNamespace : spacename001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command lists all event sources under the specified environments. + +### Example 2: Get a specified event source +```powershell +PS C:\> et-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eve + ntsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command gets a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..387b9bb9a1da --- /dev/null +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,22 @@ +### Example 1: List all reference data sets under the specified environment +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +eastus dstest002 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command lists all reference data sets under the specified environment. + +### Get a specified reference data set +```powershell +PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command gets a specified reference data set. diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..090c9a3ff894 --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,10 @@ +### Example 1: Create an access policy for a specified environment +```powershell +PS C:\> New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -PrincipalObjectId ce74a389-b5e8-4f16-89c7-787031ddd903 -Role Contributor -Name policy001 + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command creates an access policy for a specified environment. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..ca63b050201a --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,25 @@ +### Example 1: Create a standard time series insights environment +```powershell +PS C:\> $TimeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Kind Standard -Location eastus -Sku S1 -DataRetentionTime $TimeSpan -Capacity 2 + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +Standard eastus tsitest001 2 S1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a standard time series insights environment. + +### Example 2: Create a longterm time series insights environment +```powershell +PS C:\> New-AzStorageAccount -ResourceGroupName testgroup -AccountName staccount001 -Location eastus -SkuName Standard_GRS +PS C:\> $ks = Get-AzStorageAccountKey -ResourceGroupName "testgroup" -Name "staccount001" +PS C:\> $k = $ks[0] | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest002 -Kind LongTerm -Location eastus -Sku L1 -StorageAccountName staccount001 -StorageAccountKey $k -TimeSeriesIdProperty @{name='cdc';type='string'} + +Kind Location Name SkuCapacity SkuName Type +---- -------- ---- ----------- ------- ---- +LongTerm eastus tsitest002 1 L1 Microsoft.TimeSeriesInsights/Environments +``` + +This command creates a longterm time series insights environment. diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..61191fa4a568 --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,29 @@ +### Example 1: Create an eventhub event source under the specified environment +```powershell +PS C:\> $ev = New-AzEventHub -ResourceGroupName testgroup2 -NamespaceName spacename001 -Name hubname001 -MessageRetentionInDays 3 -PartitionCount 2 +PS C:\> $ks = Get-AzEventHubKey -ResourceGroupName testgroup2 -NamespaceName spacename001 -AuthorizationRuleName RootManageSharedAccessKey +PS C:\> $k = $ks.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name estest001 -EnvironmentName tsitest001 -Kind Microsoft.EventHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -ServiceBusNameSpace spacename001 -EventHubName hubname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Kind Location Name Type +---- -------- ---- ---- +Microsoft.EventHub eastus estest001 Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command creates an eventhub event source under the specified environment. + +### Example 2: Create an iothub event source under the specified environment +```powershell +PS C:\> $ev = New-AzIotHub -ResourceGroupName testgroup2 -Location eastus -Name iotname001 -SkuName S1 -Units 100 +PS C:\> $ks = Get-AzIotHubKey -ResourceGroupName testgroup2 -Name iotname001 +PS C:\> $k = $ks[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force +PS C:\> New-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -Name iots001 +-EnvironmentName tsitest001 -Kind Microsoft.IoTHub -ConsumerGroupName testgroup2 -Location eastus -KeyName RootManageSharedAccessKey -IoTHubName iotname001 -EventSourceResourceId $ev.id -SharedAccessKey $k + +Location Name Type Kind +-------- ---- ---- ---- +eastus iots001 Microsoft.TimeSeriesInsights/Environments/EventSources Microsoft.IoTHub +``` + +This command creates an iothub event source under the specified environment. + diff --git a/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..a6c1ae864bd7 --- /dev/null +++ b/src/TimeSeriesInsights/examples/New-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,11 @@ +### Example 1: Create a reference data set for a specified environment +```powershell +PS C:\> $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} +PS C:\> New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Location eastus -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command creates a reference data set for a specific environment. diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..eaeefc5cc207 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,7 @@ +### Example 1: Remove a specified access policy +```powershell +PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup + +``` + +This command removes a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..ce2200de7176 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,8 @@ +### Example 1: Remove a time series insights environment +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill + +``` + +This command removes a time series insights environment. + diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..7be0d3d3e122 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,8 @@ +### Example 1: Remove a specified event source +```powershell +PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup + +``` + +This removes a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..1a4a36127f2f --- /dev/null +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,7 @@ +### Example 1: Remove a specified reference data set +```powershell +PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup + +``` + +This command removes a specified reference data set. diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md new file mode 100644 index 000000000000..540616982f45 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md @@ -0,0 +1,10 @@ +### Example 1: Update a specified access policy +```powershell +PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup -Role Contributor,Reader + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command updates a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md new file mode 100644 index 000000000000..c0d587b4d08b --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md @@ -0,0 +1,38 @@ +### Example 1: Update a standard time series insights environment +```powershell +PS C:\> Update-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 -Capacity 5 -Sku S1 + +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 5 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command updates a standard time series insights environment. + +### Example 2: {{ Api definition for update a longterm environment is missing in swagger and should be added in the future}} +```powershell +PS C:\> {{ Add code here }} + +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md new file mode 100644 index 000000000000..df6267a75b30 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md @@ -0,0 +1,19 @@ +### Example 1: Update a specified event source +```powershell +PS C:\> Update-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup -Tag @{"tgk"="001"} + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eventsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command updates a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md new file mode 100644 index 000000000000..c62470c92a46 --- /dev/null +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md @@ -0,0 +1,10 @@ +### Example 1: Update a specified reference data set +```powershell +PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Tag @{"tstg"="lb001"} + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command updates a specified reference data set. diff --git a/src/TimeSeriesInsights/readme.md b/src/TimeSeriesInsights/readme.md new file mode 100644 index 000000000000..bb18d5bfb834 --- /dev/null +++ b/src/TimeSeriesInsights/readme.md @@ -0,0 +1,129 @@ + +# Az.TimeSeriesInsights +This directory contains the PowerShell module for the TimeSeriesInsights service. + +--- +## Status +[![Az.TimeSeriesInsights](https://img.shields.io/powershellgallery/v/Az.TimeSeriesInsights.svg?style=flat-square&label=Az.TimeSeriesInsights "Az.TimeSeriesInsights")](https://www.powershellgallery.com/packages/Az.TimeSeriesInsights/) + +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 1.7.2 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.TimeSeriesInsights`, see [how-to.md](how-to.md). + + +--- +## Generation Requirements +Use of the beta version of `autorest.powershell` generator requires the following: +- [NodeJS LTS](https://nodejs.org) (10.15.x LTS preferred) + - **Note**: It *will not work* with Node < 10.x. Using 11.x builds may cause issues as they may introduce instability or breaking changes. +> If you want an easy way to install and update Node, [NVS - Node Version Switcher](../nodejs/installing-via-nvs.md) or [NVM - Node Version Manager](../nodejs/installing-via-nvm.md) is recommended. +- [AutoRest](https://aka.ms/autorest) v3 beta
`npm install -g autorest@autorest`
  +- PowerShell 6.0 or greater + - If you don't have it installed, you can use the cross-platform npm package
`npm install -g pwsh`
  +- .NET Core SDK 2.0 or greater + - If you don't have it installed, you can use the cross-platform npm package
`npm install -g dotnet-sdk-2.2`
  + +## Run Generation +In this directory, run AutoRest: +> `autorest-beta` + +--- +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../readme.azure.noprofile.md +input-file: + - $(repo)/specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/preview/2018-08-15-preview/timeseriesinsights.json + +module-version: 0.0.1 +title: TimeSeriesInsights +subject-prefix: $(service-name) + +directive: + # Fix errors in swagger + - from: swagger-document + where: $ + transform: return $.replace(/Microsoft.IotHub/g, "Microsoft.IoTHub") + - from: swagger-document + where: $ + transform: return $.replace(/\/eventSources\//g, "/eventsources/") + - from: swagger-document + where: $ + transform: return $.replace(/\/accessPolicies\//g, "/accesspolicies/") + # Remove the unneeded parameter set + - where: + variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ + remove: true + - where: + subject: ReferenceDataSet|AccessPolicy + variant: ^Create$ + remove: true + - where: + subject: EventSource|Environment + variant: ^Create$|^CreateExpanded$ + hide: true + # Remove the set-* cmdlet + - where: + verb: Set + remove: true + # Hide the operation cmdlet + - where: + subject: Operation + hide: true + # correct some names + - where: + parameter-name: SkuCapacity + set: + parameter-name: Capacity + - where: + parameter-name: SkuName + set: + parameter-name: Sku + # Suppress the table format + - where: + model-name: StandardEnvironmentResource + set: + suppress-format: true + - where: + model-name: LongTermEnvironmentResource + set: + suppress-format: true + - where: + model-name: EventHubEventSourceResource + set: + suppress-format: true + - where: + model-name: IoTHubEventSourceResource + set: + suppress-format: true + # Correct some generated code + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IStandardEnvironmentCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IStandardEnvironmentCreationProperties Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ILongTermEnvironmentCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ILongTermEnvironmentCreationProperties Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventHubEventSourceCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventHubEventSourceCreationProperties Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IIoTHubEventSourceCreationProperties Property', 'public Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IIoTHubEventSourceCreationProperties Property'); +``` From 51abc0445e19be58ba5ee7cc24f2e237f5c7bb75 Mon Sep 17 00:00:00 2001 From: LucasYao93 Date: Thu, 2 Apr 2020 05:48:57 -0700 Subject: [PATCH 3/7] Add test cases for timeseriesinsights --- .../Az.TimeSeriesInsights-TestResults.xml | 173 +++++++ ...eSeriesInsightsAccessPolicy.Recording.json | 158 ++++++ ...AzTimeSeriesInsightsAccessPolicy.Tests.ps1 | 30 ++ ...meSeriesInsightsEnvironment.Recording.json | 158 ++++++ ...-AzTimeSeriesInsightsEnvironment.Tests.ps1 | 29 ++ ...meSeriesInsightsEventSource.Recording.json | 158 ++++++ ...-AzTimeSeriesInsightsEventSource.Tests.ps1 | 30 ++ ...iesInsightsReferenceDataSet.Recording.json | 158 ++++++ ...meSeriesInsightsReferenceDataSet.Tests.ps1 | 30 ++ ...eSeriesInsightsAccessPolicy.Recording.json | 201 ++++++++ ...AzTimeSeriesInsightsAccessPolicy.Tests.ps1 | 30 ++ ...meSeriesInsightsEnvironment.Recording.json | 320 ++++++++++++ ...-AzTimeSeriesInsightsEnvironment.Tests.ps1 | 47 ++ ...meSeriesInsightsEventSource.Recording.json | 162 ++++++ ...-AzTimeSeriesInsightsEventSource.Tests.ps1 | 48 ++ ...iesInsightsReferenceDataSet.Recording.json | 43 ++ ...meSeriesInsightsReferenceDataSet.Tests.ps1 | 23 + ...eSeriesInsightsAccessPolicy.Recording.json | 197 ++++++++ ...AzTimeSeriesInsightsAccessPolicy.Tests.ps1 | 33 ++ ...meSeriesInsightsEnvironment.Recording.json | 195 +++++++ ...-AzTimeSeriesInsightsEnvironment.Tests.ps1 | 29 ++ ...meSeriesInsightsEventSource.Recording.json | 195 +++++++ ...-AzTimeSeriesInsightsEventSource.Tests.ps1 | 31 ++ ...iesInsightsReferenceDataSet.Recording.json | 279 ++++++++++ ...meSeriesInsightsReferenceDataSet.Tests.ps1 | 40 ++ ...eSeriesInsightsAccessPolicy.Recording.json | 201 ++++++++ ...AzTimeSeriesInsightsAccessPolicy.Tests.ps1 | 34 ++ ...meSeriesInsightsEnvironment.Recording.json | 478 ++++++++++++++++++ ...-AzTimeSeriesInsightsEnvironment.Tests.ps1 | 50 ++ ...meSeriesInsightsEventSource.Recording.json | 123 +++++ ...-AzTimeSeriesInsightsEventSource.Tests.ps1 | 38 ++ ...iesInsightsReferenceDataSet.Recording.json | 201 ++++++++ ...meSeriesInsightsReferenceDataSet.Tests.ps1 | 40 ++ src/TimeSeriesInsights/test/env.json | 42 ++ src/TimeSeriesInsights/test/exec-test.ps1 | 72 +++ src/TimeSeriesInsights/test/helper.ps1 | 111 ++++ src/TimeSeriesInsights/test/loadEnv.ps1 | 28 + src/TimeSeriesInsights/test/readme.md | 17 + src/TimeSeriesInsights/test/utils.ps1 | 149 ++++++ 39 files changed, 4381 insertions(+) create mode 100644 src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json create mode 100644 src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json create mode 100644 src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json create mode 100644 src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json create mode 100644 src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 create mode 100644 src/TimeSeriesInsights/test/env.json create mode 100644 src/TimeSeriesInsights/test/exec-test.ps1 create mode 100644 src/TimeSeriesInsights/test/helper.ps1 create mode 100644 src/TimeSeriesInsights/test/loadEnv.ps1 create mode 100644 src/TimeSeriesInsights/test/readme.md create mode 100644 src/TimeSeriesInsights/test/utils.ps1 diff --git a/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml b/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml new file mode 100644 index 000000000000..a5fcf35b6902 --- /dev/null +++ b/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json new file mode 100644 index 000000000000..e2665f8ac84b --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -0,0 +1,158 @@ +{ + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "375839ab-258d-49a8-b6ea-8a1e2e7dc011" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ed88bb0c-5792-49a9-9062-f61400acba11" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "278bb98b-9033-45f5-8300-c372de0e1a02" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113147Z:278bb98b-9033-45f5-8300-c372de0e1a02" ], + "Date": [ "Thu, 02 Apr 2020 11:31:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "378" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" + } + }, + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "43c6ba87-619d-45ca-b67a-f30c7b49c12f" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "919670c2-fa6a-4ba8-a39c-5f47333859ed" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "70713022-0e53-48aa-8950-ea51c3c23b27" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113148Z:70713022-0e53-48aa-8950-ea51c3c23b27" ], + "Date": [ "Thu, 02 Apr 2020 11:31:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "366" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + }, + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "310003bf-3b8f-4e19-8fb7-f9eb5de19b85" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "362683e7-ac93-4f21-bfe0-016d998b1c5b" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "3aa70351-ae48-44b7-950e-3bb7e619f6eb" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113148Z:3aa70351-ae48-44b7-950e-3bb7e619f6eb" ], + "Date": [ "Thu, 02 Apr 2020 11:31:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "366" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + }, + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "bebaa654-0a4e-42f3-8f9f-7beb7ed97cb8" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ec2ce78a-08ea-4b6a-980d-5dee62a5a219" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "b61b675f-b9a0-4251-8808-6535b1cebe59" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113149Z:b61b675f-b9a0-4251-8808-6535b1cebe59" ], + "Date": [ "Thu, 02 Apr 2020 11:31:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "366" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 new file mode 100644 index 000000000000..fe5575581069 --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 @@ -0,0 +1,30 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzTimeSeriesInsightsAccessPolicy.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Get-AzTimeSeriesInsightsAccessPolicy' { + It 'List' { + $policyList = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup + $policyList.Count | Should -Be 1 + } + + It 'Get' { + $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -Name $env.accessPolicy + $policy.Name | Should -Be $env.accessPolicy + } + + It 'GetViaIdentity' { + $policy01 = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -Name $env.accessPolicy + $policy = Get-AzTimeSeriesInsightsAccessPolicy -InputObject $policy01 + $policy.Name | Should -Be $env.accessPolicy + } +} diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json new file mode 100644 index 000000000000..7db00c8af731 --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json @@ -0,0 +1,158 @@ +{ + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "7178266c-eb9d-4164-8f16-4ee7ce2888ee" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "7517ae6e-7242-4b49-8d3a-68e4b04d6abc" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "c5b72f03-572e-4da4-99cc-e2aea1b0960a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113535Z:c5b72f03-572e-4da4-99cc-e2aea1b0960a" ], + "Date": [ "Thu, 02 Apr 2020 11:35:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1407" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" + } + }, + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "a99262e2-1c84-4cdd-b7cc-11ab024dcfde" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "20c49fd3-f469-4076-88d1-4a2a8581df4e" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "27ee4352-bc4e-4997-ac5a-5851bd1d2072" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113535Z:27ee4352-bc4e-4997-ac5a-5851bd1d2072" ], + "Date": [ "Thu, 02 Apr 2020 11:35:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "693" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+InputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "598d313f-510b-4976-8b9e-0f4aed701008" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "c1aeef69-ec12-4d50-9de9-e44c44bd4bca" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "fdc2aeec-1936-4b84-90b0-09a54086c928" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113536Z:fdc2aeec-1936-4b84-90b0-09a54086c928" ], + "Date": [ "Thu, 02 Apr 2020 11:35:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "701" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+InputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "34f20ae4-6416-4e00-a4d3-60246790630f" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8d9042a9-4cd0-4f72-8b37-80643a959c60" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "9434ed58-3729-4610-a76d-458ad800f8d5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113536Z:9434ed58-3729-4610-a76d-458ad800f8d5" ], + "Date": [ "Thu, 02 Apr 2020 11:35:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "701" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Tests.ps1 b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Tests.ps1 new file mode 100644 index 000000000000..5cdb1d4a6539 --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Tests.ps1 @@ -0,0 +1,29 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzTimeSeriesInsightsEnvironment.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Get-AzTimeSeriesInsightsEnvironment' { + It 'List' { + $tsiList = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup + $tsiList.Count | Should -Be 2 + } + + It 'Get' { + $tsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.tsiEnvName + $tsiEnv.Name | Should -Be $env.tsiEnvName + } + It 'InputObject' { + $tsiEnv01 = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.tsiEnvName01 + $tsiEnv = Get-AzTimeSeriesInsightsEnvironment -InputObject $tsiEnv01 + $tsiEnv.Name | Should -Be $env.tsiEnvName01 + } +} diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json new file mode 100644 index 000000000000..4ac7fa34b6bf --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json @@ -0,0 +1,158 @@ +{ + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventSources?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventSources?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "c3bc31fb-3d2c-4677-a50b-e7aaaf27986f" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "da76b103-0503-4ba4-93ee-8d7455bcb942" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "2db69788-de78-44b9-996b-99785e690cfe" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113623Z:2db69788-de78-44b9-996b-99785e690cfe" ], + "Date": [ "Thu, 02 Apr 2020 11:36:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "794" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}]}" + } + }, + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "924e9090-2812-4faf-aa34-d1e95906147d" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "960a4d27-662d-43f9-b0c0-85a3dde6ccaf" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "9c596075-1757-4843-99c9-98b4520b736b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113624Z:9c596075-1757-4843-99c9-98b4520b736b" ], + "Date": [ "Thu, 02 Apr 2020 11:36:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "782" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "61befd48-beb6-4be0-b131-1e436d8e8ceb" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4351ea86-645f-45db-90b4-a69aa3e67a00" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "6e09e1c1-2029-4db4-ba0b-9d0c521756a5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113624Z:6e09e1c1-2029-4db4-ba0b-9d0c521756a5" ], + "Date": [ "Thu, 02 Apr 2020 11:36:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "782" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "63bdf504-7e92-49dc-b052-e1486cc46a73" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "63f14e2e-0bda-48ce-8165-4e2ab8dbf91a" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "57914beb-f7dd-454b-88e9-320f8ff62e2d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113625Z:57914beb-f7dd-454b-88e9-320f8ff62e2d" ], + "Date": [ "Thu, 02 Apr 2020 11:36:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "782" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Tests.ps1 b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Tests.ps1 new file mode 100644 index 000000000000..421d0fc75dfd --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Tests.ps1 @@ -0,0 +1,30 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzTimeSeriesInsightsEventSource.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Get-AzTimeSeriesInsightsEventSource' { + It 'List' { + $tsiEventSorceList = Get-AzTimeSeriesInsightsEventSource -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup + $tsiEventSorceList.Count | Should -Be 1 + } + + It 'Get' { + $getTsiEventSorce = Get-AzTimeSeriesInsightsEventSource -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -Name $env.tsiEsName + $getTsiEventSorce.Name | Should -Be $env.tsiEsName + } + + It 'GetViaIdentity' { + $getTsiEventSorce01 = Get-AzTimeSeriesInsightsEventSource -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -Name $env.tsiEsName + $getTsiEventSorce = Get-AzTimeSeriesInsightsEventSource -InputObject $getTsiEventSorce01 + $getTsiEventSorce.Name | Should -Be $getTsiEventSorce01.Name + } +} diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json new file mode 100644 index 000000000000..36678d33606c --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -0,0 +1,158 @@ +{ + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "54f10b92-b6d6-4b62-b523-07071e0905b1" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "3197a7b8-4961-444c-83f8-4608ec0fce0a" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "4ab01061-72eb-4b6a-9f6a-578b471201dc" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113828Z:4ab01061-72eb-4b6a-9f6a-578b471201dc" ], + "Date": [ "Thu, 02 Apr 2020 11:38:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "513" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}]}" + } + }, + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "63365e20-9a36-4a51-a425-f1682d8d6e86" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8e4360ba-e9ec-4b8f-a75b-e382805b3c5d" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "f9eadf90-5fc4-423d-a4f0-81204e589b5c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113828Z:f9eadf90-5fc4-423d-a4f0-81204e589b5c" ], + "Date": [ "Thu, 02 Apr 2020 11:38:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "501" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "fff42755-c1ae-4bde-9774-18c5eaf07061" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8d39315c-0488-4902-8d71-6a0439abf508" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "e5df59c1-c31e-4d35-a5d7-f0a3207d1178" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113829Z:e5df59c1-c31e-4d35-a5d7-f0a3207d1178" ], + "Date": [ "Thu, 02 Apr 2020 11:38:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "501" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "8983476f-d219-4bb2-b2e9-579e518be3a3" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "a233edc7-394c-4ff1-9073-c9256defc9e9" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "a66cfbdf-f23a-4646-990f-ff27a138c3fc" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113829Z:a66cfbdf-f23a-4646-990f-ff27a138c3fc" ], + "Date": [ "Thu, 02 Apr 2020 11:38:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "501" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 new file mode 100644 index 000000000000..af93528ca384 --- /dev/null +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 @@ -0,0 +1,30 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Get-AzTimeSeriesInsightsReferenceDataSet' { + It 'List' { + $tsiDsList = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup + $tsiDsList.Count | Should -Be 1 + } + + It 'Get' { + $tsiDs = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -ReferenceDataSetName $env.referenceDataSet + $tsiDs.Name | Should -be $env.referenceDataSet + } + + It 'GetViaIdentity' { + $tsiDs01 = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -ReferenceDataSetName $env.referenceDataSet + $tsiDs = Get-AzTimeSeriesInsightsReferenceDataSet -InputObject $tsiDs01 + $tsiDs.Name | Should -be $env.referenceDataSet + } +} diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json new file mode 100644 index 000000000000..937dad009166 --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -0,0 +1,201 @@ +{ + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "c02697b8-8374-44f8-8f18-da22221fe56b" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "161" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bebaee53-76c3-4fce-9cb5-0fe8cf287302" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "9a58e680-1717-40bc-9d25-36c0ea5c01ea" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113937Z:9a58e680-1717-40bc-9d25-36c0ea5c01ea" ], + "Date": [ "Thu, 02 Apr 2020 11:39:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "654" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"2020-04-02T11:39:35+00:00\",\"provisioningState\":\"Accepted\",\"dataAccessId\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf\",\"dataAccessFqdn\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\",\"storageLimitExceededBehavior\":\"PurgeOldData\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur\",\"name\":\"rstr-h5qvur\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1", "2" ], + "x-ms-client-request-id": [ "c02697b8-8374-44f8-8f18-da22221fe56b", "c02697b8-8374-44f8-8f18-da22221fe56b" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e1dcc0ab-7c39-4b60-a28e-96b90e86dd95" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "d9ba15f0-e9d3-44da-9db0-05d58852d697" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114008Z:d9ba15f0-e9d3-44da-9db0-05d58852d697" ], + "Date": [ "Thu, 02 Apr 2020 11:40:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:39:35 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf\",\"dataAccessFqdn\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur\",\"name\":\"rstr-h5qvur\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1", "2", "3" ], + "x-ms-client-request-id": [ "c02697b8-8374-44f8-8f18-da22221fe56b", "c02697b8-8374-44f8-8f18-da22221fe56b", "c02697b8-8374-44f8-8f18-da22221fe56b" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "819ad231-1b16-4c1b-8796-a9ff24896dfb" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "b1758931-0d38-4166-943b-090f12d1f466" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114008Z:b1758931-0d38-4166-943b-090f12d1f466" ], + "Date": [ "Thu, 02 Apr 2020 11:40:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:39:35 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf\",\"dataAccessFqdn\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur\",\"name\":\"rstr-h5qvur\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview+4": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview", + "Content": "{\n \"properties\": {\n \"principalObjectId\": \"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\n \"roles\": [ \"Reader\" ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "d222322e-8db8-479f-967d-f46789161e38" ], + "CommandName": [ "New-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsAccessPolicy_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "116" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "48791c06-4b3c-47aa-a83a-1d987c14ca3e" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "e15e8e74-4100-406c-a355-d2a63640e234" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114009Z:e15e8e74-4100-406c-a355-d2a63640e234" ], + "Date": [ "Thu, 02 Apr 2020 11:40:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "362" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92\",\"name\":\"rstr-b10a92\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + }, + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "8d46e7d4-e0be-42c5-8cec-ec2de623702e" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "3f83756e-f543-4891-81c0-79db07f5000a" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "e0db5095-e947-4aea-97ba-96a31eaaa18d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114009Z:e0db5095-e947-4aea-97ba-96a31eaaa18d" ], + "Date": [ "Thu, 02 Apr 2020 11:40:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "362" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92\",\"name\":\"rstr-b10a92\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 new file mode 100644 index 000000000000..ad30e692a18b --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 @@ -0,0 +1,30 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) + +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzTimeSeriesInsightsAccessPolicy.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzTimeSeriesInsightsAccessPolicy' { + It 'CreateExpanded' { + $kind = 'Standard' + $sku01 = 'S1' + $timeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 + $capacity = 2 + $environmentName = $env.rstrenv01 + New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName -Kind $kind -Location $env.location -Sku $sku01 -DataRetentionTime $timeSpan -Capacity $capacity + + $role = 'Reader' + $accessPolicyName = $env.rstrap01 + New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup -PrincipalObjectId $env.principalObjectId -Role $role -Name $env.rstrap01 + $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup -Name $accessPolicyName + $policy.Name | Should -Be $accessPolicyName + } +} diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json new file mode 100644 index 000000000000..971e9114ce3f --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json @@ -0,0 +1,320 @@ +{ + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "a73d44e6-5dd4-4884-9a55-4952c36c726f" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "161" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "91f31d59-c097-48b4-9e16-6e59a7e341c1" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "7f734dc4-dd5b-42e5-9b74-a5dcca4a5af1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114404Z:7f734dc4-dd5b-42e5-9b74-a5dcca4a5af1" ], + "Date": [ "Thu, 02 Apr 2020 11:44:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S2\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "a4a8726a-eba5-47fc-8f11-33573ea209d2" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "161" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "122cbf91-cdd1-406d-b870-55b36e52134d" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "d657f09b-e18b-490c-9c1a-be1d7d8240a0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114404Z:d657f09b-e18b-490c-9c1a-be1d7d8240a0" ], + "Date": [ "Thu, 02 Apr 2020 11:44:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "ee431301-6e07-4d47-b971-12d2b2f5dc47" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "08cd8172-b2f2-45b6-a22a-17a9fa41ceac" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "078dc923-eb8c-42a7-af5e-ed9e9fcb38ce" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114405Z:078dc923-eb8c-42a7-af5e-ed9e9fcb38ce" ], + "Date": [ "Thu, 02 Apr 2020 11:44:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "5e8bcb7d-1b02-4dbc-b2b1-eb43f544baa0" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "340da230-aac5-4051-9e74-ff1f969634e7" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "ae04d82d-3949-45a5-bcbb-e65241f6aa26" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114405Z:ae04d82d-3949-45a5-bcbb-e65241f6aa26" ], + "Date": [ "Thu, 02 Apr 2020 11:44:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"L1\",\n \"capacity\": 1\n },\n \"kind\": \"LongTerm\",\n \"properties\": {\n \"storageConfiguration\": {\n \"accountName\": \"staaccounttest001\",\n \"managementKey\": \"WYUkhD+eRnbXIVmzSM8p85VqCh4r9Q5/I61NZNdgbOfTUIA7VEH4QujQ1Tyf1ObbCyxfXid+/2DX/BVBLb2auw==\"\n },\n \"timeSeriesIdProperties\": [\n {\n \"name\": \"cdc\",\n \"type\": \"string\"\n }\n ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "567156ae-93a1-4e10-a52a-5a7a66ff3b2c" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "419" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d5c1b6b5-4d4c-4e54-b234-5167b705edec" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "bb160537-5873-4368-a451-bfc2b8083f57" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114456Z:bb160537-5873-4368-a451-bfc2b8083f57" ], + "Date": [ "Thu, 02 Apr 2020 11:44:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "694" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"2020-04-02T11:44:42+00:00\",\"provisioningState\":\"Succeeded\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5", "6" ], + "x-ms-client-request-id": [ "567156ae-93a1-4e10-a52a-5a7a66ff3b2c", "567156ae-93a1-4e10-a52a-5a7a66ff3b2c" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-correlation-request-id": [ "78873acb-f1c3-4a27-bad2-fd5e34bf3fbc" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "9660c498-af02-458f-b090-45c398adbecc" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114527Z:78873acb-f1c3-4a27-bad2-fd5e34bf3fbc" ], + "Date": [ "Thu, 02 Apr 2020 11:45:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "698" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5", "6", "7" ], + "x-ms-client-request-id": [ "567156ae-93a1-4e10-a52a-5a7a66ff3b2c", "567156ae-93a1-4e10-a52a-5a7a66ff3b2c", "567156ae-93a1-4e10-a52a-5a7a66ff3b2c" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "11227edb-95d1-402b-9543-ac99fd2ed9fd" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "4ace22fe-8bae-44b4-b90f-71790a62e963" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114528Z:4ace22fe-8bae-44b4-b90f-71790a62e963" ], + "Date": [ "Thu, 02 Apr 2020 11:45:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "698" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "33681886-9b4d-40b7-97e3-8540a793957e" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b09721a2-807b-44ef-a8b0-3a82efa825ad" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "5ed1415e-f5eb-4cf9-aaf0-360769e937ec" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114528Z:5ed1415e-f5eb-4cf9-aaf0-360769e937ec" ], + "Date": [ "Thu, 02 Apr 2020 11:45:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "698" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 new file mode 100644 index 000000000000..d3fd37d43b9a --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 @@ -0,0 +1,47 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +$helperPath = Join-Path $PSScriptRoot 'helper.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +. ($helperPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzTimeSeriesInsightsEnvironment.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzTimeSeriesInsightsEnvironment' { + It 'standard' { + $kind = 'Standard' + $sku01 = 'S1' + $sku02 = 'S2' + $timeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 + $capacity = 2 + + New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv02 -Kind $kind -Location $env.location -Sku $sku01 -DataRetentionTime $timeSpan -Capacity $capacity + New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv03 -Kind $kind -Location $env.location -Sku $sku02 -DataRetentionTime $timeSpan -Capacity $capacity + + $tsiEnv02 = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv02 + $tsiEnv03 = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv03 + $tsiEnv02.Name | Should -Be $env.rstrenv02 + $tsiEnv03.Name | Should -Be $env.rstrenv03 + } + + It 'longterm' { + $kind = 'LongTerm' + $sku = 'L1' + $capacity = 2 + $timeSeriesIdProperty = @{name='cdc';type='string'} + $staAccountName = 'staaccount' + (RandomLetters -len 6 -lowerCase $true) + New-AzStorageAccount -ResourceGroupName $env.resourceGroup -AccountName $staAccountName -Location $env.location -Sku Standard_GRS + $staAccountKeys = Get-AzStorageAccountKey -ResourceGroupName $env.resourceGroup -Name $staAccountName + $staAccountKey = $staAccountKeys[0].Value | ConvertTo-SecureString -AsPlainText -Force + + New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv04 -Kind $kind -Location $env.location -Sku $sku -StorageAccountName $staAccountName -StorageAccountKey $staAccountKey -TimeSeriesIdProperty $timeSeriesIdProperty + $tsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv04 + $tsiEnv.Name | Should -Be $env.rstrenv04 + } +} diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json new file mode 100644 index 000000000000..a6ac5217f5e5 --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json @@ -0,0 +1,162 @@ +{ + "New-AzTimeSeriesInsightsEventSource+[NoContext]+eventhub+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"kind\": \"Microsoft.EventHub\",\n \"properties\": {\n \"eventSourceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/rstr-dicgts/eventhubs/rstr-qn7esp\",\n \"consumerGroupName\": \"tsi-test-796bte\",\n \"eventHubName\": \"rstr-qn7esp\",\n \"keyName\": \"RootManageSharedAccessKey\",\n \"serviceBusNamespace\": \"rstr-dicgts\",\n \"sharedAccessKey\": \"vZg+rvKWh9i1rN+8MItX2tTMjwdZ/6u1D4jQfClq0Y0=\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "42bee419-3b36-47e0-a8f6-6c3b3af3f29c" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEventSource_Create" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "506" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "91c36f5f-1623-4d36-9852-9c06faa21ef0" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "75b189be-13d2-4fc7-aca9-d4b3ac2b461c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115246Z:75b189be-13d2-4fc7-aca9-d4b3ac2b461c" ], + "Date": [ "Thu, 02 Apr 2020 11:52:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "744" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/rstr-dicgts/eventhubs/rstr-qn7esp\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"rstr-qn7esp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"rstr-dicgts\",\"creationTime\":\"Thu, 02 Apr 2020 11:52:44 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue\",\"name\":\"rstr-lfn5ue\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "New-AzTimeSeriesInsightsEventSource+[NoContext]+eventhub+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "e5200bbf-5d03-4805-930f-8ba527287fe9" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4e226459-954a-41af-b948-281eb23be306" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "bc6ed8cb-5d2f-49ee-9b22-8e63347affc0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115246Z:bc6ed8cb-5d2f-49ee-9b22-8e63347affc0" ], + "Date": [ "Thu, 02 Apr 2020 11:52:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "744" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/rstr-dicgts/eventhubs/rstr-qn7esp\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"rstr-qn7esp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"rstr-dicgts\",\"creationTime\":\"Thu, 02 Apr 2020 11:52:44 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue\",\"name\":\"rstr-lfn5ue\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "New-AzTimeSeriesInsightsEventSource+[NoContext]+iothub+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"kind\": \"Microsoft.IoTHub\",\n \"properties\": {\n \"eventSourceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.Devices/IotHubs/rstr-1psi72\",\n \"consumerGroupName\": \"tsi-test-796bte\",\n \"iotHubName\": \"rstr-1psi72\",\n \"keyName\": \"RootManageSharedAccessKey\",\n \"sharedAccessKey\": \"uj5zzjkW5xnKCw8+Ps/xSiutf7NgenYsWm6zlP53BOM=\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "0f8ae761-8de0-4e4a-925a-50568753b8fe" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEventSource_Create" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "434" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "7c2259cb-b186-4f8f-9411-0e5a0913716b" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "4ccd8928-b202-48e7-8a4c-88a95edf20e1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115442Z:4ccd8928-b202-48e7-8a4c-88a95edf20e1" ], + "Date": [ "Thu, 02 Apr 2020 11:54:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "678" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.IoTHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.Devices/IotHubs/rstr-1psi72\",\"consumerGroupName\":\"tsi-test-796bte\",\"iotHubName\":\"rstr-1psi72\",\"keyName\":\"RootManageSharedAccessKey\",\"creationTime\":\"Thu, 02 Apr 2020 11:54:40 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox\",\"name\":\"rstr-0sgkox\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "New-AzTimeSeriesInsightsEventSource+[NoContext]+iothub+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "7d3f4fbe-6e0d-4d5c-ab15-f22efb5d99e0" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4063ede3-9b9e-4a60-adaa-bb3ff39a892c" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "53601a2e-56aa-49d7-8eca-cde37c00b49d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115443Z:53601a2e-56aa-49d7-8eca-cde37c00b49d" ], + "Date": [ "Thu, 02 Apr 2020 11:54:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "678" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.IoTHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.Devices/IotHubs/rstr-1psi72\",\"consumerGroupName\":\"tsi-test-796bte\",\"iotHubName\":\"rstr-1psi72\",\"keyName\":\"RootManageSharedAccessKey\",\"creationTime\":\"Thu, 02 Apr 2020 11:54:40 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox\",\"name\":\"rstr-0sgkox\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 new file mode 100644 index 000000000000..7d1bdadf7734 --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 @@ -0,0 +1,48 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) + +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzTimeSeriesInsightsEventSource.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzTimeSeriesInsightsEventSource' { + It 'eventhub' { + $eventHubSpaceName = $env.rstr31 + $eventHubSpace = New-AzEventHubNamespace -Name $eventHubSpaceName -ResourceGroupName $env.resourceGroup -Location $env.location + + $eventHubName = $env.rstr32 + $eventHub = New-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $eventHubSpace.Name -Name $eventHubName + $eventHubKeys = Get-AzEventHubKey -ResourceGroupName $env.resourceGroup -NamespaceName $eventHubSpace.Name -AuthorizationRuleName RootManageSharedAccessKey + $eventHubKey = $eventHubKeys.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force + + $environmentName = $env.rstrenv01 + $tsiEevntSourceName = $env.rstres01 + New-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -Name $tsiEevntSourceName -EnvironmentName $environmentName -Kind Microsoft.EventHub -ConsumerGroupName $env.resourceGroup -Location $env.location -KeyName RootManageSharedAccessKey -ServiceBusNameSpace $eventHubSpace.Name -EventHubName $eventHub.Name -EventSourceResourceId $eventHub.id -SharedAccessKey $eventHubKey + $tsiEevntSource = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -EnvironmentName $environmentName -Name $tsiEevntSourceName + $tsiEevntSource.Name | Should -Be $tsiEevntSourceName + } + + It 'iothub' { + $iotHubName = $env.rstr33 + $iotHubSkuName = 'S1' + $iotUnits = 100 + + $iotHub = New-AzIotHub -ResourceGroupName $env.resourceGroup -Location $env.location -Name $iotHubName -SkuName $iotHubSkuName -Units $iotUnits + $iotHubKeys = Get-AzIotHubKey -ResourceGroupName $env.resourceGroup -Name $iotHubName + $iotHubKey = $iotHubKeys[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force + + $environmentName = $env.rstrenv02 + $tsiEevntSourceName = $env.rstres02 + New-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -Name $tsiEevntSourceName -EnvironmentName $environmentName -Kind Microsoft.IoTHub -ConsumerGroupName $env.resourceGroup -Location $env.location -KeyName RootManageSharedAccessKey -IoTHubName $iotHub.Name -EventSourceResourceId $iotHub.id -SharedAccessKey $iotHubKey + $tsiEevntSource = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -EnvironmentName $environmentName -Name $tsiEevntSourceName + $tsiEevntSource.Name | Should -Be $tsiEevntSourceName + } +} diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json new file mode 100644 index 000000000000..cccb145d58da --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -0,0 +1,43 @@ +{ + "New-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/referenceDataSets/tsirds001?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/referenceDataSets/tsirds001?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"properties\": {\n \"dataStringComparisonBehavior\": \"Ordinal\",\n \"keyProperties\": [\n {\n \"name\": \"device01\",\n \"type\": \"Double\"\n }\n ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "462df3ce-4edf-4e2b-952f-9afd6b135b01" ], + "CommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "195" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "2b9bf993-a5d1-42c1-89d6-88aa0d1407b4" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "f59f2668-3f99-4597-b6ba-e71371977974" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115838Z:f59f2668-3f99-4597-b6ba-e71371977974" ], + "Date": [ "Thu, 02 Apr 2020 11:58:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "493" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:58:04 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/referenceDataSets/tsirds001\",\"name\":\"tsirds001\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 new file mode 100644 index 000000000000..88a43db929d6 --- /dev/null +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 @@ -0,0 +1,23 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) + +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzTimeSeriesInsightsReferenceDataSet.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzTimeSeriesInsightsReferenceDataSet' { + It 'CreateExpanded' { + $tsiDsName = 'tsirds001' + $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} + $environmentName = $env.rstrenv02 + $tsiDs = New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -Name $tsiDsName -ResourceGroupName $env.resourceGroup -Location $env.location -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + $tsiDs.Name | Should -Be $tsiDsName + } +} diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json new file mode 100644 index 000000000000..f5d910da2cac --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -0,0 +1,197 @@ +{ + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "2bc4976c-5079-4aad-8746-2be8a0b29f67" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b50359cf-a337-41b3-8587-48d2f4e5d8d7" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "ff0e7ff4-e2d1-4239-b14b-90cac2b569a2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120011Z:ff0e7ff4-e2d1-4239-b14b-90cac2b569a2" ], + "Date": [ "Thu, 02 Apr 2020 12:00:10 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accessPolicies?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accessPolicies?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "984ed507-1dfc-43a0-b29d-a09e3bb0cb5b" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "50a97481-d378-4112-8c10-2c1b8a09d5a1" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "08502385-e94d-48cf-9c7a-936f3e1fe229" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120012Z:08502385-e94d-48cf-9c7a-936f3e1fe229" ], + "Date": [ "Thu, 02 Apr 2020 12:00:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}" + } + }, + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview", + "Content": "{\n \"properties\": {\n \"principalObjectId\": \"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\n \"roles\": [ \"Reader\" ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "9ea11862-f257-4889-8feb-e9a66eaa1477" ], + "CommandName": [ "New-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsAccessPolicy_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "116" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e17e5ba2-7a2d-4714-83e0-add182ba430f" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "01b47798-02fb-4f25-9e8d-daf091d4d627" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120012Z:01b47798-02fb-4f25-9e8d-daf091d4d627" ], + "Date": [ "Thu, 02 Apr 2020 12:00:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "362" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h\",\"name\":\"rstr-o7f32h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + }, + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "9da5ddc9-fecd-477e-9913-76d4930e650e" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "510a1893-aae1-441d-95fa-86688d94d460" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "67b70109-fc10-444d-b076-3222f2fce8ab" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120013Z:67b70109-fc10-444d-b076-3222f2fce8ab" ], + "Date": [ "Thu, 02 Apr 2020 12:00:12 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accessPolicies?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accessPolicies?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "a5916a73-7ee6-4d71-a69e-59ccb354de5d" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8548cc53-f8ff-41fb-8552-c35d912270df" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "cc92b0f8-8d01-41e8-8e1d-57de0cce88c5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120013Z:cc92b0f8-8d01-41e8-8e1d-57de0cce88c5" ], + "Date": [ "Thu, 02 Apr 2020 12:00:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 new file mode 100644 index 000000000000..cf11a6b1c26d --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 @@ -0,0 +1,33 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Remove-AzTimeSeriesInsightsAccessPolicy' { + It 'Delete' { + $environmentName = $env.rstrenv01 + $accessPolicyName = $env.rstrap01 + Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -Name $accessPolicyName -ResourceGroupName $env.resourceGroup + $policyList = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup + $policyList.Name | Should -Not -Contain $accessPolicyName + } + + It 'DeleteViaIdentity' { + $environmentName = $env.rstrenv02 + $accessPolicyName = $env.rstrap02 + $role = 'Reader' + $policy = New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup -PrincipalObjectId $env.principalObjectId -Role $role -Name $accessPolicyName + Remove-AzTimeSeriesInsightsAccessPolicy -InputObject $policy + $policyList = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup + $policyList.Name | Should -Not -Contain $accessPolicyName + + } +} diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json new file mode 100644 index 000000000000..3a5149f3fbf0 --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json @@ -0,0 +1,195 @@ +{ + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "32e1236e-305b-4618-83e9-599821bfcd94" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsEnvironment_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ba82d806-ad66-4ba0-90e2-5ec2f50b7ecb" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "7538356a-e949-4d5a-a747-00862713fa0f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120101Z:7538356a-e949-4d5a-a747-00862713fa0f" ], + "Date": [ "Thu, 02 Apr 2020 12:01:01 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "00f1fdf0-8538-4839-8c8c-e4a8d20fec3b" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "16e58629-624f-4b69-8e2d-8d119fa1845f" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "0dd59a3e-11f1-4f36-9e50-ef702cbb58f1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120102Z:0dd59a3e-11f1-4f36-9e50-ef702cbb58f1" ], + "Date": [ "Thu, 02 Apr 2020 12:01:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3486" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" + } + }, + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "3297c90a-2b31-414b-9940-c87157246bb4" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "9c5540d4-869f-4ba2-82dc-357b6f3e1383" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "03f1e457-590f-4ed5-99db-e819b77163b8" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120102Z:03f1e457-590f-4ed5-99db-e819b77163b8" ], + "Date": [ "Thu, 02 Apr 2020 12:01:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "17b6fb12-28df-4f83-84d7-495021958059" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsEnvironment_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "33367737-6714-4350-a1ab-e7fba03049af" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "3857716e-6f64-4ddc-8f92-9ab07bf1c85b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120106Z:3857716e-6f64-4ddc-8f92-9ab07bf1c85b" ], + "Date": [ "Thu, 02 Apr 2020 12:01:05 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "01c93cb0-eca5-410c-bc5b-611cccb8a1f0" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "233b8d88-578c-4a4b-8b35-e3f189eac0a4" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "9107f363-c706-4ed0-a9e9-f02d89ef556d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120106Z:9107f363-c706-4ed0-a9e9-f02d89ef556d" ], + "Date": [ "Thu, 02 Apr 2020 12:01:06 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2796" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Tests.ps1 b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Tests.ps1 new file mode 100644 index 000000000000..c79cd80c2b20 --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Tests.ps1 @@ -0,0 +1,29 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) + +$TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzTimeSeriesInsightsEnvironment.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Remove-AzTimeSeriesInsightsEnvironment' { + It 'Delete' { + $environmentName = $env.rstrenv01 + Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName + $tisEnvList = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup + $tisEnvList.Name | Should -Not -Contain $environmentName + } + It 'DeleteInputObject' { + $environmentName = $env.rstrenv02 + $tsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName + Remove-AzTimeSeriesInsightsEnvironment -InputObject $tsiEnv + $tisEnvList = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup + $tisEnvList.Name | Should -Not -Contain $environmentName + } +} diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json new file mode 100644 index 000000000000..7c8a4e7dafd1 --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json @@ -0,0 +1,195 @@ +{ + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventsources/rstr-9rzn7d?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventsources/rstr-9rzn7d?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "64e97e4a-9894-4be8-954d-d2f825c0b8c3" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsEventSource_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "537270a1-054b-465e-826d-d8eaf786235a" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "34bc6a85-ec5a-461b-9acf-40fd79d47300" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124226Z:34bc6a85-ec5a-461b-9acf-40fd79d47300" ], + "Date": [ "Thu, 02 Apr 2020 12:42:26 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventSources?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventSources?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "90b19fcf-0155-4e49-b07b-e311bf99c3eb" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bd3149c2-388f-403a-b6ca-ee2b79c65da0" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "a1bb8e2d-753c-4f29-9f60-e91c686bfc6b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124227Z:a1bb8e2d-753c-4f29-9f60-e91c686bfc6b" ], + "Date": [ "Thu, 02 Apr 2020 12:42:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}" + } + }, + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "4d931d5c-80c2-4335-b738-3282eb203676" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "67e34358-f47d-4c6f-a80c-55a53ad48ec0" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "e8fdb36f-614f-4fe7-84e7-edbc9aff4f96" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124227Z:e8fdb36f-614f-4fe7-84e7-edbc9aff4f96" ], + "Date": [ "Thu, 02 Apr 2020 12:42:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "758" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"serviceBusNamespace\":\"apacename001\",\"eventHubName\":\"hubname001\",\"keyName\":\"RootManageSharedAccessKey\",\"consumerGroupName\":\"$Default\",\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.EventHub/namespaces/apacename001/eventhubs/hubname001\",\"localTimestamp\":null,\"creationTime\":\"Thu, 02 Apr 2020 12:41:32 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p\",\"name\":\"tsi-esyb6s7p\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "51299826-0fe3-44cc-a1a5-7b62777478c5" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsEventSource_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "c6bfc47e-37ab-4b09-b06d-984057cca48c" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "2481da56-33b8-4cbc-9fce-fe45df5db261" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124230Z:2481da56-33b8-4cbc-9fce-fe45df5db261" ], + "Date": [ "Thu, 02 Apr 2020 12:42:30 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventSources?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventSources?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "03544b84-2782-4dc5-a278-970a9ab8faa0" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "7aee5c9e-4afd-4f20-8b89-3c7dc99e8733" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "17256d93-4b66-4e46-8f98-16c057639576" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124231Z:17256d93-4b66-4e46-8f98-16c057639576" ], + "Date": [ "Thu, 02 Apr 2020 12:42:30 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Tests.ps1 b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Tests.ps1 new file mode 100644 index 000000000000..5e18dfaeb8c0 --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Tests.ps1 @@ -0,0 +1,31 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzTimeSeriesInsightsEventSource.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Remove-AzTimeSeriesInsightsEventSource' { + It 'Delete' { + $environmentName = $env.rstrenv03 + $tsiEevntSourceName = $env.rstres03 + Remove-AzTimeSeriesInsightsEventSource -EnvironmentName $environmentName -Name $tsiEevntSourceName -ResourceGroupName $env.ResourceGroup + $tsiEventSorceList = Get-AzTimeSeriesInsightsEventSource -EnvironmentName $environmentName -ResourceGroupName $env.ResourceGroup + $tsiEventSorceList.Name | Should -Not -Contain $tsiEevntSourceName + } + + It 'DeleteViaIdentity' { + $environmentName = $env.tsiEnvName01 + $tsiEevntSourceName = $env.tsiEsName01 + $getTsiEventSorce = Get-AzTimeSeriesInsightsEventSource -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup -Name $tsiEevntSourceName + Remove-AzTimeSeriesInsightsEventSource -InputObject $getTsiEventSorce + $tsiEventSorceList = Get-AzTimeSeriesInsightsEventSource -EnvironmentName $environmentName -ResourceGroupName $env.ResourceGroup + $tsiEventSorceList.Name | Should -Not -Contain $getTsiEventSorce.Name + } +} diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json new file mode 100644 index 000000000000..e32926719fed --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -0,0 +1,279 @@ +{ + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "e4ba7476-280e-48c8-b098-d1e07ae4b54e" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "161" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "68d40b8e-3d87-42b6-ae8a-f0ae680ac692" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "112c7074-e96f-4d8e-abe4-56cd3d9f4967" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122000Z:112c7074-e96f-4d8e-abe4-56cd3d9f4967" ], + "Date": [ "Thu, 02 Apr 2020 12:19:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 12:13:04 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"4f0062c4-edfd-4b90-96e6-5e6ebe56c6da\",\"dataAccessFqdn\":\"4f0062c4-edfd-4b90-96e6-5e6ebe56c6da.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls\",\"name\":\"rstr-m9t7ls\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"properties\": {\n \"dataStringComparisonBehavior\": \"Ordinal\",\n \"keyProperties\": [\n {\n \"name\": \"device01\",\n \"type\": \"Double\"\n }\n ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "99fe3955-a267-4cf3-b4ba-3fe82907bc0f" ], + "CommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "195" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "c324c06b-77c0-46e6-9f62-9f3ab29c1557" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "ab78b050-fce8-4f97-bc3a-22f636589de8" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122008Z:ab78b050-fce8-4f97-bc3a-22f636589de8" ], + "Date": [ "Thu, 02 Apr 2020 12:20:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "497" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 12:20:05 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003\",\"name\":\"removeds003\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "d051e9a5-aa22-4455-8d78-b3c165ca8389" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "02c6db73-ed86-42c3-b6f0-c5be66874d45" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "6491932b-7320-4ab4-983f-70713a549145" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122010Z:6491932b-7320-4ab4-983f-70713a549145" ], + "Date": [ "Thu, 02 Apr 2020 12:20:10 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "58cfbd10-d312-45e6-b393-efb0b04be1e3" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "19151852-2292-484d-8444-b74325bbe8a8" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "a45782ef-c583-42e7-9912-20ef577344af" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122011Z:a45782ef-c583-42e7-9912-20ef577344af" ], + "Date": [ "Thu, 02 Apr 2020 12:20:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}" + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"properties\": {\n \"dataStringComparisonBehavior\": \"Ordinal\",\n \"keyProperties\": [\n {\n \"name\": \"device01\",\n \"type\": \"Double\"\n }\n ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "4afa0f7d-dfc0-4953-ac9f-7795da9b6440" ], + "CommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "195" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "023795c8-1cce-4552-a908-e52ea4c83654" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "b405a644-bcc2-4468-92d4-cedab17789e9" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122014Z:b405a644-bcc2-4468-92d4-cedab17789e9" ], + "Date": [ "Thu, 02 Apr 2020 12:20:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "497" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 12:20:13 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002\",\"name\":\"removeds002\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "babb0e9b-9fb1-40e5-a855-c563f11bce49" ], + "CommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "431cf0b0-2180-46d5-8621-31eb7c39a42a" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "f3d0e19c-6479-4521-8cd5-1660e802483b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122017Z:f3d0e19c-6479-4521-8cd5-1660e802483b" ], + "Date": [ "Thu, 02 Apr 2020 12:20:16 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "ee9bfe69-e48c-4a97-bebb-75298cebb825" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "85d2ab5b-1dd9-4518-998c-d1e3a8e78dec" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "79e8159e-16de-4b73-80b0-c33dc5813559" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122017Z:79e8159e-16de-4b73-80b0-c33dc5813559" ], + "Date": [ "Thu, 02 Apr 2020 12:20:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 new file mode 100644 index 000000000000..465df1a87055 --- /dev/null +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 @@ -0,0 +1,40 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Remove-AzTimeSeriesInsightsReferenceDataSet' { + It 'Delete' { + $kind = 'Standard' + $sku01 = 'S1' + $timeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 + $capacity = 2 + $environmentName = $env.rstrenv05 + $tsiDsName = 'removeds003' + $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} + New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName -Kind $kind -Location $env.location -Sku $sku01 -DataRetentionTime $timeSpan -Capacity $capacity + New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -Name $tsiDsName -ResourceGroupName $env.resourceGroup -Location $env.location -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + + Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -Name $tsiDsName -ResourceGroupName $env.resourceGroup + $tsiDsList = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup + $tsiDsList.Name | Should -not -contain $tsiDsName + + } + It 'DeleteViaIdentity' { + $environmentName = $env.rstrenv05 + $tsiDsName = 'removeds002' + $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} + $tsiDs = New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -Name $tsiDsName -ResourceGroupName $env.resourceGroup -Location $env.location -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + Remove-AzTimeSeriesInsightsReferenceDataSet -InputObject $tsiDs + $tsiDsList = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup + $tsiDsList.Name | Should -not -contain $tsiDsName + } +} diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json new file mode 100644 index 000000000000..b14928d840f9 --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -0,0 +1,201 @@ +{ + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "Content": "{\n \"properties\": {\n \"roles\": [ \"Contributor\" ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "f4d74f35-2c70-4039-bb73-38f0b88ab1ea" ], + "CommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "56" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "69f0fd84-d51a-441f-ae0a-250165562fe7" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "b0c06b50-3eb6-4707-893e-ec02f29fdb5f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122109Z:b0c06b50-3eb6-4707-893e-ec02f29fdb5f" ], + "Date": [ "Thu, 02 Apr 2020 12:21:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "371" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + }, + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "38e3dc61-0d63-49d0-b5cf-29a83ff275c9" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "0271ff39-149b-47a3-8524-63ff23c733fe" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "3e59a917-82cf-4e47-a6eb-327177ef7779" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122110Z:3e59a917-82cf-4e47-a6eb-327177ef7779" ], + "Date": [ "Thu, 02 Apr 2020 12:21:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "383" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" + } + }, + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "19a1e1a7-a533-4c40-90c0-9bd89460743f" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "38492eaa-0b24-4da4-9091-465ecad6fdb6" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "8790235b-980f-48f9-9e09-cb37151e645f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122110Z:8790235b-980f-48f9-9e09-cb37151e645f" ], + "Date": [ "Thu, 02 Apr 2020 12:21:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "371" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + }, + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "Content": "{\n \"properties\": {\n \"roles\": [ \"Reader\" ]\n }\n}", + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "76e56a5e-decb-4e68-8410-49ea3903dd85" ], + "CommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "51" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ed51a691-7265-48a7-8e0c-5a2220c81cbf" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "146df797-4fcc-48f3-b965-e7ea9f0a72e7" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122111Z:146df797-4fcc-48f3-b965-e7ea9f0a72e7" ], + "Date": [ "Thu, 02 Apr 2020 12:21:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "366" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + } + }, + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "caffa40d-1ef9-4d83-b18e-becc9a346651" ], + "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "a66fed4a-a6e7-4712-9f32-b3500429b45b" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "0a175906-3a30-4294-a60b-521837599e2b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122112Z:0a175906-3a30-4294-a60b-521837599e2b" ], + "Date": [ "Thu, 02 Apr 2020 12:21:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "378" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 new file mode 100644 index 000000000000..901d4245d2c1 --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Tests.ps1 @@ -0,0 +1,34 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) + +$TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzTimeSeriesInsightsAccessPolicy.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Update-AzTimeSeriesInsightsAccessPolicy' { + It 'UpdateExpanded' { + $newRole = 'Contributor' + $environmentName = $env.tsiEnvName + $accessPolicy = $env.accessPolicy + Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -Name $accessPolicy -ResourceGroupName $env.ResourceGroup -Role $newRole + $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -ResourceGroupName $env.ResourceGroup + $policy.Role | Should -Be $newRole + } + + It 'UpdateViaIdentityExpanded' { + $newRole = 'Reader' + $environmentName = $env.tsiEnvName + $accessPolicy = $env.accessPolicy + $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -Name $env.accessPolicy + Update-AzTimeSeriesInsightsAccessPolicy -InputObject $policy -Role $newRole + $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $environmentName -ResourceGroupName $env.ResourceGroup + $policy.Role | Should -Be $newRole + } +} diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json new file mode 100644 index 000000000000..a2dd0c9bf4f4 --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json @@ -0,0 +1,478 @@ +{ + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "e4f86f3a-5389-4019-9275-0b2ae285e42a" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "26d5f9e7-4c71-46f2-b371-98eeeb80d810" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "35d8a0af-cb7a-42b9-852e-6f642fccb61e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122209Z:35d8a0af-cb7a-42b9-852e-6f642fccb61e" ], + "Date": [ "Thu, 02 Apr 2020 12:22:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "693" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "Content": "{\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n }\n}", + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "303069b2-3605-4071-9bab-59f57a0f2f9a" ], + "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "54" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "6cb13e03-8c80-4248-be97-7778a85ffc5e" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "5f3475da-ce77-4373-9de8-e098dc8d324b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122214Z:5f3475da-ce77-4373-9de8-e098dc8d324b" ], + "Date": [ "Thu, 02 Apr 2020 12:22:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "691" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "00e72186-daca-4d13-8937-776b89535e41" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4feedc9a-d96f-435c-9f68-8bcb48dbd4c0" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "00279bd9-4f05-4383-87c2-548dca3e4089" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122215Z:00279bd9-4f05-4383-87c2-548dca3e4089" ], + "Date": [ "Thu, 02 Apr 2020 12:22:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "691" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "c4d27cee-8461-489e-b666-d52e7390fba0" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "63ccc24c-daea-46ff-81f9-a47e850eeea4" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "1cf6e17f-8693-4876-b8a0-bf271a67ffd2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122216Z:1cf6e17f-8693-4876-b8a0-bf271a67ffd2" ], + "Date": [ "Thu, 02 Apr 2020 12:22:15 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "691" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "Content": "{\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 1\n }\n}", + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "6ef29ef9-b14e-4403-9ad5-271e3dcf6a03" ], + "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "54" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ebba3dae-1fc0-473a-9a6a-dc6996d4a45d" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "09634ea7-d1c0-47e0-b13c-63b57682628c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122219Z:09634ea7-d1c0-47e0-b13c-63b57682628c" ], + "Date": [ "Thu, 02 Apr 2020 12:22:18 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "691" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":1},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "fbd27812-0c5a-4c2d-ad58-fdb1122de35b" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "cdeb36f2-18f4-4831-ad9f-b4fc9c89e588" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "6aab11d6-b7dc-4f20-ae29-bbd38c0f7c8e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122219Z:6aab11d6-b7dc-4f20-ae29-bbd38c0f7c8e" ], + "Date": [ "Thu, 02 Apr 2020 12:22:18 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "691" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":1},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "9de47406-8736-406b-bec0-5c630ce60e21" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e85a83de-aeb8-4844-b2c1-870c011b2002" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "55f90d8c-73dc-45b4-913c-efeb2aedb584" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122220Z:55f90d8c-73dc-45b4-913c-efeb2aedb584" ], + "Date": [ "Thu, 02 Apr 2020 12:22:19 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "701" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": "{\n \"sku\": {\n \"name\": \"L1\",\n \"capacity\": 1\n }\n}", + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "7baddd1a-345a-41e2-9180-1cf492c06942" ], + "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "54" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "2e3747bb-bf42-4a4e-90f2-a377c32dd306" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "9f2aa2dd-ce61-45f8-819e-8c2677a02829" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122223Z:9f2aa2dd-ce61-45f8-819e-8c2677a02829" ], + "Date": [ "Thu, 02 Apr 2020 12:22:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "699" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "5efdb6b6-c521-4a4a-ba83-af2235e461fa" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bfe59bfa-69e2-40d3-8852-b836086c798b" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "a422f942-f46d-42c8-9aa1-688e6f2785de" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122223Z:a422f942-f46d-42c8-9aa1-688e6f2785de" ], + "Date": [ "Thu, 02 Apr 2020 12:22:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "699" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "0d84085f-7282-42a3-8d95-3b7310bc20a2" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ddb21910-39fc-4f5b-966a-39a6520154cb" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "49e847ce-1094-4312-a41a-f33202f07987" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122224Z:49e847ce-1094-4312-a41a-f33202f07987" ], + "Date": [ "Thu, 02 Apr 2020 12:22:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "699" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": "{\n \"sku\": {\n \"name\": \"L1\",\n \"capacity\": 1\n }\n}", + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "0d1b0f50-bc49-4f17-999d-fc8467e0ed97" ], + "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "54" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "2017b446-5081-456d-b86c-ff931393d7bf" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "23b86b44-7ef9-466f-a8a8-44e192a929da" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122226Z:23b86b44-7ef9-466f-a8a8-44e192a929da" ], + "Date": [ "Thu, 02 Apr 2020 12:22:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "699" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "9a9d9bbb-db14-4add-9d5a-a5919e2df7f0" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "84711f28-ea77-4c2a-b7a9-70ffdc93ad53" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "9e40533b-0b7b-4c56-8c2b-1937aa6c43fb" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122226Z:9e40533b-0b7b-4c56-8c2b-1937aa6c43fb" ], + "Date": [ "Thu, 02 Apr 2020 12:22:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "699" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Tests.ps1 b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Tests.ps1 new file mode 100644 index 000000000000..8e58f5e37e05 --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Tests.ps1 @@ -0,0 +1,50 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzTimeSeriesInsightsEnvironment.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Update-AzTimeSeriesInsightsEnvironment' { + It 'UpdateStandard' { + $environmentName = $env.tsiEnvName + $tsiEnvStandard = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName + $newCapacity = $tsiEnvStandard.Capacity + 2 + Update-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.ResourceGroup -Name $environmentName -Capacity $newCapacity -Sku $tsiEnvStandard.SkuName + $updatedTsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.ResourceGroup -Name $environmentName + $updatedTsiEnv.SkuCapacity | Should -Be $newCapacity + + } + It 'UpdateStandardInputObject' { + $environmentName = $env.tsiEnvName + $tsiEnvStandard = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName + $newCapacity = $tsiEnvStandard.Capacity + 1 + Update-AzTimeSeriesInsightsEnvironment -InputObject $tsiEnvStandard -Capacity $newCapacity -Sku $tsiEnvStandard.SkuName + $updatedTsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.ResourceGroup -Name $environmentName + $updatedTsiEnv.SkuCapacity | Should -Be $newCapacity + } + + It 'UpdateLongTerm' { + $environmentName = $env.tsiEnvName01 + $tsiEnvLongTerm = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName + $newCapacity = $tsiEnvLongTerm.Capacity + 1 + Update-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.ResourceGroup -Name $environmentName -Capacity $newCapacity -Sku $tsiEnvLongTerm.SkuName + $updatedTsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.ResourceGroup -Name $environmentName + $updatedTsiEnv.SkuCapacity | Should -Be $newCapacity + } + + It 'UpdateLongTermInputObject' { + $environmentName = $env.tsiEnvName01 + $tsiEnvLongTerm = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $environmentName + $newCapacity = $tsiEnvLongTerm.Capacity + 1 + Update-AzTimeSeriesInsightsEnvironment -InputObject $tsiEnvLongTerm -Capacity $newCapacity -Sku $tsiEnvLongTerm.SkuName + $updatedTsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.ResourceGroup -Name $environmentName + $updatedTsiEnv.SkuCapacity | Should -Be $newCapacity + } +} diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json new file mode 100644 index 000000000000..030af9135d5c --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json @@ -0,0 +1,123 @@ +{ + "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "Content": "{\n \"tags\": {\n \"tag1\": \"001\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "68d356bd-1986-4039-8f38-21162ec841ef" ], + "CommandName": [ "Update-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsEventSource_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "37" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "5933876b-b68c-4342-8cd2-254d21c845bf" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "1344656b-699f-4b57-992c-b27cf044737a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122310Z:1344656b-699f-4b57-992c-b27cf044737a" ], + "Date": [ "Thu, 02 Apr 2020 12:23:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "792" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"001\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "372f9236-074a-49be-98f3-d029432b7095" ], + "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4f928fd1-5d66-4cdc-9eba-7fe8527b961f" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "6c082a9a-008e-489b-a2ef-6ae290627af7" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122310Z:6c082a9a-008e-489b-a2ef-6ae290627af7" ], + "Date": [ "Thu, 02 Apr 2020 12:23:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "792" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"001\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + }, + "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "Content": "{\n \"tags\": {\n \"tag2\": \"002\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "63377613-d34e-4cfa-bd3c-f33fa35dc5f5" ], + "CommandName": [ "Update-AzTimeSeriesInsightsEventSource" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsEventSource_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "37" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "62fe351b-b056-4f71-8d76-a722dc2c3e1e" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "d7d3c8c0-7807-446b-b8d1-f9ec7549f3c0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122314Z:d7d3c8c0-7807-446b-b8d1-f9ec7549f3c0" ], + "Date": [ "Thu, 02 Apr 2020 12:23:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "792" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"002\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Tests.ps1 b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Tests.ps1 new file mode 100644 index 000000000000..f8e8b2cab674 --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Tests.ps1 @@ -0,0 +1,38 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) + +$TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzTimeSeriesInsightsEventSource.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Update-AzTimeSeriesInsightsEventSource' { + It 'UpdateExpanded' { + $environmentName = $env.tsiEnvName + $eventSourceName = $env.tsiEsName + $key = 'tag1' + $value = '001' + $tag = @{$key=$value} + $updateTsiEventSource = Update-AzTimeSeriesInsightsEventSource -EnvironmentName $environmentName -Name $eventSourceName -ResourceGroupName $env.ResourceGroup -Tag $tag + $updateTsiEventSource.Tag.keys.Contains($key) | Should -BeTrue + $updateTsiEventSource.Tag.Values.Contains($value) | Should -BeTrue + } + + It 'UpdateViaIdentityExpanded' { + $environmentName = $env.tsiEnvName + $eventSourceName = $env.tsiEsName + $getTsiEventSorce = Get-AzTimeSeriesInsightsEventSource -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup -Name $eventSourceName + $key = 'tag2' + $value = '002' + $tag = @{$key=$value} + $updateTsiEventSource = Update-AzTimeSeriesInsightsEventSource -InputObject $getTsiEventSorce -Tag $tag + $updateTsiEventSource.Tag.keys.Contains($key) | Should -BeTrue + $updateTsiEventSource.Tag.Values.Contains($value) | Should -BeTrue + } +} diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json new file mode 100644 index 000000000000..5ae883673fcc --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -0,0 +1,201 @@ +{ + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": "{\n \"tags\": {\n \"rds01\": \"001\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "545ffa7c-9c78-4719-bf53-611367531725" ], + "CommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet_UpdateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "38" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "260e4432-a2cb-437f-b4fe-cd7a79524932" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "cae20cbc-475b-4467-8bb6-ca6d7278a40e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122730Z:cae20cbc-475b-4467-8bb6-ca6d7278a40e" ], + "Date": [ "Thu, 02 Apr 2020 12:27:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "1ab465fb-ece4-45af-ad3d-75814d89a913" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8d4097bd-fde1-474b-9ccb-dabbd239f2d4" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "b1e37f30-34d3-4b8c-a4f9-1adaa5413e17" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122732Z:b1e37f30-34d3-4b8c-a4f9-1adaa5413e17" ], + "Date": [ "Thu, 02 Apr 2020 12:27:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "f89f15e8-aff1-4ed4-a5e5-baf98d77c7a7" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "14054ec8-ad21-482b-959a-5a77f88ae84c" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "e55941dd-18a8-407e-a860-32e07af9bbe4" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122734Z:e55941dd-18a8-407e-a860-32e07af9bbe4" ], + "Date": [ "Thu, 02 Apr 2020 12:27:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": "{\n \"tags\": {\n \"rds02\": \"002\"\n }\n}", + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "2a5fe8cc-0517-401d-a938-dca3332d5c28" ], + "CommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet_UpdateViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "38" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "7a4fac3f-c417-4503-85ac-ff8c26819689" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "bc3a13e1-f56a-4f65-a01f-e6715853a1f5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122739Z:bc3a13e1-f56a-4f65-a01f-e6715853a1f5" ], + "Date": [ "Thu, 02 Apr 2020 12:27:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds02\":\"002\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + }, + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "9494413a-3895-441d-bcdb-3343f7f945aa" ], + "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], + "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "63fa4489-0c54-4304-a6b9-69167f9af60d" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "26566447-558b-4e3d-8efd-07beccbdecb0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122742Z:26566447-558b-4e3d-8efd-07beccbdecb0" ], + "Date": [ "Thu, 02 Apr 2020 12:27:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "512" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds02\":\"002\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + } + } +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 new file mode 100644 index 000000000000..f9e5b51d44ed --- /dev/null +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Tests.ps1 @@ -0,0 +1,40 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) + +$TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Update-AzTimeSeriesInsightsReferenceDataSet' { + It 'UpdateExpanded' { + $key = 'rds01' + $value = '001' + $tag = @{$key=$value} + $environmentName = $env.tsiEnvName + $dataSetName = $env.referenceDataSet + Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -Name $dataSetName -ResourceGroupName $env.ResourceGroup -Tag $tag + $tsiDs = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -ResourceGroupName $env.ResourceGroup -ReferenceDataSetName $dataSetName + $tsiDs.Tag.keys.Contains($key) | Should -BeTrue + $tsiDs.Tag.Values.Contains($value) | Should -BeTrue + } + + It 'UpdateViaIdentityExpanded' { + $key = 'rds02' + $value = '002' + $tag = @{$key=$value} + $environmentName = $env.tsiEnvName + $dataSetName = $env.referenceDataSet + $tsiDs = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -ResourceGroupName $env.resourceGroup -ReferenceDataSetName $dataSetName + Update-AzTimeSeriesInsightsReferenceDataSet -InputObject $tsiDs -Tag $tag + $tsiDs = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $environmentName -ResourceGroupName $env.ResourceGroup -ReferenceDataSetName $tsiDs.Name + $tsiDs.Tag.keys.Contains($key) | Should -BeTrue + $tsiDs.Tag.Values.Contains($value) | Should -BeTrue + } +} diff --git a/src/TimeSeriesInsights/test/env.json b/src/TimeSeriesInsights/test/env.json new file mode 100644 index 000000000000..3da736928c23 --- /dev/null +++ b/src/TimeSeriesInsights/test/env.json @@ -0,0 +1,42 @@ +{ + "rstrenv01": "rstr-h5qvur", + "rstr32": "rstr-qn7esp", + "referenceDataSet": "tsirdsxyseib", + "rstr33": "rstr-1psi72", + "tsiEsName01": "tsi-esyb6s7p", + "tsiEnvName01": "tsi-env4f1j2q", + "referenceDataSet01": "tsirdsmuazdc", + "rstrenv06": "rstr-ot9dc7", + "rstrenv03": "rstr-8qzfme", + "rstrenv02": "rstr-bej4z3", + "subscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", + "tsiEsName": "tsi-esaf1456", + "eventHubName": "eventhubname-dfqhbo", + "tsiEnvName": "tsi-envr0gwcm", + "rstres03": "rstr-9rzn7d", + "rstres04": "rstr-dzy9fp", + "tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "eventHubName01": "eventhubname-3u6nbg", + "staaccountName": "staaccountdhtqja", + "eventHubSpaceName": "eventhubspace-lz6hyt", + "rstres02": "rstr-0sgkox", + "accessPolicy01": "tsi-ap3s1280", + "rstrap02": "rstr-o7f32h", + "rstres01": "rstr-lfn5ue", + "rstrap03": "rstr-xg85be", + "eventHubSpaceName01": "eventhubspace-8p0aef", + "iotHubName": "iothubname-kr1ou4", + "rstrenv04": "rstr-cjqkrd", + "location": "eastus2", + "rstrds02": "rstr-ufr0em", + "rstr35": "rstr-s65iua", + "principalObjectId": "97deab6c-e478-40b4-b4da-e7d9353dc1e8", + "accessPolicy": "tsi-apr3q8wo", + "rstr34": "rstr-h4x3tq", + "rstrap01": "rstr-b10a92", + "rstrenv05": "rstr-m9t7ls", + "rstrds01": "rstr-wenyh8", + "rstr30": "rstr-5zf1th", + "rstr31": "rstr-dicgts", + "resourceGroup": "tsi-test-796bte" +} diff --git a/src/TimeSeriesInsights/test/exec-test.ps1 b/src/TimeSeriesInsights/test/exec-test.ps1 new file mode 100644 index 000000000000..3a9d848b246f --- /dev/null +++ b/src/TimeSeriesInsights/test/exec-test.ps1 @@ -0,0 +1,72 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [string]$TestCase) +$ErrorActionPreference = 'Stop' + +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$ProgressPreference = 'SilentlyContinue' +$baseName = $PSScriptRoot.BaseName +$requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule +. ("$PSScriptRoot\test\utils.ps1") +. ("$PSScriptRoot\test\helper.ps1") + +if ($requireResourceModule) { + $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') + Import-Module -Name $resourceModulePSD.FullName +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated/modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.TimeSeriesInsights.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +Import-Module -Name Pester +Import-Module -Name $modulePath + + +$TestMode = 'playback' +if($Live) { + $TestMode = 'live' +} +if($Record) { + $TestMode = 'record' +} +try { + GetUseModules + if ($TestMode -ne 'playback') { + #setupEnv + } + $testCaseFolder = join-Path $PSScriptRoot "test\$TestCase" + $testFolder = Join-Path $PSScriptRoot 'test' + #Invoke-Pester -Script @{ Path = $testCaseFolder } -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") +} +Finally +{ + if ($TestMode -ne 'playback') { + #cleanupEnv + } +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/helper.ps1 b/src/TimeSeriesInsights/test/helper.ps1 new file mode 100644 index 000000000000..a7f5d20a84a4 --- /dev/null +++ b/src/TimeSeriesInsights/test/helper.ps1 @@ -0,0 +1,111 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} + +function GetUseModules() { + $usedModule = & 'gmo' + foreach($module in $usedModule) + { + $name = $module.Name + $version = $module.Version + Write-Host -ForegroundColor Green "Using module name: $name $version" + } +} + +function RandomNumber([int32]$len) { + return -join (0,1,2,3,4,5,6,7,8,9 | Get-Random -Count $len | % {[int32]$_}) +} +function RandomLetters([int32]$len,[bool]$lowerCase) { + if($lowerCase) + { + return -join ((97..122) | Get-Random -Count $len | % {[char]$_}) + } + return -join ((65..90) + (97..122) | Get-Random -Count $len | % {[char]$_}) +} + +function CreateStaAccount([string]$resourceGroup, [string]$staAccountName,[string]$location, [string]$skuName) +{ + Write-Host -ForegroundColor Green 'Start creating storage account for test...' + New-AzStorageAccount -ResourceGroupName $resourceGroup -AccountName $staAccountName -Location $location -SkuName $skuName + Write-Host -ForegroundColor Green 'Created storage accountsuccessfully.' + $staAccountKeys = Get-AzStorageAccountKey -ResourceGroupName $resourceGroup -Name $staAccountName + $staAccountKey = $staAccountKeys[0].Value + return $staccountParam = @{accountName=$staAccountName; accountKey=$staAccountKey} +} + +function GetOrCreateTsiEnv([bool]$forceCreate, [string]$resourceGroup, $tsiEnvParamObj, $staccountParamObj) +{ + if(!$forceCreate) + { + $tsiEnvList = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $resourceGroup + foreach($tsiEnv in $tsiEnvList) + { + if(($tsiEnv.Kind -eq $tsiEnvParamObj.Kind) -and ($tsiEnv.SkuName -eq $tsiEnvParamObj.SkuName)) + { + Write-Host -ForegroundColor Green "Get TimeSeriesInsightsEnvironment for test from resource group." + return $tsiEnv + } + } + } + if(!$tsiEnvParamObj.TsiEnvName) + { + $tsiEnvParamObj.TsiEnvName = "tsi-env-" + (RandomLetters -len 5) + } + if(!$tsiEnvParamObj.Location) + { + $tsiEnvParamObj.Location = 'eastus' + } + if(!$tsiEnvParamObj.TimeSpan) + { + $tsiEnvParamObj.TimeSpan = New-TimeSpan -Days 1 -Hours 1 -Minutes 25 + } + if(!$tsiEnvParamObj.Capacity) + { + $tsiEnvParamObj.Capacity = 2 + } + + if($tsiEnvParamObj.Kind -eq 'LongTerm') + { + if(!$tsiEnvParamObj.TimeSeriesIdProperty) + { + $tsiEnvParamObj.TimeSeriesIdProperty = @{name='cdc';type='string'} + } + $staAccountKey = $staccountParamObj.accountKey | ConvertTo-SecureString -AsPlainText -Force + Write-Host -ForegroundColor Green 'Start creating TimeSeriesInsightsEnvironment(Kind:LongTerm) for test...' + $tsiEnv = New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $resourceGroup -Name $tsiEnvParamObj.TsiEnvName -Kind $tsiEnvParamObj.Kind -Location $tsiEnvParamObj.Location -Sku $tsiEnvParamObj.SkuName -StorageAccountName $staccountParamObj.accountName -StorageAccountKey $staAccountKey -TimeSeriesIdProperty $tsiEnvParamObj.TimeSeriesIdProperty + Write-Host -ForegroundColor Green 'Created TimeSeriesInsightsEnvironment(Kind:LongTerm) successfully.' + return $tsiEnv + } + + Write-Host -ForegroundColor Green 'Start creating TimeSeriesInsightsEnvironment(Kind:Standard) for test...' + $tsiEnv = New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $resourceGroup -Name $tsiEnvParamObj.TsiEnvName -Kind $tsiEnvParamObj.Kind -Location $tsiEnvParamObj.Location -Sku $tsiEnvParamObj.SkuName -DataRetentionTime $tsiEnvParamObj.TimeSpan -Capacity $tsiEnvParamObj.Capacity + #$tsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $resourceGroup -Name $tsiEnvParamObj.TsiEnvName + Write-Host -ForegroundColor Green 'Created TimeSeriesInsightsEnvironment(Kind:Standard) successfully.' + return $tsiEnv +} + +function CreateEventHub ([string]$eventHubSpaceName,[string]$eventHubName,[string]$resourceGroup, [string]$location) +{ + Write-Host -ForegroundColor Green 'Start creating EventHub for test...' + $eventHubSpace = New-AzEventHubNamespace -Name $eventHubSpaceName -ResourceGroupName $resourceGroup -Location $location + $eventHub = New-AzEventHub -ResourceGroupName $resourceGroup -NamespaceName $eventHubSpace.Name -Name $eventHubName + Write-Host -ForegroundColor Green 'Created EventHub successfully.' + $eventHubKeys = Get-AzEventHubKey -ResourceGroupName $resourceGroup -NamespaceName $eventHubSpace.Name -AuthorizationRuleName RootManageSharedAccessKey + $eventHubKey = $eventHubKeys.PrimaryKey + $eventhubParam = @{eventHubSpace=$eventHubSpaceName;eventhub=$eventHub;eventHubKey=$eventHubKey} + return $eventhubParam +} + +function CreateTsiEventSource([string]$tsiEevntSourceName,[string]$resourceGroup,$tsiEnv,$eventhubParam) +{ + # eventhub need modify. + $eventHubKey = $eventhubParam.eventHubKey | ConvertTo-SecureString -AsPlainText -Force + Write-Host -ForegroundColor Green 'Start creating TimeSeriesInsightsEventSource for test...' + $tsiEventSource = New-AzTimeSeriesInsightsEventSource -ResourceGroupName $resourceGroup -Name $tsiEevntSourceName -EnvironmentName $tsiEnv.Name.ToString() -Kind Microsoft.EventHub -ConsumerGroupName $resourceGroup -Location $tsiEnv.Location -KeyName RootManageSharedAccessKey -ServiceBusNameSpace $eventhubParam.eventHubSpace -EventHubName $eventhubParam.eventHub.Name -EventSourceResourceId $eventhubParam.eventHub.id -SharedAccessKey $eventHubKey + Write-Host -ForegroundColor Green 'Created TimeSeriesInsightsEventSource successfully.' + return $tsiEventSource +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/loadEnv.ps1 b/src/TimeSeriesInsights/test/loadEnv.ps1 new file mode 100644 index 000000000000..c4ebf2e8310c --- /dev/null +++ b/src/TimeSeriesInsights/test/loadEnv.ps1 @@ -0,0 +1,28 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/readme.md b/src/TimeSeriesInsights/test/readme.md new file mode 100644 index 000000000000..1969200c6a09 --- /dev/null +++ b/src/TimeSeriesInsights/test/readme.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `../custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/utils.ps1 b/src/TimeSeriesInsights/test/utils.ps1 new file mode 100644 index 000000000000..872167f78f64 --- /dev/null +++ b/src/TimeSeriesInsights/test/utils.ps1 @@ -0,0 +1,149 @@ +. ("$PSScriptRoot\helper.ps1") +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +$env = @{} +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.subscriptionId = (Get-AzContext).Subscription.Id + $env.tenant = (Get-AzContext).Tenant.Id + $env.Add('principalObjectId','97deab6c-e478-40b4-b4da-e7d9353dc1e8') + # For any resources you created for test, you should add it to $env here. + $rstr01 = 'staaccount' + (RandomLetters -len 6 -lowerCase $true) + $rstr02 = 'eventhubspace-' + (RandomString -allChars $false -len 6) + $rstr021 = 'eventhubspace-' + (RandomString -allChars $false -len 6) + $rstr03 = 'eventhubname-' + (RandomString -allChars $false -len 6) + $rstr031 = 'eventhubname-' + (RandomString -allChars $false -len 6) + $rstr04 = 'iothubname-' + (RandomString -allChars $false -len 6) + $rstr05 = 'tsi-env' + (RandomString -allChars $false -len 6) + $rstr051 = 'tsi-env' + (RandomString -allChars $false -len 6) + $rstr06 = 'tsi-es' + (RandomString -allChars $false -len 6) + $rstr061 = 'tsi-es' + (RandomString -allChars $false -len 6) + $rstr07 = 'tsi-ap' + (RandomString -allChars $false -len 6) + $rstr071 = 'tsi-ap' + (RandomString -allChars $false -len 6) + $rstr08 = 'tsirds' + (RandomLetters -len 6 -lowerCase $true) + $rstr081 = 'tsirds' + (RandomLetters -len 6 -lowerCase $true) + $env.Add('staaccountName', $rstr01) + $env.Add('eventHubSpaceName', $rstr02) + $env.Add('eventHubSpaceName01', $rstr021) + $env.Add('eventHubName', $rstr03) + $env.Add('eventHubName01', $rstr031) + $env.Add('iotHubName', $rstr04) + $env.Add('tsiEnvName', $rstr05) + $env.Add('tsiEnvName01', $rstr051) + $env.Add('tsiEsName', $rstr06) + $env.Add('tsiEsName01', $rstr061) + $env.Add('accessPolicy', $rstr07) + $env.Add('accessPolicy01', $rstr071) + $env.Add('referenceDataSet', $rstr08) + $env.Add('referenceDataSet01', $rstr081) + + # Generate some random strings for use in the test. + $rstrenv01 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrenv02 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrenv03 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrenv04 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrenv05 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrenv06 = 'rstr-' + (RandomString -allChars $false -len 6) + $env.Add('rstrenv01', $rstrenv01) + $env.Add('rstrenv02', $rstrenv02) + $env.Add('rstrenv03', $rstrenv03) + $env.Add('rstrenv04', $rstrenv04) + $env.Add('rstrenv05', $rstrenv05) + $env.Add('rstrenv06', $rstrenv06) + + $rstres01 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstres02 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstres03 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstres04 = 'rstr-' + (RandomString -allChars $false -len 6) + $env.Add('rstres01', $rstres01) + $env.Add('rstres02', $rstres02) + $env.Add('rstres03', $rstres03) + $env.Add('rstres04', $rstres04) + + $rstrap01 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrap02 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrap03 = 'rstr-' + (RandomString -allChars $false -len 6) + $env.Add('rstrap01', $rstrap01) + $env.Add('rstrap02', $rstrap02) + $env.Add('rstrap03', $rstrap03) + + $rstrds01 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstrds02 = 'rstr-' + (RandomString -allChars $false -len 6) + $env.Add('rstrds01', $rstrds01) + $env.Add('rstrds02', $rstrds02) + + + $rstr30 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstr31 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstr32 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstr33 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstr34 = 'rstr-' + (RandomString -allChars $false -len 6) + $rstr35 = 'rstr-' + (RandomString -allChars $false -len 6) + $env.Add('rstr30', $rstr30) + $env.Add('rstr31', $rstr31) + $env.Add('rstr32', $rstr32) + $env.Add('rstr33', $rstr33) + $env.Add('rstr34', $rstr34) + $env.Add('rstr35', $rstr35) + + # create resource group for test. + $resourceGroup = 'tsi-test-' + (RandomString -allChars $false -len 6) + $Location = 'eastus2' + Write-Host -ForegroundColor Green 'Start creating resource group for test...' + New-AzResourceGroup -Name $resourceGroup -Location $Location + $env.Add('resourceGroup', $resourceGroup) + $env.Add('location', $Location) + Write-Host -ForegroundColor Green 'Resource group created successfully.' + + Write-Host -ForegroundColor Green '--------------------------------------------' + Write-Host -ForegroundColor Green 'Start deploying resources for testing.' + # create storage account for test. + $staAccountParam = (CreateStaAccount -staAccountName $env.staaccountName -resourceGroup $env.resourceGroup -location $env.location -Sku Standard_GRS) + + # create eventhub for test. + $eventHubParam = (CreateEventHub -eventHubSpaceName $env.eventHubSpaceName -eventHubName $env.eventHubName -resourceGroup $env.resourceGroup -location $env.location) + $eventHubParam01 = (CreateEventHub -eventHubSpaceName $env.eventHubSpaceName01 -eventHubName $env.eventHubName01 -resourceGroup $env.resourceGroup -location $env.location) + + # create TimeSeriesInsightsEnvironment for test. + $tsiEnvParamObj = @{TsiEnvName = $env.tsiEnvName;Kind='Standard'; SkuName='S1'; Location=$env.location} + $tsiEnvParamObj01 = @{TsiEnvName = $env.tsiEnvName01;Kind='LongTerm'; SkuName='L1'; Location=$env.location} + $tsiEnv = (GetOrCreateTsiEnv -forceCreate $true -tsiEnvParamObj $tsiEnvParamObj -resourceGroup $env.resourceGroup) + $tsiEnv01 = (GetOrCreateTsiEnv -forceCreate $true -tsiEnvParamObj $tsiEnvParamObj01 -resourceGroup $env.resourceGroup -staccountParamObj $staAccountParam) + + # create AzTimeSeriesInsightsEventSource(Kind:EventHub) for test. + $tsiEs = (CreateTsiEventSource -tsiEevntSourceName $env.tsiEsName -resourceGroup $env.resourceGroup -tsiEnv $tsiEnv -eventhubParam $eventHubParam) + $tsiEs01 = (CreateTsiEventSource -tsiEevntSourceName $env.tsiEsName01 -resourceGroup $env.resourceGroup -tsiEnv $tsiEnv01 -eventhubParam $eventHubParam01) + + # create AzTimeSeriesInsightsAccessPolicy for test. + Write-Host -ForegroundColor Green 'Start creating AzTimeSeriesInsightsAccessPolicy for test...' + $role = 'Reader' + New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $env.tsiEnvName -ResourceGroupName $env.resourceGroup -PrincipalObjectId $env.principalObjectId -Role $role -Name $env.accessPolicy + New-AzTimeSeriesInsightsAccessPolicy -EnvironmentName $env.tsiEnvName01 -ResourceGroupName $env.resourceGroup -PrincipalObjectId $env.principalObjectId -Role $role -Name $env.accessPolicy01 + Write-Host -ForegroundColor Green 'AzTimeSeriesInsightsAccessPolicy created successfully.' + + # create AzTimeSeriesInsightsAccessPolicy for test. + Write-Host -ForegroundColor Green 'Start creating AzTimeSeriesInsightsReferenceDataSet for test...' + $mykeyproperties = @{ "name" = "device01"; "type" = "Double"} + New-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName $env.tsiEnvName -Name $env.referenceDataSet -ResourceGroupName $env.resourceGroup -Location $env.location -DataStringComparisonBehavior Ordinal -KeyProperty $mykeyproperties + Write-Host -ForegroundColor Green 'AzTimeSeriesInsightsReferenceDataSet created successfully.' + + Write-Host -ForegroundColor Green 'Deployment complete.' + Write-Host -ForegroundColor Green '--------------------------------------------' + + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) + +} +function cleanupEnv() { + # Clean resources you create for testing +} + From 7b42b00f5a158f5e2b0fd9ded6d6ef14e7a8c0b8 Mon Sep 17 00:00:00 2001 From: LucasYao93 Date: Thu, 2 Apr 2020 18:25:53 -0700 Subject: [PATCH 4/7] Remove exec-test.ps1 file --- src/TimeSeriesInsights/test/exec-test.ps1 | 72 ----------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/TimeSeriesInsights/test/exec-test.ps1 diff --git a/src/TimeSeriesInsights/test/exec-test.ps1 b/src/TimeSeriesInsights/test/exec-test.ps1 deleted file mode 100644 index 3a9d848b246f..000000000000 --- a/src/TimeSeriesInsights/test/exec-test.ps1 +++ /dev/null @@ -1,72 +0,0 @@ -# ---------------------------------------------------------------------------------- -# -# Copyright Microsoft Corporation -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [string]$TestCase) -$ErrorActionPreference = 'Stop' - -if(-not $Isolated) { - Write-Host -ForegroundColor Green 'Creating isolated process...' - $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated - return -} - -$ProgressPreference = 'SilentlyContinue' -$baseName = $PSScriptRoot.BaseName -$requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -. ("$PSScriptRoot\test\utils.ps1") -. ("$PSScriptRoot\test\helper.ps1") - -if ($requireResourceModule) { - $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') - Import-Module -Name $resourceModulePSD.FullName -} - -$localModulesPath = Join-Path $PSScriptRoot 'generated/modules' -if(Test-Path -Path $localModulesPath) { - $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" -} - -$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.TimeSeriesInsights.psd1') -$modulePath = $modulePsd1.FullName -$moduleName = $modulePsd1.BaseName - -Import-Module -Name Pester -Import-Module -Name $modulePath - - -$TestMode = 'playback' -if($Live) { - $TestMode = 'live' -} -if($Record) { - $TestMode = 'record' -} -try { - GetUseModules - if ($TestMode -ne 'playback') { - #setupEnv - } - $testCaseFolder = join-Path $PSScriptRoot "test\$TestCase" - $testFolder = Join-Path $PSScriptRoot 'test' - #Invoke-Pester -Script @{ Path = $testCaseFolder } -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") -} -Finally -{ - if ($TestMode -ne 'playback') { - #cleanupEnv - } -} - -Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file From 2c05345ebd3aa842b3b72ef18af2964a547d2ca3 Mon Sep 17 00:00:00 2001 From: LucasYao93 Date: Thu, 2 Apr 2020 18:34:06 -0700 Subject: [PATCH 5/7] Modified cleanupEnv func of utils.ps1 --- src/TimeSeriesInsights/test/utils.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/TimeSeriesInsights/test/utils.ps1 b/src/TimeSeriesInsights/test/utils.ps1 index 872167f78f64..83ebec29372b 100644 --- a/src/TimeSeriesInsights/test/utils.ps1 +++ b/src/TimeSeriesInsights/test/utils.ps1 @@ -145,5 +145,6 @@ function setupEnv() { } function cleanupEnv() { # Clean resources you create for testing + Remove-AzResourceGroup -Name $env.resourceGroup } From 5afa35550df7aad6545de2f9937af6d39b5233e4 Mon Sep 17 00:00:00 2001 From: LucasYao93 Date: Wed, 8 Apr 2020 01:41:05 -0700 Subject: [PATCH 6/7] modified test cases and examples. --- .../Get-AzTimeSeriesInsightsAccessPolicy.md | 14 +- .../Get-AzTimeSeriesInsightsEnvironment.md | 28 ++ .../Get-AzTimeSeriesInsightsEventSource.md | 25 +- ...et-AzTimeSeriesInsightsReferenceDataSet.md | 14 +- ...Remove-AzTimeSeriesInsightsAccessPolicy.md | 15 +- .../Remove-AzTimeSeriesInsightsEnvironment.md | 11 +- .../Remove-AzTimeSeriesInsightsEventSource.md | 11 +- ...ve-AzTimeSeriesInsightsReferenceDataSet.md | 11 +- ...Update-AzTimeSeriesInsightsAccessPolicy.md | 14 +- .../Update-AzTimeSeriesInsightsEnvironment.md | 29 +- .../Update-AzTimeSeriesInsightsEventSource.md | 22 +- ...te-AzTimeSeriesInsightsReferenceDataSet.md | 15 +- .../Az.TimeSeriesInsights-TestResults.xml | 142 ++++---- ...eSeriesInsightsAccessPolicy.Recording.json | 72 ++-- ...meSeriesInsightsEnvironment.Recording.json | 80 ++--- ...meSeriesInsightsEventSource.Recording.json | 80 ++--- ...iesInsightsReferenceDataSet.Recording.json | 80 ++--- ...eSeriesInsightsAccessPolicy.Recording.json | 96 ++--- ...meSeriesInsightsEnvironment.Recording.json | 328 +++++++++++++----- ...-AzTimeSeriesInsightsEnvironment.Tests.ps1 | 8 +- ...meSeriesInsightsEventSource.Recording.json | 96 ++--- ...-AzTimeSeriesInsightsEventSource.Tests.ps1 | 29 +- ...iesInsightsReferenceDataSet.Recording.json | 20 +- ...eSeriesInsightsAccessPolicy.Recording.json | 92 ++--- ...meSeriesInsightsEnvironment.Recording.json | 96 ++--- ...meSeriesInsightsEventSource.Recording.json | 100 +++--- ...iesInsightsReferenceDataSet.Recording.json | 210 +++++++---- ...eSeriesInsightsAccessPolicy.Recording.json | 100 +++--- ...meSeriesInsightsEnvironment.Recording.json | 240 ++++++------- ...meSeriesInsightsEventSource.Recording.json | 60 ++-- ...iesInsightsReferenceDataSet.Recording.json | 100 +++--- src/TimeSeriesInsights/test/env.json | 82 +++-- src/TimeSeriesInsights/test/helper.ps1 | 63 ++-- src/TimeSeriesInsights/test/utils.ps1 | 46 ++- 34 files changed, 1441 insertions(+), 988 deletions(-) diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md index 74c0a342fc1b..a6180401ad1d 100644 --- a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsAccessPolicy.md @@ -10,7 +10,7 @@ policy002 Microsoft.TimeSeriesInsights/Environments/AccessPolicies This command lists all access policies under a specified environment. -### Example 2: Get a specified access policy +### Example 2: Get a specified access policy by name ```powershell PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001 @@ -19,4 +19,16 @@ Name Type policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies ``` +This command gets a specified access policy. + +### Example 3: Get a specified access policy by object +```powershell +PS C:\>$ap = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsi-envv8u56x -ResourceGroupName tsi-test-i01k5l -Name tsi-apilgj5y +PS C:\>Get-AzTimeSeriesInsightsAccessPolicy -InputObject $ap + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + This command gets a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md index c23a9307cb4e..b2f1a722375c 100644 --- a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md @@ -78,3 +78,31 @@ Type : Microsoft.TimeSeriesInsights/Environments This command lists all time series insights environments in a resource group. +### Example 3: Get a time series insights environments by object +```powershell +PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x +PS C:\> Get-AzTimeSeriesInsightsEnvironment -InputObject $env + +DataAccessFqdn : d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com +DataAccessId : d76a61f2-8a30-41a5-9587-f241eb9b48d9 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x +IngressState : +Kind : Standard +Location : eastus2 +Name : tsi-envv8u56x +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 1 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command gets a time series insights environments. diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md index 6637ce338d89..39c0250f6c0c 100644 --- a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEventSource.md @@ -33,9 +33,9 @@ Type : Microsoft.TimeSeriesInsights/Environments/EventSources This command lists all event sources under the specified environments. -### Example 2: Get a specified event source +### Example 2: Get a specified event source by name ```powershell -PS C:\> et-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 +PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 ConsumerGroupName : testgroup2 EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 @@ -53,3 +53,24 @@ Type : Microsoft.TimeSeriesInsights/Environments/EventSources This command gets a specific event source. +### Example 3: Get a specified event source by object +```powershell +PS C:\> $es = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsi-esrfyi9h +PS C:\> Get-AzTimeSeriesInsightsEventSource -InputObject $es + +ConsumerGroupName : tsi-test-i01k5l +EventHubName : eventhubname-d2rvmp +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h +KeyName : RootManageSharedAccessKey +Kind : Microsoft.EventHub +Location : eastus2 +Name : tsi-esrfyi9h +ServiceBusNamespace : eventhubspace-0t3khp +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command gets a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md index 387b9bb9a1da..6bd1d0ac14cd 100644 --- a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsReferenceDataSet.md @@ -10,7 +10,7 @@ eastus dstest002 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets This command lists all reference data sets under the specified environment. -### Get a specified reference data set +### Example 2: Get a specified reference data set by name ```powershell PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 @@ -20,3 +20,15 @@ eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets ``` This command gets a specified reference data set. + +### Example 3: Get a specified reference data set by object +```powershell +PS C:\> $ds = Get-AzTimeSeriesInsightsReferenceDataSet -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsirdsqwufij +PS C:\>Get-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds + +Location Name Type +-------- ---- ---- +eastus2 tsirdsqwufij Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command gets a specified reference data set. diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md index eaeefc5cc207..ca6739bff314 100644 --- a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsAccessPolicy.md @@ -1,7 +1,18 @@ -### Example 1: Remove a specified access policy +### Example 1: Remove a specified access policy by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup ``` -This command removes a specified access policy. \ No newline at end of file +This command removes a specified access policy. + +### Example 2: Remove a specified access policy by object +```powershell +PS C:\> $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup +PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -InputObject $policy + +``` + +This command removes a specified access policy. + + diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md index ce2200de7176..2885ec91c6bd 100644 --- a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEnvironment.md @@ -1,4 +1,4 @@ -### Example 1: Remove a time series insights environment +### Example 1: Remove a time series insights environment by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill @@ -6,3 +6,12 @@ PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Nam This command removes a time series insights environment. +### Example 2: Remove a time series insights environment by object +```powershell +PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill +PS C:\> Remove-AzTimeSeriesInsightsEnvironment -InputObject $env + +``` + +This command removes a time series insights environment. + diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md index 7be0d3d3e122..4bdb1a799df2 100644 --- a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsEventSource.md @@ -1,4 +1,4 @@ -### Example 1: Remove a specified event source +### Example 1: Remove a specified event source by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup @@ -6,3 +6,12 @@ PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name This removes a specific event source. +### Example 2: Remove a specified event source by object +```powershell +PS C:\> $es = Get-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name iots001 +PS C:\> Remove-AzTimeSeriesInsightsEventSource -InputObject $es + +``` + +This removes a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md index 1a4a36127f2f..9e8dddf6b01b 100644 --- a/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md +++ b/src/TimeSeriesInsights/examples/Remove-AzTimeSeriesInsightsReferenceDataSet.md @@ -1,7 +1,16 @@ -### Example 1: Remove a specified reference data set +### Example 1: Remove a specified reference data set by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup ``` This command removes a specified reference data set. + +### Example 2: Remove a specified reference data set by object +```powershell +PS C:\> $ds = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup +PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds + +``` + +This command removes a specified reference data set. diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md index 540616982f45..34c2d942d3eb 100644 --- a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsAccessPolicy.md @@ -1,4 +1,4 @@ -### Example 1: Update a specified access policy +### Example 1: Update a specified access policy by name ```powershell PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup -Role Contributor,Reader @@ -7,4 +7,16 @@ Name Type policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies ``` +This command updates a specified access policy. + +### Example 2: Update a specified access policy by object +```powershell +PS C:\> $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName $env.resourceGroup -Name policy001 +PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -InputObject $policy -Role Contributor + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + This command updates a specified access policy. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md index c0d587b4d08b..e2cb7f3c8cbf 100644 --- a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEnvironment.md @@ -27,12 +27,33 @@ Type : Microsoft.TimeSeriesInsights/Environments This command updates a standard time series insights environment. -### Example 2: {{ Api definition for update a longterm environment is missing in swagger and should be added in the future}} +### Example 2: Update a standard time series insights environment ```powershell -PS C:\> {{ Add code here }} +PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 +PS C:\> PS C:\> Update-AzTimeSeriesInsightsEnvironment -InputObject $env -Capacity 6 -Sku S1 -{{ Add output here }} +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 6 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments ``` -{{ Add description here }} +This command updates a standard time series insights environment. diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md index df6267a75b30..13d0ddea141f 100644 --- a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsEventSource.md @@ -1,4 +1,4 @@ -### Example 1: Update a specified event source +### Example 1: Update a specified event source by name ```powershell PS C:\> Update-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup -Tag @{"tgk"="001"} @@ -17,3 +17,23 @@ Type : Microsoft.TimeSeriesInsights/Environments/EventSources This command updates a specific event source. +### Example 3: Update a specified event source by object +```powershell +PS C:\>$es = Get-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name iots001 +PS C:\> Update-AzTimeSeriesInsightsEventSource -InputObject -Tag @{"tgb"="002"} + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eventsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command updates a specific event source. + diff --git a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md index c62470c92a46..062eb40ecae7 100644 --- a/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md +++ b/src/TimeSeriesInsights/examples/Update-AzTimeSeriesInsightsReferenceDataSet.md @@ -1,4 +1,4 @@ -### Example 1: Update a specified reference data set +### Example 1: Update a specified reference data set by name ```powershell PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Tag @{"tstg"="lb001"} @@ -8,3 +8,16 @@ eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets ``` This command updates a specified reference data set. + +### Example 2: Update a specified reference data set by object +```powershell +PS C:\> $ds = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 +PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds -Tag @{"tstg"="lb001"} + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command updates a specified reference data set. + diff --git a/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml b/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml index a5fcf35b6902..f89de130ad8b 100644 --- a/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml +++ b/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml @@ -1,169 +1,169 @@  - - + + - + - + - + - - - + + + - + - + - - - + + + - + - + - - - + + + - + - + - - - + + + - + - + - + - + - + - - + + - + - + - - + + - + - + - + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - - - + + + + - + - + - - + + - + - + - - + + diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json index e2665f8ac84b..0e6a2ecfed18 100644 --- a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -1,12 +1,12 @@ { - "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accessPolicies?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accessPolicies?api-version=2018-08-15-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "375839ab-258d-49a8-b6ea-8a1e2e7dc011" ], + "x-ms-client-request-id": [ "43a95d81-8888-475a-aa15-2aaa9edb07c5" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,31 +21,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ed88bb0c-5792-49a9-9062-f61400acba11" ], + "x-ms-request-id": [ "9dd93a04-01ac-46e5-a60e-0613ff5f1ef9" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "278bb98b-9033-45f5-8300-c372de0e1a02" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113147Z:278bb98b-9033-45f5-8300-c372de0e1a02" ], - "Date": [ "Thu, 02 Apr 2020 11:31:47 GMT" ] + "x-ms-correlation-request-id": [ "3c596e62-a417-48dd-89f5-925612ce7f01" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073512Z:3c596e62-a417-48dd-89f5-925612ce7f01" ], + "Date": [ "Wed, 08 Apr 2020 07:35:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "378" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" + "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" } }, - "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "43c6ba87-619d-45ca-b67a-f30c7b49c12f" ], + "x-ms-client-request-id": [ "7f9ea9c6-9499-4ac6-b69c-47caea071c69" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,31 +60,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "919670c2-fa6a-4ba8-a39c-5f47333859ed" ], + "x-ms-request-id": [ "4e570a3b-7ef8-4e92-bc85-1a304fc1b7ad" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "70713022-0e53-48aa-8950-ea51c3c23b27" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113148Z:70713022-0e53-48aa-8950-ea51c3c23b27" ], - "Date": [ "Thu, 02 Apr 2020 11:31:47 GMT" ] + "x-ms-correlation-request-id": [ "33bc8732-8f81-471f-b02b-a893dbca4a58" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073513Z:33bc8732-8f81-471f-b02b-a893dbca4a58" ], + "Date": [ "Wed, 08 Apr 2020 07:35:13 GMT" ] }, "ContentHeaders": { "Content-Length": [ "366" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } }, - "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "310003bf-3b8f-4e19-8fb7-f9eb5de19b85" ], + "x-ms-client-request-id": [ "938241e6-1d67-41de-8013-ef3b8862623d" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -99,31 +99,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "362683e7-ac93-4f21-bfe0-016d998b1c5b" ], + "x-ms-request-id": [ "ddb81be1-791e-4328-b7de-f4eddeb7aef2" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "3aa70351-ae48-44b7-950e-3bb7e619f6eb" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113148Z:3aa70351-ae48-44b7-950e-3bb7e619f6eb" ], - "Date": [ "Thu, 02 Apr 2020 11:31:48 GMT" ] + "x-ms-correlation-request-id": [ "9ccdca19-7968-445f-af09-6bae6e30c62c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073513Z:9ccdca19-7968-445f-af09-6bae6e30c62c" ], + "Date": [ "Wed, 08 Apr 2020 07:35:13 GMT" ] }, "ContentHeaders": { "Content-Length": [ "366" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } }, - "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+2": { + "Get-AzTimeSeriesInsightsAccessPolicy+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview", "Content": null, "Headers": { "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "bebaa654-0a4e-42f3-8f9f-7beb7ed97cb8" ], + "x-ms-client-request-id": [ "251bd013-47d0-4add-ac44-93ab72055515" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -138,21 +138,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ec2ce78a-08ea-4b6a-980d-5dee62a5a219" ], + "x-ms-request-id": [ "4edea34a-8fc7-40df-b0eb-0cad54d981e8" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "b61b675f-b9a0-4251-8808-6535b1cebe59" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113149Z:b61b675f-b9a0-4251-8808-6535b1cebe59" ], - "Date": [ "Thu, 02 Apr 2020 11:31:48 GMT" ] + "x-ms-correlation-request-id": [ "d100fd2f-72a3-489a-affa-304b5478a38e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073514Z:d100fd2f-72a3-489a-affa-304b5478a38e" ], + "Date": [ "Wed, 08 Apr 2020 07:35:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "366" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json index 7db00c8af731..cd162c136057 100644 --- a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEnvironment.Recording.json @@ -1,12 +1,12 @@ { - "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "7178266c-eb9d-4164-8f16-4ee7ce2888ee" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "a0b22ff7-576b-4f30-ae75-1c678b4473fa" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,31 +21,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7517ae6e-7242-4b49-8d3a-68e4b04d6abc" ], + "x-ms-request-id": [ "97b9236e-2f64-4f4c-b3f5-713747655d46" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "c5b72f03-572e-4da4-99cc-e2aea1b0960a" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113535Z:c5b72f03-572e-4da4-99cc-e2aea1b0960a" ], - "Date": [ "Thu, 02 Apr 2020 11:35:34 GMT" ] + "x-ms-correlation-request-id": [ "95fcae78-7412-4504-9345-848997f18ab1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073514Z:95fcae78-7412-4504-9345-848997f18ab1" ], + "Date": [ "Wed, 08 Apr 2020 07:35:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1407" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" + "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" } }, - "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "a99262e2-1c84-4cdd-b7cc-11ab024dcfde" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "42de3a21-4272-4909-9cc7-d89261616cba" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,31 +60,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "20c49fd3-f469-4076-88d1-4a2a8581df4e" ], + "x-ms-request-id": [ "a69af916-c333-4248-a3e2-7ffd9cfc7321" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "27ee4352-bc4e-4997-ac5a-5851bd1d2072" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113535Z:27ee4352-bc4e-4997-ac5a-5851bd1d2072" ], - "Date": [ "Thu, 02 Apr 2020 11:35:35 GMT" ] + "x-ms-correlation-request-id": [ "5fd2125d-6d9f-4563-bd0c-787a10fbb5e4" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073515Z:5fd2125d-6d9f-4563-bd0c-787a10fbb5e4" ], + "Date": [ "Wed, 08 Apr 2020 07:35:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "693" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+InputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+InputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "598d313f-510b-4976-8b9e-0f4aed701008" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "197c8425-687c-48b9-8c9e-3a363daf393b" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -99,31 +99,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "c1aeef69-ec12-4d50-9de9-e44c44bd4bca" ], + "x-ms-request-id": [ "47f74274-ffa5-485a-9b1c-e9e3b8ad7217" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "fdc2aeec-1936-4b84-90b0-09a54086c928" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113536Z:fdc2aeec-1936-4b84-90b0-09a54086c928" ], - "Date": [ "Thu, 02 Apr 2020 11:35:35 GMT" ] + "x-ms-correlation-request-id": [ "804d1b6c-ad51-4712-8dd9-56eefd3f1bbc" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073515Z:804d1b6c-ad51-4712-8dd9-56eefd3f1bbc" ], + "Date": [ "Wed, 08 Apr 2020 07:35:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "701" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+InputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+2": { + "Get-AzTimeSeriesInsightsEnvironment+[NoContext]+InputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "34f20ae4-6416-4e00-a4d3-60246790630f" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "9b9f911f-a225-49a2-abbd-f5d6ab4be22e" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -138,21 +138,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8d9042a9-4cd0-4f72-8b37-80643a959c60" ], + "x-ms-request-id": [ "6c17f8c2-fe96-4c6c-b3ff-81828ae84769" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "9434ed58-3729-4610-a76d-458ad800f8d5" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113536Z:9434ed58-3729-4610-a76d-458ad800f8d5" ], - "Date": [ "Thu, 02 Apr 2020 11:35:36 GMT" ] + "x-ms-correlation-request-id": [ "d4f15e14-a389-4e4b-8186-8d9a82eee662" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073516Z:d4f15e14-a389-4e4b-8186-8d9a82eee662" ], + "Date": [ "Wed, 08 Apr 2020 07:35:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "701" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json index 4ac7fa34b6bf..96e640ac4307 100644 --- a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsEventSource.Recording.json @@ -1,12 +1,12 @@ { - "Get-AzTimeSeriesInsightsEventSource+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventSources?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventSources?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventSources?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventSources?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "c3bc31fb-3d2c-4677-a50b-e7aaaf27986f" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "357c50cb-8ba2-467e-9500-4fea036f1cc5" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,31 +21,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "da76b103-0503-4ba4-93ee-8d7455bcb942" ], + "x-ms-request-id": [ "fc15b5dd-dcca-43a3-87fc-7cba5df9c4f3" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "2db69788-de78-44b9-996b-99785e690cfe" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113623Z:2db69788-de78-44b9-996b-99785e690cfe" ], - "Date": [ "Thu, 02 Apr 2020 11:36:23 GMT" ] + "x-ms-correlation-request-id": [ "68f07b8e-cd20-4a81-854f-4be9af5ac80f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073517Z:68f07b8e-cd20-4a81-854f-4be9af5ac80f" ], + "Date": [ "Wed, 08 Apr 2020 07:35:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "794" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}]}" + "Content": "{\"value\":[{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-d2rvmp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-0t3khp\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:30 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h\",\"name\":\"tsi-esrfyi9h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}]}" } }, - "Get-AzTimeSeriesInsightsEventSource+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "924e9090-2812-4faf-aa34-d1e95906147d" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "b7856219-7a4b-45d9-b70c-efcaf85a658d" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,31 +60,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "960a4d27-662d-43f9-b0c0-85a3dde6ccaf" ], + "x-ms-request-id": [ "006853fa-c33c-4707-bf07-31b8e7623031" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "9c596075-1757-4843-99c9-98b4520b736b" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113624Z:9c596075-1757-4843-99c9-98b4520b736b" ], - "Date": [ "Thu, 02 Apr 2020 11:36:23 GMT" ] + "x-ms-correlation-request-id": [ "43e272aa-3bd0-4b52-9da5-784129d6d723" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073517Z:43e272aa-3bd0-4b52-9da5-784129d6d723" ], + "Date": [ "Wed, 08 Apr 2020 07:35:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "782" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-d2rvmp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-0t3khp\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:30 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h\",\"name\":\"tsi-esrfyi9h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "Get-AzTimeSeriesInsightsEventSource+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "61befd48-beb6-4be0-b131-1e436d8e8ceb" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "13b8e20a-0557-4ab4-88e4-aa8c7ae696d7" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -99,31 +99,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4351ea86-645f-45db-90b4-a69aa3e67a00" ], + "x-ms-request-id": [ "6004f88f-f203-4028-9a05-37fd2a917d3e" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "6e09e1c1-2029-4db4-ba0b-9d0c521756a5" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113624Z:6e09e1c1-2029-4db4-ba0b-9d0c521756a5" ], - "Date": [ "Thu, 02 Apr 2020 11:36:24 GMT" ] + "x-ms-correlation-request-id": [ "f6f9eeb2-15a9-4599-8866-a26e90679655" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073518Z:f6f9eeb2-15a9-4599-8866-a26e90679655" ], + "Date": [ "Wed, 08 Apr 2020 07:35:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "782" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-d2rvmp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-0t3khp\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:30 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h\",\"name\":\"tsi-esrfyi9h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "Get-AzTimeSeriesInsightsEventSource+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+2": { + "Get-AzTimeSeriesInsightsEventSource+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "63bdf504-7e92-49dc-b052-e1486cc46a73" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "f2af4360-02b6-4c23-a424-55a21e1d5ef1" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -138,21 +138,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "63f14e2e-0bda-48ce-8165-4e2ab8dbf91a" ], + "x-ms-request-id": [ "16de39f3-bd6d-412e-85d0-602fe715a9bc" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "57914beb-f7dd-454b-88e9-320f8ff62e2d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113625Z:57914beb-f7dd-454b-88e9-320f8ff62e2d" ], - "Date": [ "Thu, 02 Apr 2020 11:36:24 GMT" ] + "x-ms-correlation-request-id": [ "8a8f5d30-551c-422b-98a7-ed36987e1ce6" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073518Z:8a8f5d30-551c-422b-98a7-ed36987e1ce6" ], + "Date": [ "Wed, 08 Apr 2020 07:35:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "782" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-d2rvmp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-0t3khp\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:30 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h\",\"name\":\"tsi-esrfyi9h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json index 36678d33606c..551e9cbbc676 100644 --- a/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json +++ b/src/TimeSeriesInsights/test/Get-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -1,12 +1,12 @@ { - "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+List+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "54f10b92-b6d6-4b62-b523-07071e0905b1" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "e041b3bb-074e-49dd-b411-5d570c9e0cb7" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,31 +21,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "3197a7b8-4961-444c-83f8-4608ec0fce0a" ], + "x-ms-request-id": [ "2689e36d-ec9d-48d2-856a-e9706981c545" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "4ab01061-72eb-4b6a-9f6a-578b471201dc" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113828Z:4ab01061-72eb-4b6a-9f6a-578b471201dc" ], - "Date": [ "Thu, 02 Apr 2020 11:38:27 GMT" ] + "x-ms-correlation-request-id": [ "29bcb083-7a05-43f5-8e64-3869cd75f7bf" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073519Z:29bcb083-7a05-43f5-8e64-3869cd75f7bf" ], + "Date": [ "Wed, 08 Apr 2020 07:35:19 GMT" ] }, "ContentHeaders": { "Content-Length": [ "513" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}]}" + "Content": "{\"value\":[{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}]}" } }, - "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "63365e20-9a36-4a51-a425-f1682d8d6e86" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "62ddff1d-74bc-439f-8be4-f8b8c29b7676" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -60,31 +60,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8e4360ba-e9ec-4b8f-a75b-e382805b3c5d" ], + "x-ms-request-id": [ "1855ac52-5e18-46cc-9dda-2a17c384381e" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "f9eadf90-5fc4-423d-a4f0-81204e589b5c" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113828Z:f9eadf90-5fc4-423d-a4f0-81204e589b5c" ], - "Date": [ "Thu, 02 Apr 2020 11:38:28 GMT" ] + "x-ms-correlation-request-id": [ "58ea6e05-b48c-4ad3-a42b-99847ca4f1fc" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073519Z:58ea6e05-b48c-4ad3-a42b-99847ca4f1fc" ], + "Date": [ "Wed, 08 Apr 2020 07:35:19 GMT" ] }, "ContentHeaders": { "Content-Length": [ "501" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "fff42755-c1ae-4bde-9774-18c5eaf07061" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "06f0528e-f079-45ba-b5a4-6a6d63f3a303" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -99,31 +99,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8d39315c-0488-4902-8d71-6a0439abf508" ], + "x-ms-request-id": [ "7b0a62d5-d1c6-4bbe-8f25-8c56904b5311" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "e5df59c1-c31e-4d35-a5d7-f0a3207d1178" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113829Z:e5df59c1-c31e-4d35-a5d7-f0a3207d1178" ], - "Date": [ "Thu, 02 Apr 2020 11:38:28 GMT" ] + "x-ms-correlation-request-id": [ "5aac1a36-889e-4a55-9245-e873e0245b81" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073520Z:5aac1a36-889e-4a55-9245-e873e0245b81" ], + "Date": [ "Wed, 08 Apr 2020 07:35:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "501" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+2": { + "Get-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "8983476f-d219-4bb2-b2e9-579e518be3a3" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "75fad7cc-6f93-4a09-8f82-9548465deccc" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_GetViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -138,21 +138,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "a233edc7-394c-4ff1-9073-c9256defc9e9" ], + "x-ms-request-id": [ "07a55bbc-baa0-4b8f-8b8c-944842e32614" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "a66cfbdf-f23a-4646-990f-ff27a138c3fc" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113829Z:a66cfbdf-f23a-4646-990f-ff27a138c3fc" ], - "Date": [ "Thu, 02 Apr 2020 11:38:29 GMT" ] + "x-ms-correlation-request-id": [ "b436c3d5-3403-40d2-9dd0-2f5d39f3008f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073520Z:b436c3d5-3403-40d2-9dd0-2f5d39f3008f" ], + "Date": [ "Wed, 08 Apr 2020 07:35:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "501" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json index 937dad009166..c6933312ba29 100644 --- a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -1,12 +1,12 @@ { - "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+1": { + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview", "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "c02697b8-8374-44f8-8f18-da22221fe56b" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "b577d100-bd29-4b92-8a8b-76bd584b6dce" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -26,28 +26,28 @@ "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bebaee53-76c3-4fce-9cb5-0fe8cf287302" ], + "x-ms-request-id": [ "69e57506-f1d8-4c7e-969d-5e7c0a84d63d" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "9a58e680-1717-40bc-9d25-36c0ea5c01ea" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T113937Z:9a58e680-1717-40bc-9d25-36c0ea5c01ea" ], - "Date": [ "Thu, 02 Apr 2020 11:39:37 GMT" ] + "x-ms-correlation-request-id": [ "9c29185b-bfdc-4088-a278-32b082dd66a7" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073527Z:9c29185b-bfdc-4088-a278-32b082dd66a7" ], + "Date": [ "Wed, 08 Apr 2020 07:35:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "654" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"2020-04-02T11:39:35+00:00\",\"provisioningState\":\"Accepted\",\"dataAccessId\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf\",\"dataAccessFqdn\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\",\"storageLimitExceededBehavior\":\"PurgeOldData\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur\",\"name\":\"rstr-h5qvur\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"2020-04-08T07:35:25+00:00\",\"provisioningState\":\"Accepted\",\"dataAccessId\":\"64b41593-f9cb-4804-8f18-8d542f304af0\",\"dataAccessFqdn\":\"64b41593-f9cb-4804-8f18-8d542f304af0.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\",\"storageLimitExceededBehavior\":\"PurgeOldData\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1\",\"name\":\"rstr-8uxmh1\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+2": { + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1", "2" ], - "x-ms-client-request-id": [ "c02697b8-8374-44f8-8f18-da22221fe56b", "c02697b8-8374-44f8-8f18-da22221fe56b" ], + "x-ms-unique-id": [ "17", "18" ], + "x-ms-client-request-id": [ "b577d100-bd29-4b92-8a8b-76bd584b6dce", "b577d100-bd29-4b92-8a8b-76bd584b6dce" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets" ], @@ -62,31 +62,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e1dcc0ab-7c39-4b60-a28e-96b90e86dd95" ], + "x-ms-request-id": [ "aa03c65c-92fa-4375-9553-eeb149de6eea" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "d9ba15f0-e9d3-44da-9db0-05d58852d697" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114008Z:d9ba15f0-e9d3-44da-9db0-05d58852d697" ], - "Date": [ "Thu, 02 Apr 2020 11:40:07 GMT" ] + "x-ms-correlation-request-id": [ "0b88b9ed-2931-47d8-b348-237c90ef172c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073558Z:0b88b9ed-2931-47d8-b348-237c90ef172c" ], + "Date": [ "Wed, 08 Apr 2020 07:35:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:39:35 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf\",\"dataAccessFqdn\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur\",\"name\":\"rstr-h5qvur\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:35:25 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"64b41593-f9cb-4804-8f18-8d542f304af0\",\"dataAccessFqdn\":\"64b41593-f9cb-4804-8f18-8d542f304af0.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1\",\"name\":\"rstr-8uxmh1\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+3": { + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1", "2", "3" ], - "x-ms-client-request-id": [ "c02697b8-8374-44f8-8f18-da22221fe56b", "c02697b8-8374-44f8-8f18-da22221fe56b", "c02697b8-8374-44f8-8f18-da22221fe56b" ], + "x-ms-unique-id": [ "17", "18", "19" ], + "x-ms-client-request-id": [ "b577d100-bd29-4b92-8a8b-76bd584b6dce", "b577d100-bd29-4b92-8a8b-76bd584b6dce", "b577d100-bd29-4b92-8a8b-76bd584b6dce" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets", "__AllParameterSets" ], @@ -101,31 +101,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "819ad231-1b16-4c1b-8796-a9ff24896dfb" ], + "x-ms-request-id": [ "35becc17-bcdf-4e18-9cb9-8ad0d20e1824" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "b1758931-0d38-4166-943b-090f12d1f466" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114008Z:b1758931-0d38-4166-943b-090f12d1f466" ], - "Date": [ "Thu, 02 Apr 2020 11:40:08 GMT" ] + "x-ms-correlation-request-id": [ "74ae624f-674b-468a-932a-6580c79e0fdc" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073558Z:74ae624f-674b-468a-932a-6580c79e0fdc" ], + "Date": [ "Wed, 08 Apr 2020 07:35:58 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:39:35 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf\",\"dataAccessFqdn\":\"1a2a4736-d5cf-426d-ad8f-119622271dcf.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur\",\"name\":\"rstr-h5qvur\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:35:25 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"64b41593-f9cb-4804-8f18-8d542f304af0\",\"dataAccessFqdn\":\"64b41593-f9cb-4804-8f18-8d542f304af0.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1\",\"name\":\"rstr-8uxmh1\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview+4": { + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q?api-version=2018-08-15-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q?api-version=2018-08-15-preview", "Content": "{\n \"properties\": {\n \"principalObjectId\": \"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\n \"roles\": [ \"Reader\" ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "d222322e-8db8-479f-967d-f46789161e38" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "48acf812-9cca-417a-bed1-ed8286c17500" ], "CommandName": [ "New-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "New-AzTimeSeriesInsightsAccessPolicy_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -145,28 +145,28 @@ "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "48791c06-4b3c-47aa-a83a-1d987c14ca3e" ], + "x-ms-request-id": [ "de230ae3-5e83-4b0c-9d0b-3fc01dcd0291" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "e15e8e74-4100-406c-a355-d2a63640e234" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114009Z:e15e8e74-4100-406c-a355-d2a63640e234" ], - "Date": [ "Thu, 02 Apr 2020 11:40:08 GMT" ] + "x-ms-correlation-request-id": [ "95196c44-6007-4eb2-9af5-21bb9cee0052" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073559Z:95196c44-6007-4eb2-9af5-21bb9cee0052" ], + "Date": [ "Wed, 08 Apr 2020 07:35:58 GMT" ] }, "ContentHeaders": { "Content-Length": [ "362" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92\",\"name\":\"rstr-b10a92\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q\",\"name\":\"rstr-hszj9q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } }, - "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview+5": { + "New-AzTimeSeriesInsightsAccessPolicy+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q?api-version=2018-08-15-preview+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "8d46e7d4-e0be-42c5-8cec-ec2de623702e" ], + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "ed61ad34-856d-4632-9740-2e2db4e76b5c" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -181,21 +181,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "3f83756e-f543-4891-81c0-79db07f5000a" ], + "x-ms-request-id": [ "1ea2e27e-6bd2-44fc-85d2-e2a67551b521" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "e0db5095-e947-4aea-97ba-96a31eaaa18d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114009Z:e0db5095-e947-4aea-97ba-96a31eaaa18d" ], - "Date": [ "Thu, 02 Apr 2020 11:40:09 GMT" ] + "x-ms-correlation-request-id": [ "4337935d-38e0-46e0-8486-9f3c24f72e0c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073559Z:4337935d-38e0-46e0-8486-9f3c24f72e0c" ], + "Date": [ "Wed, 08 Apr 2020 07:35:59 GMT" ] }, "ContentHeaders": { "Content-Length": [ "362" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92\",\"name\":\"rstr-b10a92\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q\",\"name\":\"rstr-hszj9q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json index 971e9114ce3f..5eaf2ee395fb 100644 --- a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Recording.json @@ -1,12 +1,12 @@ { - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+1": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview", "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "a73d44e6-5dd4-4884-9a55-4952c36c726f" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "efbd3321-c9c4-462f-9cf1-456a1daaa660" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -18,36 +18,114 @@ "Content-Length": [ "161" ] } }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "485508c6-3e41-4e73-bae4-1104886e934e" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "c5e8553c-8cd5-4dfe-8553-39d23089f62e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073603Z:c5e8553c-8cd5-4dfe-8553-39d23089f62e" ], + "Date": [ "Wed, 08 Apr 2020 07:36:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "654" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"2020-04-08T07:36:02+00:00\",\"provisioningState\":\"Accepted\",\"dataAccessId\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba\",\"dataAccessFqdn\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\",\"storageLimitExceededBehavior\":\"PurgeOldData\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql\",\"name\":\"rstr-cn1yql\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "22", "23" ], + "x-ms-client-request-id": [ "efbd3321-c9c4-462f-9cf1-456a1daaa660", "efbd3321-c9c4-462f-9cf1-456a1daaa660" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, "Response": { "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "17693cd8-6fea-4e94-82d5-c352b6e45100" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "91f31d59-c097-48b4-9e16-6e59a7e341c1" ], + "x-ms-request-id": [ "d22aa811-2cb7-41ce-a8e7-d891d3d0dfd3" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "7f734dc4-dd5b-42e5-9b74-a5dcca4a5af1" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114404Z:7f734dc4-dd5b-42e5-9b74-a5dcca4a5af1" ], - "Date": [ "Thu, 02 Apr 2020 11:44:03 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073634Z:17693cd8-6fea-4e94-82d5-c352b6e45100" ], + "Date": [ "Wed, 08 Apr 2020 07:36:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:02 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba\",\"dataAccessFqdn\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql\",\"name\":\"rstr-cn1yql\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview+2": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "22", "23", "24" ], + "x-ms-client-request-id": [ "efbd3321-c9c4-462f-9cf1-456a1daaa660", "efbd3321-c9c4-462f-9cf1-456a1daaa660", "efbd3321-c9c4-462f-9cf1-456a1daaa660" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "a11a2fb2-93f0-4cdf-8da0-706fcf048ea3" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "613c1ad3-9342-4acf-a9c6-a2c0f15e7830" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073635Z:613c1ad3-9342-4acf-a9c6-a2c0f15e7830" ], + "Date": [ "Wed, 08 Apr 2020 07:36:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:02 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba\",\"dataAccessFqdn\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql\",\"name\":\"rstr-cn1yql\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview", "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S2\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "a4a8726a-eba5-47fc-8f11-33573ea209d2" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "49d15474-cb7f-4657-95cd-2db0e39c545d" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -59,36 +137,114 @@ "Content-Length": [ "161" ] } }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "75ccbf1d-7d6c-4544-b2b1-c74660e73fe3" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "ada5ff2d-0c0d-4e77-8dee-6f5c97c59346" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073640Z:ada5ff2d-0c0d-4e77-8dee-6f5c97c59346" ], + "Date": [ "Wed, 08 Apr 2020 07:36:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "654" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"2020-04-08T07:36:39+00:00\",\"provisioningState\":\"Accepted\",\"dataAccessId\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3\",\"dataAccessFqdn\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\",\"storageLimitExceededBehavior\":\"PurgeOldData\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c\",\"name\":\"rstr-jra51c\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "25", "26" ], + "x-ms-client-request-id": [ "49d15474-cb7f-4657-95cd-2db0e39c545d", "49d15474-cb7f-4657-95cd-2db0e39c545d" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, "Response": { "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "122cbf91-cdd1-406d-b870-55b36e52134d" ], + "x-ms-request-id": [ "8b365ab1-f0b0-4bc5-940e-5b76e8b1b476" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "d657f09b-e18b-490c-9c1a-be1d7d8240a0" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114404Z:d657f09b-e18b-490c-9c1a-be1d7d8240a0" ], - "Date": [ "Thu, 02 Apr 2020 11:44:03 GMT" ] + "x-ms-correlation-request-id": [ "456dbb44-e358-47a7-a9b4-e3d720d992fb" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073711Z:456dbb44-e358-47a7-a9b4-e3d720d992fb" ], + "Date": [ "Wed, 08 Apr 2020 07:37:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:39 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3\",\"dataAccessFqdn\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c\",\"name\":\"rstr-jra51c\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+3": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "ee431301-6e07-4d47-b971-12d2b2f5dc47" ], + "x-ms-unique-id": [ "25", "26", "27" ], + "x-ms-client-request-id": [ "49d15474-cb7f-4657-95cd-2db0e39c545d", "49d15474-cb7f-4657-95cd-2db0e39c545d", "49d15474-cb7f-4657-95cd-2db0e39c545d" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8c5f76ed-eb78-42ae-a826-4b58c67ce3d2" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "09b960eb-b9d3-4d40-bb06-2de96fcf52d8" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073711Z:09b960eb-b9d3-4d40-bb06-2de96fcf52d8" ], + "Date": [ "Wed, 08 Apr 2020 07:37:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:39 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3\",\"dataAccessFqdn\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c\",\"name\":\"rstr-jra51c\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "d4881da8-0b0b-4d9f-985e-63e97733df8c" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -103,31 +259,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "08cd8172-b2f2-45b6-a22a-17a9fa41ceac" ], + "x-ms-request-id": [ "5ff731d8-1f28-4667-a794-5dcc79db5ab9" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "078dc923-eb8c-42a7-af5e-ed9e9fcb38ce" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114405Z:078dc923-eb8c-42a7-af5e-ed9e9fcb38ce" ], - "Date": [ "Thu, 02 Apr 2020 11:44:04 GMT" ] + "x-ms-correlation-request-id": [ "c73586e3-5d5a-499d-9d04-59c754f664fe" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073711Z:c73586e3-5d5a-499d-9d04-59c754f664fe" ], + "Date": [ "Wed, 08 Apr 2020 07:37:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:02 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba\",\"dataAccessFqdn\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql\",\"name\":\"rstr-cn1yql\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview+4": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+standard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "5e8bcb7d-1b02-4dbc-b2b1-eb43f544baa0" ], + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "81c6d439-2bee-4f0b-995c-4d504bedfb40" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -142,31 +298,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "340da230-aac5-4051-9e74-ff1f969634e7" ], + "x-ms-request-id": [ "351d9f05-3c98-4998-b8dd-8c183908e31d" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "ae04d82d-3949-45a5-bcbb-e65241f6aa26" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114405Z:ae04d82d-3949-45a5-bcbb-e65241f6aa26" ], - "Date": [ "Thu, 02 Apr 2020 11:44:04 GMT" ] + "x-ms-correlation-request-id": [ "329c9edb-f0f4-401c-83f7-a9f704ad0a95" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073712Z:329c9edb-f0f4-401c-83f7-a9f704ad0a95" ], + "Date": [ "Wed, 08 Apr 2020 07:37:12 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:39 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3\",\"dataAccessFqdn\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c\",\"name\":\"rstr-jra51c\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+1": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", - "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"L1\",\n \"capacity\": 1\n },\n \"kind\": \"LongTerm\",\n \"properties\": {\n \"storageConfiguration\": {\n \"accountName\": \"staaccounttest001\",\n \"managementKey\": \"WYUkhD+eRnbXIVmzSM8p85VqCh4r9Q5/I61NZNdgbOfTUIA7VEH4QujQ1Tyf1ObbCyxfXid+/2DX/BVBLb2auw==\"\n },\n \"timeSeriesIdProperties\": [\n {\n \"name\": \"cdc\",\n \"type\": \"string\"\n }\n ]\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"L1\",\n \"capacity\": 1\n },\n \"kind\": \"LongTerm\",\n \"properties\": {\n \"storageConfiguration\": {\n \"accountName\": \"staaccountmtudlr\",\n \"managementKey\": \"M8HfaiUFYeKeVNrsDAJGz9SzYDNSmXG9jNETt/oLcxRrW5Bsz2tVPSYePMVh7qn22yyRSNu3/pMgy0QYnKQ92Q==\"\n },\n \"timeSeriesIdProperties\": [\n {\n \"name\": \"cdc\",\n \"type\": \"string\"\n }\n ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "567156ae-93a1-4e10-a52a-5a7a66ff3b2c" ], + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "f0c42561-cdf4-487e-abf6-2f51c283adc3" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -175,7 +331,7 @@ }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "419" ] + "Content-Length": [ "418" ] } }, "Response": { @@ -183,31 +339,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d5c1b6b5-4d4c-4e54-b234-5167b705edec" ], + "x-ms-request-id": [ "e9b08d5e-df58-4926-a523-249a5dc9e8d7" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "bb160537-5873-4368-a451-bfc2b8083f57" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114456Z:bb160537-5873-4368-a451-bfc2b8083f57" ], - "Date": [ "Thu, 02 Apr 2020 11:44:56 GMT" ] + "x-ms-correlation-request-id": [ "a6a41489-2d34-4c94-9e20-66233bd86a3a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073715Z:a6a41489-2d34-4c94-9e20-66233bd86a3a" ], + "Date": [ "Wed, 08 Apr 2020 07:37:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "694" ], + "Content-Length": [ "693" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"2020-04-02T11:44:42+00:00\",\"provisioningState\":\"Succeeded\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountmtudlr\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"2020-04-08T07:37:14+00:00\",\"provisioningState\":\"Succeeded\",\"dataAccessId\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259\",\"dataAccessFqdn\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly\",\"name\":\"rstr-s13wly\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+2": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5", "6" ], - "x-ms-client-request-id": [ "567156ae-93a1-4e10-a52a-5a7a66ff3b2c", "567156ae-93a1-4e10-a52a-5a7a66ff3b2c" ], + "x-ms-unique-id": [ "30", "31" ], + "x-ms-client-request-id": [ "f0c42561-cdf4-487e-abf6-2f51c283adc3", "f0c42561-cdf4-487e-abf6-2f51c283adc3" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets" ], @@ -222,31 +378,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-correlation-request-id": [ "78873acb-f1c3-4a27-bad2-fd5e34bf3fbc" ], + "x-ms-correlation-request-id": [ "2efe3664-d71b-4bc1-9c85-c925eba2bc0c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "9660c498-af02-458f-b090-45c398adbecc" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-request-id": [ "c09ae789-ceef-417f-a781-96d11d69c64c" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114527Z:78873acb-f1c3-4a27-bad2-fd5e34bf3fbc" ], - "Date": [ "Thu, 02 Apr 2020 11:45:27 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073746Z:2efe3664-d71b-4bc1-9c85-c925eba2bc0c" ], + "Date": [ "Wed, 08 Apr 2020 07:37:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "698" ], + "Content-Length": [ "697" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountmtudlr\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:37:14 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259\",\"dataAccessFqdn\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly\",\"name\":\"rstr-s13wly\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+3": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5", "6", "7" ], - "x-ms-client-request-id": [ "567156ae-93a1-4e10-a52a-5a7a66ff3b2c", "567156ae-93a1-4e10-a52a-5a7a66ff3b2c", "567156ae-93a1-4e10-a52a-5a7a66ff3b2c" ], + "x-ms-unique-id": [ "30", "31", "32" ], + "x-ms-client-request-id": [ "f0c42561-cdf4-487e-abf6-2f51c283adc3", "f0c42561-cdf4-487e-abf6-2f51c283adc3", "f0c42561-cdf4-487e-abf6-2f51c283adc3" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets", "__AllParameterSets" ], @@ -261,31 +417,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "11227edb-95d1-402b-9543-ac99fd2ed9fd" ], + "x-ms-request-id": [ "2698d2f6-0acb-403c-a998-5db369a5b78e" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "4ace22fe-8bae-44b4-b90f-71790a62e963" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114528Z:4ace22fe-8bae-44b4-b90f-71790a62e963" ], - "Date": [ "Thu, 02 Apr 2020 11:45:28 GMT" ] + "x-ms-correlation-request-id": [ "ff1ac4c9-0a40-4e52-955b-b85108a639f9" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073747Z:ff1ac4c9-0a40-4e52-955b-b85108a639f9" ], + "Date": [ "Wed, 08 Apr 2020 07:37:46 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "698" ], + "Content-Length": [ "697" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountmtudlr\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:37:14 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259\",\"dataAccessFqdn\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly\",\"name\":\"rstr-s13wly\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview+4": { + "New-AzTimeSeriesInsightsEnvironment+[NoContext]+longterm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "33681886-9b4d-40b7-97e3-8540a793957e" ], + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "c97c7ed1-da8f-47b3-b264-1d56b958edaa" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -300,21 +456,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b09721a2-807b-44ef-a8b0-3a82efa825ad" ], + "x-ms-request-id": [ "1cb1e11a-333f-409c-bc2e-d658ca4054fb" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "5ed1415e-f5eb-4cf9-aaf0-360769e937ec" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T114528Z:5ed1415e-f5eb-4cf9-aaf0-360769e937ec" ], - "Date": [ "Thu, 02 Apr 2020 11:45:28 GMT" ] + "x-ms-correlation-request-id": [ "f5aa64d3-d9e7-473a-a299-9c163eaf470f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073747Z:f5aa64d3-d9e7-473a-a299-9c163eaf470f" ], + "Date": [ "Wed, 08 Apr 2020 07:37:47 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "698" ], + "Content-Length": [ "697" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountmtudlr\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:37:14 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259\",\"dataAccessFqdn\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly\",\"name\":\"rstr-s13wly\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 index d3fd37d43b9a..fa68c14e71eb 100644 --- a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEnvironment.Tests.ps1 @@ -1,10 +1,8 @@ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' -$helperPath = Join-Path $PSScriptRoot 'helper.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) -. ($helperPath) $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzTimeSeriesInsightsEnvironment.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { @@ -35,10 +33,8 @@ Describe 'New-AzTimeSeriesInsightsEnvironment' { $sku = 'L1' $capacity = 2 $timeSeriesIdProperty = @{name='cdc';type='string'} - $staAccountName = 'staaccount' + (RandomLetters -len 6 -lowerCase $true) - New-AzStorageAccount -ResourceGroupName $env.resourceGroup -AccountName $staAccountName -Location $env.location -Sku Standard_GRS - $staAccountKeys = Get-AzStorageAccountKey -ResourceGroupName $env.resourceGroup -Name $staAccountName - $staAccountKey = $staAccountKeys[0].Value | ConvertTo-SecureString -AsPlainText -Force + $staAccountName = $env.staaccountName01 + $staAccountKey = $env.staaccountName01_key | ConvertTo-SecureString -AsPlainText -Force New-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv04 -Kind $kind -Location $env.location -Sku $sku -StorageAccountName $staAccountName -StorageAccountKey $staAccountKey -TimeSeriesIdProperty $timeSeriesIdProperty $tsiEnv = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName $env.resourceGroup -Name $env.rstrenv04 diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json index a6ac5217f5e5..3920c22f1613 100644 --- a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Recording.json @@ -1,12 +1,12 @@ { - "New-AzTimeSeriesInsightsEventSource+[NoContext]+eventhub+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview+1": { + "New-AzTimeSeriesInsightsEventSource+[NoContext]+eventhub+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/eventsources/rstr-ra0hqf?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview", - "Content": "{\n \"location\": \"eastus2\",\n \"kind\": \"Microsoft.EventHub\",\n \"properties\": {\n \"eventSourceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/rstr-dicgts/eventhubs/rstr-qn7esp\",\n \"consumerGroupName\": \"tsi-test-796bte\",\n \"eventHubName\": \"rstr-qn7esp\",\n \"keyName\": \"RootManageSharedAccessKey\",\n \"serviceBusNamespace\": \"rstr-dicgts\",\n \"sharedAccessKey\": \"vZg+rvKWh9i1rN+8MItX2tTMjwdZ/6u1D4jQfClq0Y0=\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/eventsources/rstr-ra0hqf?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"kind\": \"Microsoft.EventHub\",\n \"properties\": {\n \"eventSourceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-wcukl2/eventhubs/eventhubname-x7lcry\",\n \"consumerGroupName\": \"tsi-test-i01k5l\",\n \"eventHubName\": \"eventhubname-x7lcry\",\n \"keyName\": \"RootManageSharedAccessKey\",\n \"serviceBusNamespace\": \"eventhubspace-wcukl2\",\n \"sharedAccessKey\": \"YGX/J9qfyTCcC5AQr8h8xlIo4i8XZ6bySgglrDUyTuk=\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "42bee419-3b36-47e0-a8f6-6c3b3af3f29c" ], + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "da196d5a-a880-411d-a4d3-6517129b2f0e" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEventSource_Create" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -15,7 +15,7 @@ }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "506" ] + "Content-Length": [ "540" ] } }, "Response": { @@ -23,31 +23,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "91c36f5f-1623-4d36-9852-9c06faa21ef0" ], + "x-ms-request-id": [ "247d6297-a239-4373-bd3b-c9985acd46bd" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "75b189be-13d2-4fc7-aca9-d4b3ac2b461c" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115246Z:75b189be-13d2-4fc7-aca9-d4b3ac2b461c" ], - "Date": [ "Thu, 02 Apr 2020 11:52:45 GMT" ] + "x-ms-correlation-request-id": [ "f2ed41cf-88e1-484b-a719-7e787bb300eb" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073751Z:f2ed41cf-88e1-484b-a719-7e787bb300eb" ], + "Date": [ "Wed, 08 Apr 2020 07:37:51 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "744" ], + "Content-Length": [ "778" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/rstr-dicgts/eventhubs/rstr-qn7esp\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"rstr-qn7esp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"rstr-dicgts\",\"creationTime\":\"Thu, 02 Apr 2020 11:52:44 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue\",\"name\":\"rstr-lfn5ue\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-wcukl2/eventhubs/eventhubname-x7lcry\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-x7lcry\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-wcukl2\",\"creationTime\":\"Wed, 08 Apr 2020 07:37:50 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/eventsources/rstr-ra0hqf\",\"name\":\"rstr-ra0hqf\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "New-AzTimeSeriesInsightsEventSource+[NoContext]+eventhub+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview+2": { + "New-AzTimeSeriesInsightsEventSource+[NoContext]+eventhub+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/eventsources/rstr-ra0hqf?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/eventsources/rstr-ra0hqf?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "e5200bbf-5d03-4805-930f-8ba527287fe9" ], + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "217b2e09-a70b-4630-9250-8fed111655a7" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -62,31 +62,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4e226459-954a-41af-b948-281eb23be306" ], + "x-ms-request-id": [ "41f39858-efa3-4d46-9eaa-e56bea220420" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "bc6ed8cb-5d2f-49ee-9b22-8e63347affc0" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115246Z:bc6ed8cb-5d2f-49ee-9b22-8e63347affc0" ], - "Date": [ "Thu, 02 Apr 2020 11:52:46 GMT" ] + "x-ms-correlation-request-id": [ "72cb0e53-adf7-48b8-9807-9e10c1e615b4" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073752Z:72cb0e53-adf7-48b8-9807-9e10c1e615b4" ], + "Date": [ "Wed, 08 Apr 2020 07:37:52 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "744" ], + "Content-Length": [ "778" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/rstr-dicgts/eventhubs/rstr-qn7esp\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"rstr-qn7esp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"rstr-dicgts\",\"creationTime\":\"Thu, 02 Apr 2020 11:52:44 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/eventsources/rstr-lfn5ue\",\"name\":\"rstr-lfn5ue\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-wcukl2/eventhubs/eventhubname-x7lcry\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-x7lcry\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-wcukl2\",\"creationTime\":\"Wed, 08 Apr 2020 07:37:50 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/eventsources/rstr-ra0hqf\",\"name\":\"rstr-ra0hqf\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "New-AzTimeSeriesInsightsEventSource+[NoContext]+iothub+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview+1": { + "New-AzTimeSeriesInsightsEventSource+[NoContext]+iothub+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/eventsources/rstr-l1j2ti?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview", - "Content": "{\n \"location\": \"eastus2\",\n \"kind\": \"Microsoft.IoTHub\",\n \"properties\": {\n \"eventSourceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.Devices/IotHubs/rstr-1psi72\",\n \"consumerGroupName\": \"tsi-test-796bte\",\n \"iotHubName\": \"rstr-1psi72\",\n \"keyName\": \"RootManageSharedAccessKey\",\n \"sharedAccessKey\": \"uj5zzjkW5xnKCw8+Ps/xSiutf7NgenYsWm6zlP53BOM=\"\n }\n}", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/eventsources/rstr-l1j2ti?api-version=2018-08-15-preview", + "Content": "{\n \"location\": \"eastus2\",\n \"kind\": \"Microsoft.IoTHub\",\n \"properties\": {\n \"eventSourceResourceId\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.Devices/IotHubs/iothubname-qnivtc\",\n \"consumerGroupName\": \"tsi-test-i01k5l\",\n \"iotHubName\": \"iothubname-qnivtc\",\n \"keyName\": \"RootManageSharedAccessKey\",\n \"sharedAccessKey\": \"2TnzezePKCeYjruy24uA4h3YGpyXEiF8jDb+fv/Hd64=\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "0f8ae761-8de0-4e4a-925a-50568753b8fe" ], + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "367bf785-b410-4e01-982d-5e059e32fb55" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEventSource_Create" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -95,7 +95,7 @@ }, "ContentHeaders": { "Content-Type": [ "application/json" ], - "Content-Length": [ "434" ] + "Content-Length": [ "446" ] } }, "Response": { @@ -103,31 +103,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7c2259cb-b186-4f8f-9411-0e5a0913716b" ], + "x-ms-request-id": [ "ffa8b14b-9840-40dc-905a-71ef9e5f21f3" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "4ccd8928-b202-48e7-8a4c-88a95edf20e1" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115442Z:4ccd8928-b202-48e7-8a4c-88a95edf20e1" ], - "Date": [ "Thu, 02 Apr 2020 11:54:41 GMT" ] + "x-ms-correlation-request-id": [ "4247c81e-e569-439a-b2f1-65c71ea47a04" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073755Z:4247c81e-e569-439a-b2f1-65c71ea47a04" ], + "Date": [ "Wed, 08 Apr 2020 07:37:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "678" ], + "Content-Length": [ "690" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.IoTHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.Devices/IotHubs/rstr-1psi72\",\"consumerGroupName\":\"tsi-test-796bte\",\"iotHubName\":\"rstr-1psi72\",\"keyName\":\"RootManageSharedAccessKey\",\"creationTime\":\"Thu, 02 Apr 2020 11:54:40 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox\",\"name\":\"rstr-0sgkox\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.IoTHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.Devices/IotHubs/iothubname-qnivtc\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"iotHubName\":\"iothubname-qnivtc\",\"keyName\":\"RootManageSharedAccessKey\",\"creationTime\":\"Wed, 08 Apr 2020 07:37:54 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/eventsources/rstr-l1j2ti\",\"name\":\"rstr-l1j2ti\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "New-AzTimeSeriesInsightsEventSource+[NoContext]+iothub+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview+2": { + "New-AzTimeSeriesInsightsEventSource+[NoContext]+iothub+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/eventsources/rstr-l1j2ti?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/eventsources/rstr-l1j2ti?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "7d3f4fbe-6e0d-4d5c-ab15-f22efb5d99e0" ], + "x-ms-unique-id": [ "37" ], + "x-ms-client-request-id": [ "59c6a1c9-0a48-4e7a-a28c-4c5b5fac1091" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -142,21 +142,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11968" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4063ede3-9b9e-4a60-adaa-bb3ff39a892c" ], + "x-ms-request-id": [ "99b53274-aadb-4be5-a272-f0599de0702b" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "53601a2e-56aa-49d7-8eca-cde37c00b49d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115443Z:53601a2e-56aa-49d7-8eca-cde37c00b49d" ], - "Date": [ "Thu, 02 Apr 2020 11:54:42 GMT" ] + "x-ms-correlation-request-id": [ "7e03a083-4af1-4c2d-8ba0-39a46a08ed0f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073756Z:7e03a083-4af1-4c2d-8ba0-39a46a08ed0f" ], + "Date": [ "Wed, 08 Apr 2020 07:37:55 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "678" ], + "Content-Length": [ "690" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.IoTHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.Devices/IotHubs/rstr-1psi72\",\"consumerGroupName\":\"tsi-test-796bte\",\"iotHubName\":\"rstr-1psi72\",\"keyName\":\"RootManageSharedAccessKey\",\"creationTime\":\"Thu, 02 Apr 2020 11:54:40 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/eventsources/rstr-0sgkox\",\"name\":\"rstr-0sgkox\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.IoTHub\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.Devices/IotHubs/iothubname-qnivtc\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"iotHubName\":\"iothubname-qnivtc\",\"keyName\":\"RootManageSharedAccessKey\",\"creationTime\":\"Wed, 08 Apr 2020 07:37:54 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/eventsources/rstr-l1j2ti\",\"name\":\"rstr-l1j2ti\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 index 7d1bdadf7734..c20a2c16c18d 100644 --- a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsEventSource.Tests.ps1 @@ -15,33 +15,26 @@ while(-not $mockingPath) { Describe 'New-AzTimeSeriesInsightsEventSource' { It 'eventhub' { - $eventHubSpaceName = $env.rstr31 - $eventHubSpace = New-AzEventHubNamespace -Name $eventHubSpaceName -ResourceGroupName $env.resourceGroup -Location $env.location - - $eventHubName = $env.rstr32 - $eventHub = New-AzEventHub -ResourceGroupName $env.resourceGroup -NamespaceName $eventHubSpace.Name -Name $eventHubName - $eventHubKeys = Get-AzEventHubKey -ResourceGroupName $env.resourceGroup -NamespaceName $eventHubSpace.Name -AuthorizationRuleName RootManageSharedAccessKey - $eventHubKey = $eventHubKeys.PrimaryKey | ConvertTo-SecureString -AsPlainText -Force - + $eventHubSpaceName = $env.eventHubSpaceName02 + $eventHubName = $env.eventHubName02 + $eventSourceResourceId = $env.eventHubName02_id + $eventSharedAccessKey = $env.eventHubName02_key | ConvertTo-SecureString -AsPlainText -Force $environmentName = $env.rstrenv01 $tsiEevntSourceName = $env.rstres01 - New-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -Name $tsiEevntSourceName -EnvironmentName $environmentName -Kind Microsoft.EventHub -ConsumerGroupName $env.resourceGroup -Location $env.location -KeyName RootManageSharedAccessKey -ServiceBusNameSpace $eventHubSpace.Name -EventHubName $eventHub.Name -EventSourceResourceId $eventHub.id -SharedAccessKey $eventHubKey + + New-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -Name $tsiEevntSourceName -EnvironmentName $environmentName -Kind Microsoft.EventHub -ConsumerGroupName $env.resourceGroup -Location $env.location -KeyName RootManageSharedAccessKey -ServiceBusNameSpace $eventHubSpaceName -EventHubName $eventHubName -EventSourceResourceId $eventSourceResourceId -SharedAccessKey $eventSharedAccessKey $tsiEevntSource = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -EnvironmentName $environmentName -Name $tsiEevntSourceName $tsiEevntSource.Name | Should -Be $tsiEevntSourceName } It 'iothub' { - $iotHubName = $env.rstr33 - $iotHubSkuName = 'S1' - $iotUnits = 100 - - $iotHub = New-AzIotHub -ResourceGroupName $env.resourceGroup -Location $env.location -Name $iotHubName -SkuName $iotHubSkuName -Units $iotUnits - $iotHubKeys = Get-AzIotHubKey -ResourceGroupName $env.resourceGroup -Name $iotHubName - $iotHubKey = $iotHubKeys[0].PrimaryKey | ConvertTo-SecureString -AsPlainText -Force - + $ioTHubName = $env.iotHubName + $iotSourceResourceId = $env.iotHubName_id + $iotSharedAccessKey = $env.iotHubName_key | ConvertTo-SecureString -AsPlainText -Force $environmentName = $env.rstrenv02 $tsiEevntSourceName = $env.rstres02 - New-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -Name $tsiEevntSourceName -EnvironmentName $environmentName -Kind Microsoft.IoTHub -ConsumerGroupName $env.resourceGroup -Location $env.location -KeyName RootManageSharedAccessKey -IoTHubName $iotHub.Name -EventSourceResourceId $iotHub.id -SharedAccessKey $iotHubKey + + New-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -Name $tsiEevntSourceName -EnvironmentName $environmentName -Kind Microsoft.IoTHub -ConsumerGroupName $env.resourceGroup -Location $env.location -KeyName RootManageSharedAccessKey -IoTHubName $ioTHubName -EventSourceResourceId $iotSourceResourceId -SharedAccessKey $iotSharedAccessKey $tsiEevntSource = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName $env.resourceGroup -EnvironmentName $environmentName -Name $tsiEevntSourceName $tsiEevntSource.Name | Should -Be $tsiEevntSourceName } diff --git a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json index cccb145d58da..c9bb6068e99b 100644 --- a/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json +++ b/src/TimeSeriesInsights/test/New-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -1,12 +1,12 @@ { - "New-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/referenceDataSets/tsirds001?api-version=2018-08-15-preview+1": { + "New-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/referenceDataSets/tsirds001?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/referenceDataSets/tsirds001?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/referenceDataSets/tsirds001?api-version=2018-08-15-preview", "Content": "{\n \"location\": \"eastus2\",\n \"properties\": {\n \"dataStringComparisonBehavior\": \"Ordinal\",\n \"keyProperties\": [\n {\n \"name\": \"device01\",\n \"type\": \"Double\"\n }\n ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "462df3ce-4edf-4e2b-952f-9afd6b135b01" ], + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "f7cbf517-f97f-4483-baea-27d7d91aa6c7" ], "CommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -23,21 +23,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "2b9bf993-a5d1-42c1-89d6-88aa0d1407b4" ], + "x-ms-request-id": [ "65020b26-956f-482e-b638-cfd2d4b55e6f" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "f59f2668-3f99-4597-b6ba-e71371977974" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T115838Z:f59f2668-3f99-4597-b6ba-e71371977974" ], - "Date": [ "Thu, 02 Apr 2020 11:58:38 GMT" ] + "x-ms-correlation-request-id": [ "c0edec2f-0955-4638-aeee-9209ac34cefd" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073759Z:c0edec2f-0955-4638-aeee-9209ac34cefd" ], + "Date": [ "Wed, 08 Apr 2020 07:37:59 GMT" ] }, "ContentHeaders": { "Content-Length": [ "493" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:58:04 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/referenceDataSets/tsirds001\",\"name\":\"tsirds001\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:37:58 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/referenceDataSets/tsirds001\",\"name\":\"tsirds001\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json index f5d910da2cac..5195498c3e21 100644 --- a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -1,12 +1,12 @@ { - "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q?api-version=2018-08-15-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accesspolicies/rstr-b10a92?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accesspolicies/rstr-hszj9q?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "2bc4976c-5079-4aad-8746-2be8a0b29f67" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "50ef9998-5c9e-471f-a684-a0a49027e17b" ], "CommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,14 +21,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b50359cf-a337-41b3-8587-48d2f4e5d8d7" ], + "x-ms-request-id": [ "179edf31-a45f-46c8-8ed3-705a3a2cdacf" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "ff0e7ff4-e2d1-4239-b14b-90cac2b569a2" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120011Z:ff0e7ff4-e2d1-4239-b14b-90cac2b569a2" ], - "Date": [ "Thu, 02 Apr 2020 12:00:10 GMT" ] + "x-ms-correlation-request-id": [ "a21d2c98-6417-4629-b24e-adec1ee3a915" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073800Z:a21d2c98-6417-4629-b24e-adec1ee3a915" ], + "Date": [ "Wed, 08 Apr 2020 07:37:59 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -37,14 +37,14 @@ "Content": null } }, - "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accessPolicies?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accessPolicies?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur/accessPolicies?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1/accessPolicies?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "984ed507-1dfc-43a0-b29d-a09e3bb0cb5b" ], + "x-ms-unique-id": [ "40" ], + "x-ms-client-request-id": [ "e8613aae-d9b8-445a-af3d-e99b9a42bb38" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -59,14 +59,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11967" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "50a97481-d378-4112-8c10-2c1b8a09d5a1" ], + "x-ms-request-id": [ "e392b06d-1fad-4951-b023-14a0adf9f406" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "08502385-e94d-48cf-9c7a-936f3e1fe229" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120012Z:08502385-e94d-48cf-9c7a-936f3e1fe229" ], - "Date": [ "Thu, 02 Apr 2020 12:00:11 GMT" ] + "x-ms-correlation-request-id": [ "6bc9bd7f-3dcb-4297-b1af-d1e3555ff2c2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073800Z:6bc9bd7f-3dcb-4297-b1af-d1e3555ff2c2" ], + "Date": [ "Wed, 08 Apr 2020 07:38:00 GMT" ] }, "ContentHeaders": { "Content-Length": [ "12" ], @@ -76,14 +76,14 @@ "Content": "{\"value\":[]}" } }, - "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/accesspolicies/rstr-xnycis?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/accesspolicies/rstr-xnycis?api-version=2018-08-15-preview", "Content": "{\n \"properties\": {\n \"principalObjectId\": \"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\n \"roles\": [ \"Reader\" ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "9ea11862-f257-4889-8feb-e9a66eaa1477" ], + "x-ms-unique-id": [ "41" ], + "x-ms-client-request-id": [ "f9c74d96-6883-4d1b-949d-b93044508f12" ], "CommandName": [ "New-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "New-AzTimeSeriesInsightsAccessPolicy_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -100,31 +100,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e17e5ba2-7a2d-4714-83e0-add182ba430f" ], + "x-ms-request-id": [ "a9418bb9-14ad-4be6-8272-f9960ae0015b" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "01b47798-02fb-4f25-9e8d-daf091d4d627" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120012Z:01b47798-02fb-4f25-9e8d-daf091d4d627" ], - "Date": [ "Thu, 02 Apr 2020 12:00:12 GMT" ] + "x-ms-correlation-request-id": [ "61ceb1c7-4046-4f08-9bdc-c079e075e283" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073801Z:61ceb1c7-4046-4f08-9bdc-c079e075e283" ], + "Date": [ "Wed, 08 Apr 2020 07:38:00 GMT" ] }, "ContentHeaders": { "Content-Length": [ "362" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h\",\"name\":\"rstr-o7f32h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/accesspolicies/rstr-xnycis\",\"name\":\"rstr-xnycis\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } }, - "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/accesspolicies/rstr-xnycis?api-version=2018-08-15-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accesspolicies/rstr-o7f32h?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/accesspolicies/rstr-xnycis?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "9da5ddc9-fecd-477e-9913-76d4930e650e" ], + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "b2868a53-a3be-4215-9ee2-90b42b126947" ], "CommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsAccessPolicy_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -139,14 +139,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "510a1893-aae1-441d-95fa-86688d94d460" ], + "x-ms-request-id": [ "f323c84f-272d-47d0-b463-0f1c7100e3b7" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "67b70109-fc10-444d-b076-3222f2fce8ab" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120013Z:67b70109-fc10-444d-b076-3222f2fce8ab" ], - "Date": [ "Thu, 02 Apr 2020 12:00:12 GMT" ] + "x-ms-correlation-request-id": [ "3fab9d5b-43f3-469a-90b0-3e44bde875f5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073801Z:3fab9d5b-43f3-469a-90b0-3e44bde875f5" ], + "Date": [ "Wed, 08 Apr 2020 07:38:01 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -155,14 +155,14 @@ "Content": null } }, - "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accessPolicies?api-version=2018-08-15-preview+3": { + "Remove-AzTimeSeriesInsightsAccessPolicy+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/accessPolicies?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3/accessPolicies?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql/accessPolicies?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "a5916a73-7ee6-4d71-a69e-59ccb354de5d" ], + "x-ms-unique-id": [ "43" ], + "x-ms-client-request-id": [ "8651b761-b9cc-4803-84c2-0ba4c73002e9" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -177,14 +177,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11966" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8548cc53-f8ff-41fb-8552-c35d912270df" ], + "x-ms-request-id": [ "8492b8d3-f92e-439c-b3cb-263b94240d28" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "cc92b0f8-8d01-41e8-8e1d-57de0cce88c5" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120013Z:cc92b0f8-8d01-41e8-8e1d-57de0cce88c5" ], - "Date": [ "Thu, 02 Apr 2020 12:00:12 GMT" ] + "x-ms-correlation-request-id": [ "b28e3f57-936f-48c1-bcc4-c934568fb3f2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073802Z:b28e3f57-936f-48c1-bcc4-c934568fb3f2" ], + "Date": [ "Wed, 08 Apr 2020 07:38:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "12" ], diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json index 3a5149f3fbf0..2edf3c38d014 100644 --- a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEnvironment.Recording.json @@ -1,12 +1,12 @@ { - "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-h5qvur?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-8uxmh1?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "32e1236e-305b-4618-83e9-599821bfcd94" ], + "x-ms-unique-id": [ "44" ], + "x-ms-client-request-id": [ "fb9a2da3-9ad7-46d2-8345-07328543a568" ], "CommandName": [ "Remove-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsEnvironment_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -24,11 +24,11 @@ "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ba82d806-ad66-4ba0-90e2-5ec2f50b7ecb" ], + "x-ms-request-id": [ "1628b0db-6d3c-4045-a2ec-5ede278b65f3" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "7538356a-e949-4d5a-a747-00862713fa0f" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120101Z:7538356a-e949-4d5a-a747-00862713fa0f" ], - "Date": [ "Thu, 02 Apr 2020 12:01:01 GMT" ] + "x-ms-correlation-request-id": [ "bbf53bdb-c5c5-45c0-8901-dce9ad69e30b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073805Z:bbf53bdb-c5c5-45c0-8901-dce9ad69e30b" ], + "Date": [ "Wed, 08 Apr 2020 07:38:05 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -37,14 +37,14 @@ "Content": null } }, - "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "00f1fdf0-8538-4839-8c8c-e4a8d20fec3b" ], + "x-ms-unique-id": [ "45" ], + "x-ms-client-request-id": [ "91c784ce-f0fd-4a30-a48c-5112169d4d5d" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -59,31 +59,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11965" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "16e58629-624f-4b69-8e2d-8d119fa1845f" ], + "x-ms-request-id": [ "28ba0cc0-eec1-4824-8602-b58914ebc707" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "0dd59a3e-11f1-4f36-9e50-ef702cbb58f1" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120102Z:0dd59a3e-11f1-4f36-9e50-ef702cbb58f1" ], - "Date": [ "Thu, 02 Apr 2020 12:01:02 GMT" ] + "x-ms-correlation-request-id": [ "fdc0052c-a4b5-4578-9e42-652fa43c21ba" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073805Z:fdc0052c-a4b5-4578-9e42-652fa43c21ba" ], + "Date": [ "Wed, 08 Apr 2020 07:38:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "3486" ], + "Content-Length": [ "3485" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" + "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountmtudlr\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:37:14 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259\",\"dataAccessFqdn\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly\",\"name\":\"rstr-s13wly\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:02 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba\",\"dataAccessFqdn\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql\",\"name\":\"rstr-cn1yql\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:39 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3\",\"dataAccessFqdn\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c\",\"name\":\"rstr-jra51c\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" } }, - "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "3297c90a-2b31-414b-9940-c87157246bb4" ], + "x-ms-unique-id": [ "46" ], + "x-ms-client-request-id": [ "20b88f4a-52fb-4747-b55b-ae1c51671307" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -98,31 +98,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11964" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "9c5540d4-869f-4ba2-82dc-357b6f3e1383" ], + "x-ms-request-id": [ "37a86bf1-cffe-48fe-8018-8b291412d0af" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "03f1e457-590f-4ed5-99db-e819b77163b8" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120102Z:03f1e457-590f-4ed5-99db-e819b77163b8" ], - "Date": [ "Thu, 02 Apr 2020 12:01:02 GMT" ] + "x-ms-correlation-request-id": [ "7617ef11-be2c-4999-8dd1-c1b3497d1d8d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073806Z:7617ef11-be2c-4999-8dd1-c1b3497d1d8d" ], + "Date": [ "Wed, 08 Apr 2020 07:38:05 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:41:57 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"346732e9-94cc-4d5a-923a-61670e29dba7\",\"dataAccessFqdn\":\"346732e9-94cc-4d5a-923a-61670e29dba7.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3\",\"name\":\"rstr-bej4z3\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:02 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba\",\"dataAccessFqdn\":\"a36df2a5-78d9-41c1-8a42-482c15f840ba.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql\",\"name\":\"rstr-cn1yql\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-bej4z3?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-cn1yql?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "17b6fb12-28df-4f83-84d7-495021958059" ], + "x-ms-unique-id": [ "47" ], + "x-ms-client-request-id": [ "d217a355-a096-44a8-92ed-5c1c97730086" ], "CommandName": [ "Remove-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsEnvironment_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -140,11 +140,11 @@ "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "33367737-6714-4350-a1ab-e7fba03049af" ], + "x-ms-request-id": [ "a36d258f-6fe1-4305-9d5a-c1f81b49cf87" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "3857716e-6f64-4ddc-8f92-9ab07bf1c85b" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120106Z:3857716e-6f64-4ddc-8f92-9ab07bf1c85b" ], - "Date": [ "Thu, 02 Apr 2020 12:01:05 GMT" ] + "x-ms-correlation-request-id": [ "3f9d83c7-3174-48da-9c0b-be6af6cfd3ec" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073808Z:3f9d83c7-3174-48da-9c0b-be6af6cfd3ec" ], + "Date": [ "Wed, 08 Apr 2020 07:38:08 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -153,14 +153,14 @@ "Content": null } }, - "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+3": { + "Remove-AzTimeSeriesInsightsEnvironment+[NoContext]+DeleteInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "01c93cb0-eca5-410c-bc5b-611cccb8a1f0" ], + "x-ms-unique-id": [ "48" ], + "x-ms-client-request-id": [ "ee7f1700-2cb4-4541-8967-13a9e3f6acf9" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -175,21 +175,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11963" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "233b8d88-578c-4a4b-8b35-e3f189eac0a4" ], + "x-ms-request-id": [ "0a978e1f-8fae-4dc6-b285-c9581894887a" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "9107f363-c706-4ed0-a9e9-f02d89ef556d" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T120106Z:9107f363-c706-4ed0-a9e9-f02d89ef556d" ], - "Date": [ "Thu, 02 Apr 2020 12:01:06 GMT" ] + "x-ms-correlation-request-id": [ "8c5d716c-5e7b-4356-99de-137659837e0d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073808Z:8c5d716c-5e7b-4356-99de-137659837e0d" ], + "Date": [ "Wed, 08 Apr 2020 07:38:08 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2796" ], + "Content-Length": [ "2795" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccounttest001\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:44:42 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8\",\"dataAccessFqdn\":\"1cdd0c77-1af8-4381-af15-12712bd1f2f8.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-cjqkrd\",\"name\":\"rstr-cjqkrd\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:42:33 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274\",\"dataAccessFqdn\":\"3ff4cfce-4450-4fa1-899b-8b5a4020a274.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme\",\"name\":\"rstr-8qzfme\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" + "Content": "{\"value\":[{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountmtudlr\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:37:14 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259\",\"dataAccessFqdn\":\"1ae694bd-9eb2-4005-931e-867f2f8e2259.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-s13wly\",\"name\":\"rstr-s13wly\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"},{\"sku\":{\"name\":\"S2\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:36:39 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3\",\"dataAccessFqdn\":\"2043650c-7f95-492f-a570-7bd7bb1f88f3.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c\",\"name\":\"rstr-jra51c\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}]}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json index 7c8a4e7dafd1..17042f424953 100644 --- a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsEventSource.Recording.json @@ -1,12 +1,12 @@ { - "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventsources/rstr-9rzn7d?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c/eventsources/rstr-mklg1c?api-version=2018-08-15-preview+1": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventsources/rstr-9rzn7d?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c/eventsources/rstr-mklg1c?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "64e97e4a-9894-4be8-954d-d2f825c0b8c3" ], + "x-ms-unique-id": [ "49" ], + "x-ms-client-request-id": [ "c13da34d-f78a-4977-95e9-3d4095e720e9" ], "CommandName": [ "Remove-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsEventSource_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -17,34 +17,32 @@ } }, "Response": { - "StatusCode": 200, + "StatusCode": 204, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14995" ], + "x-ms-request-id": [ "b9699580-71d2-4685-9390-0e9f4abc6043" ], + "x-ms-correlation-request-id": [ "b9699580-71d2-4685-9390-0e9f4abc6043" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073809Z:b9699580-71d2-4685-9390-0e9f4abc6043" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "537270a1-054b-465e-826d-d8eaf786235a" ], - "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "34bc6a85-ec5a-461b-9acf-40fd79d47300" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124226Z:34bc6a85-ec5a-461b-9acf-40fd79d47300" ], - "Date": [ "Thu, 02 Apr 2020 12:42:26 GMT" ] + "Date": [ "Wed, 08 Apr 2020 07:38:09 GMT" ] }, "ContentHeaders": { - "Expires": [ "-1" ], - "Content-Length": [ "0" ] + "Expires": [ "-1" ] }, "Content": null } }, - "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventSources?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c/eventSources?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-8qzfme/eventSources?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-jra51c/eventSources?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "90b19fcf-0155-4e49-b07b-e311bf99c3eb" ], + "x-ms-unique-id": [ "50" ], + "x-ms-client-request-id": [ "67f9b115-f7b1-4afd-9fb5-9b91feb94c27" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -59,14 +57,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11962" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bd3149c2-388f-403a-b6ca-ee2b79c65da0" ], + "x-ms-request-id": [ "aefb42aa-fe5c-4ac2-bdb3-8c1269fb2d67" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "a1bb8e2d-753c-4f29-9f60-e91c686bfc6b" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124227Z:a1bb8e2d-753c-4f29-9f60-e91c686bfc6b" ], - "Date": [ "Thu, 02 Apr 2020 12:42:26 GMT" ] + "x-ms-correlation-request-id": [ "a15d92a0-97bb-45bb-97fe-6ceef1f0ef27" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073810Z:a15d92a0-97bb-45bb-97fe-6ceef1f0ef27" ], + "Date": [ "Wed, 08 Apr 2020 07:38:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "12" ], @@ -76,14 +74,14 @@ "Content": "{\"value\":[]}" } }, - "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk/eventsources/tsi-esjar3w6?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk/eventsources/tsi-esjar3w6?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "4d931d5c-80c2-4335-b738-3282eb203676" ], + "x-ms-unique-id": [ "51" ], + "x-ms-client-request-id": [ "04608494-dac1-4cda-9a3b-f270c99301db" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -98,31 +96,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11961" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "67e34358-f47d-4c6f-a80c-55a53ad48ec0" ], + "x-ms-request-id": [ "9142780b-45e8-4f5a-b1ee-47728d5a325c" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "e8fdb36f-614f-4fe7-84e7-edbc9aff4f96" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124227Z:e8fdb36f-614f-4fe7-84e7-edbc9aff4f96" ], - "Date": [ "Thu, 02 Apr 2020 12:42:27 GMT" ] + "x-ms-correlation-request-id": [ "ec278338-bc84-493b-9d8b-b7d6b5f4a017" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073810Z:ec278338-bc84-493b-9d8b-b7d6b5f4a017" ], + "Date": [ "Wed, 08 Apr 2020 07:38:10 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "758" ], + "Content-Length": [ "782" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"serviceBusNamespace\":\"apacename001\",\"eventHubName\":\"hubname001\",\"keyName\":\"RootManageSharedAccessKey\",\"consumerGroupName\":\"$Default\",\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.EventHub/namespaces/apacename001/eventhubs/hubname001\",\"localTimestamp\":null,\"creationTime\":\"Thu, 02 Apr 2020 12:41:32 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p\",\"name\":\"tsi-esyb6s7p\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-p6qzi9/eventhubs/eventhubname-vwrm83\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-vwrm83\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-p6qzi9\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:34 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk/eventsources/tsi-esjar3w6\",\"name\":\"tsi-esjar3w6\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk/eventsources/tsi-esjar3w6?api-version=2018-08-15-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventsources/tsi-esyb6s7p?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk/eventsources/tsi-esjar3w6?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "51299826-0fe3-44cc-a1a5-7b62777478c5" ], + "x-ms-unique-id": [ "52" ], + "x-ms-client-request-id": [ "7c4df51a-6bba-4eff-b125-d036bf925865" ], "CommandName": [ "Remove-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsEventSource_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -137,14 +135,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14994" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "c6bfc47e-37ab-4b09-b06d-984057cca48c" ], + "x-ms-request-id": [ "2090e3cc-0393-4580-9685-710968c4de1f" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "2481da56-33b8-4cbc-9fce-fe45df5db261" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124230Z:2481da56-33b8-4cbc-9fce-fe45df5db261" ], - "Date": [ "Thu, 02 Apr 2020 12:42:30 GMT" ] + "x-ms-correlation-request-id": [ "9660af9d-d52b-4cc1-894f-721041a44bf6" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073812Z:9660af9d-d52b-4cc1-894f-721041a44bf6" ], + "Date": [ "Wed, 08 Apr 2020 07:38:12 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -153,14 +151,14 @@ "Content": null } }, - "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventSources?api-version=2018-08-15-preview+3": { + "Remove-AzTimeSeriesInsightsEventSource+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk/eventSources?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q/eventSources?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk/eventSources?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "03544b84-2782-4dc5-a278-970a9ab8faa0" ], + "x-ms-unique-id": [ "53" ], + "x-ms-client-request-id": [ "8a614262-17b0-446f-992e-7997e566c7a0" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -175,14 +173,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11960" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7aee5c9e-4afd-4f20-8b89-3c7dc99e8733" ], + "x-ms-request-id": [ "caa40840-a918-4412-ab08-ee2f0f6816f8" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "17256d93-4b66-4e46-8f98-16c057639576" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T124231Z:17256d93-4b66-4e46-8f98-16c057639576" ], - "Date": [ "Thu, 02 Apr 2020 12:42:30 GMT" ] + "x-ms-correlation-request-id": [ "39de6b05-7a93-4dc4-ba12-64a495249b3e" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073813Z:39de6b05-7a93-4dc4-ba12-64a495249b3e" ], + "Date": [ "Wed, 08 Apr 2020 07:38:12 GMT" ] }, "ContentHeaders": { "Content-Length": [ "12" ], diff --git a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json index e32926719fed..faf7a0c1fbb4 100644 --- a/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json +++ b/src/TimeSeriesInsights/test/Remove-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -1,12 +1,12 @@ { - "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p?api-version=2018-08-15-preview", "Content": "{\n \"location\": \"eastus2\",\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n },\n \"kind\": \"Standard\",\n \"properties\": {\n \"dataRetentionTime\": \"P1DT1H25M\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "e4ba7476-280e-48c8-b098-d1e07ae4b54e" ], + "x-ms-unique-id": [ "54" ], + "x-ms-client-request-id": [ "2e455af0-f40b-4043-a773-0a4c64a125a0" ], "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -18,36 +18,114 @@ "Content-Length": [ "161" ] } }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "02c0255e-898f-4f64-83df-7830c8828fda" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "c2e33e86-2843-4d9c-83d0-adf5604ca19d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073816Z:c2e33e86-2843-4d9c-83d0-adf5604ca19d" ], + "Date": [ "Wed, 08 Apr 2020 07:38:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "654" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"2020-04-08T07:38:15+00:00\",\"provisioningState\":\"Accepted\",\"dataAccessId\":\"2506153c-c73c-4cae-a3fc-0d8ad35122c4\",\"dataAccessFqdn\":\"2506153c-c73c-4cae-a3fc-0d8ad35122c4.env.timeseries.azure.com\",\"requestApiVersion\":\"2018-08-15-preview\",\"storageLimitExceededBehavior\":\"PurgeOldData\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p\",\"name\":\"rstr-d2ih3p\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p?api-version=2018-08-15-preview+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "54", "55" ], + "x-ms-client-request-id": [ "2e455af0-f40b-4043-a773-0a4c64a125a0", "2e455af0-f40b-4043-a773-0a4c64a125a0" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11959" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "8edfc5e7-276c-4bf4-8a3c-b5b41f0dfa28" ], + "Server": [ "Microsoft-HTTPAPI/2.0" ], + "x-ms-correlation-request-id": [ "1e74473a-187c-4f52-8cd2-88aef5148b27" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073847Z:1e74473a-187c-4f52-8cd2-88aef5148b27" ], + "Date": [ "Wed, 08 Apr 2020 07:38:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "689" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:38:15 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"2506153c-c73c-4cae-a3fc-0d8ad35122c4\",\"dataAccessFqdn\":\"2506153c-c73c-4cae-a3fc-0d8ad35122c4.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p\",\"name\":\"rstr-d2ih3p\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + } + }, + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p?api-version=2018-08-15-preview+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p?api-version=2018-08-15-preview", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "54", "55", "56" ], + "x-ms-client-request-id": [ "2e455af0-f40b-4043-a773-0a4c64a125a0", "2e455af0-f40b-4043-a773-0a4c64a125a0", "2e455af0-f40b-4043-a773-0a4c64a125a0" ], + "CommandName": [ "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment", "Az.TimeSeriesInsights.internal\\New-AzTimeSeriesInsightsEnvironment" ], + "FullCommandName": [ "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create", "New-AzTimeSeriesInsightsEnvironment_Create" ], + "ParameterSetName": [ "__AllParameterSets", "__AllParameterSets", "__AllParameterSets" ], + "User-Agent": [ "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview", "AzurePowerShell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, "Response": { "StatusCode": 200, "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11958" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "68d40b8e-3d87-42b6-ae8a-f0ae680ac692" ], + "x-ms-request-id": [ "58527ea3-5a63-4630-bfb3-c49daad773ab" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "112c7074-e96f-4d8e-abe4-56cd3d9f4967" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122000Z:112c7074-e96f-4d8e-abe4-56cd3d9f4967" ], - "Date": [ "Thu, 02 Apr 2020 12:19:59 GMT" ] + "x-ms-correlation-request-id": [ "62cf93f6-dca8-445c-8fb8-bfd4d67010f1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073847Z:62cf93f6-dca8-445c-8fb8-bfd4d67010f1" ], + "Date": [ "Wed, 08 Apr 2020 07:38:46 GMT" ] }, "ContentHeaders": { "Content-Length": [ "689" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 12:13:04 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"4f0062c4-edfd-4b90-96e6-5e6ebe56c6da\",\"dataAccessFqdn\":\"4f0062c4-edfd-4b90-96e6-5e6ebe56c6da.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls\",\"name\":\"rstr-m9t7ls\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:38:15 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"2506153c-c73c-4cae-a3fc-0d8ad35122c4\",\"dataAccessFqdn\":\"2506153c-c73c-4cae-a3fc-0d8ad35122c4.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p\",\"name\":\"rstr-d2ih3p\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds003?api-version=2018-08-15-preview+4": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds003?api-version=2018-08-15-preview", "Content": "{\n \"location\": \"eastus2\",\n \"properties\": {\n \"dataStringComparisonBehavior\": \"Ordinal\",\n \"keyProperties\": [\n {\n \"name\": \"device01\",\n \"type\": \"Double\"\n }\n ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "99fe3955-a267-4cf3-b4ba-3fe82907bc0f" ], + "x-ms-unique-id": [ "57" ], + "x-ms-client-request-id": [ "9dc3d0ea-7ca0-4f8b-a0bc-c99b8a99a972" ], "CommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -64,31 +142,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "c324c06b-77c0-46e6-9f62-9f3ab29c1557" ], + "x-ms-request-id": [ "48d84884-0ef4-4e9a-9f3f-aa88607b4030" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "ab78b050-fce8-4f97-bc3a-22f636589de8" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122008Z:ab78b050-fce8-4f97-bc3a-22f636589de8" ], - "Date": [ "Thu, 02 Apr 2020 12:20:07 GMT" ] + "x-ms-correlation-request-id": [ "490eccfc-56c0-4490-9622-53b4a7c9d4a0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073851Z:490eccfc-56c0-4490-9622-53b4a7c9d4a0" ], + "Date": [ "Wed, 08 Apr 2020 07:38:50 GMT" ] }, "ContentHeaders": { "Content-Length": [ "497" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 12:20:05 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003\",\"name\":\"removeds003\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:38:50 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds003\",\"name\":\"removeds003\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview+3": { + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds003?api-version=2018-08-15-preview+5": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds003?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds003?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "d051e9a5-aa22-4455-8d78-b3c165ca8389" ], + "x-ms-unique-id": [ "58" ], + "x-ms-client-request-id": [ "fcd572f0-3449-41e7-bbf5-718ebec18b56" ], "CommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -103,14 +181,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14993" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "02c6db73-ed86-42c3-b6f0-c5be66874d45" ], + "x-ms-request-id": [ "f1e60c4a-3f1f-4441-8348-203d2258adb7" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "6491932b-7320-4ab4-983f-70713a549145" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122010Z:6491932b-7320-4ab4-983f-70713a549145" ], - "Date": [ "Thu, 02 Apr 2020 12:20:10 GMT" ] + "x-ms-correlation-request-id": [ "72990092-f809-412a-8331-388a1c267796" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073854Z:72990092-f809-412a-8331-388a1c267796" ], + "Date": [ "Wed, 08 Apr 2020 07:38:53 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -119,14 +197,14 @@ "Content": null } }, - "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview+4": { + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+Delete+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets?api-version=2018-08-15-preview+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "58cfbd10-d312-45e6-b393-efb0b04be1e3" ], + "x-ms-unique-id": [ "59" ], + "x-ms-client-request-id": [ "d62a608f-c2e8-4459-a2d1-9633a38c01af" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -141,14 +219,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11957" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "19151852-2292-484d-8444-b74325bbe8a8" ], + "x-ms-request-id": [ "696da676-9df5-4531-b8cf-28cddce9b682" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "a45782ef-c583-42e7-9912-20ef577344af" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122011Z:a45782ef-c583-42e7-9912-20ef577344af" ], - "Date": [ "Thu, 02 Apr 2020 12:20:10 GMT" ] + "x-ms-correlation-request-id": [ "d0f96555-7384-4aec-8eb5-f167b713228f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073854Z:d0f96555-7384-4aec-8eb5-f167b713228f" ], + "Date": [ "Wed, 08 Apr 2020 07:38:53 GMT" ] }, "ContentHeaders": { "Content-Length": [ "12" ], @@ -158,14 +236,14 @@ "Content": "{\"value\":[]}" } }, - "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview+1": { + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds002?api-version=2018-08-15-preview+1": { "Request": { "Method": "PUT", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds002?api-version=2018-08-15-preview", "Content": "{\n \"location\": \"eastus2\",\n \"properties\": {\n \"dataStringComparisonBehavior\": \"Ordinal\",\n \"keyProperties\": [\n {\n \"name\": \"device01\",\n \"type\": \"Double\"\n }\n ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "4afa0f7d-dfc0-4953-ac9f-7795da9b6440" ], + "x-ms-unique-id": [ "60" ], + "x-ms-client-request-id": [ "b16a0095-11aa-43a7-b9e6-922aa6470ab1" ], "CommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "New-AzTimeSeriesInsightsReferenceDataSet_CreateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -182,31 +260,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "023795c8-1cce-4552-a908-e52ea4c83654" ], + "x-ms-request-id": [ "28b8f2a9-1a20-4b5e-aa38-92efaa3b942b" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "b405a644-bcc2-4468-92d4-cedab17789e9" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122014Z:b405a644-bcc2-4468-92d4-cedab17789e9" ], - "Date": [ "Thu, 02 Apr 2020 12:20:14 GMT" ] + "x-ms-correlation-request-id": [ "0e0206b9-c25f-42ad-a432-a8d907dd26a3" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073857Z:0e0206b9-c25f-42ad-a432-a8d907dd26a3" ], + "Date": [ "Wed, 08 Apr 2020 07:38:56 GMT" ] }, "ContentHeaders": { "Content-Length": [ "497" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 12:20:13 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002\",\"name\":\"removeds002\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:38:56 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds002\",\"name\":\"removeds002\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview+2": { + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds002?api-version=2018-08-15-preview+2": { "Request": { "Method": "DELETE", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets/removeds002?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets/removeds002?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "babb0e9b-9fb1-40e5-a855-c563f11bce49" ], + "x-ms-unique-id": [ "61" ], + "x-ms-client-request-id": [ "465e8a9d-648d-4d8b-8eb0-8a506040274a" ], "CommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Remove-AzTimeSeriesInsightsReferenceDataSet_DeleteViaIdentity" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -221,14 +299,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-correlation-request-id": [ "92215d1a-ce5a-4d54-afa8-de07abb1544a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "431cf0b0-2180-46d5-8621-31eb7c39a42a" ], + "x-ms-request-id": [ "1609372c-6926-4315-a9d6-7ace71933f52" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14992" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "f3d0e19c-6479-4521-8cd5-1660e802483b" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122017Z:f3d0e19c-6479-4521-8cd5-1660e802483b" ], - "Date": [ "Thu, 02 Apr 2020 12:20:16 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073900Z:92215d1a-ce5a-4d54-afa8-de07abb1544a" ], + "Date": [ "Wed, 08 Apr 2020 07:38:59 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -237,14 +315,14 @@ "Content": null } }, - "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview+3": { + "Remove-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+DeleteViaIdentity+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/rstr-m9t7ls/referenceDataSets?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/rstr-d2ih3p/referenceDataSets?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "ee9bfe69-e48c-4a97-bebb-75298cebb825" ], + "x-ms-unique-id": [ "62" ], + "x-ms-client-request-id": [ "6cefad32-1615-4a6d-a919-7000a4a6f540" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -259,14 +337,14 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11956" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "85d2ab5b-1dd9-4518-998c-d1e3a8e78dec" ], + "x-ms-request-id": [ "0d87f512-cc24-48ed-9e0d-dd0a24bf180c" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "79e8159e-16de-4b73-80b0-c33dc5813559" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122017Z:79e8159e-16de-4b73-80b0-c33dc5813559" ], - "Date": [ "Thu, 02 Apr 2020 12:20:17 GMT" ] + "x-ms-correlation-request-id": [ "019030c4-3784-48d9-bfc9-302471681839" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073901Z:019030c4-3784-48d9-bfc9-302471681839" ], + "Date": [ "Wed, 08 Apr 2020 07:39:00 GMT" ] }, "ContentHeaders": { "Content-Length": [ "12" ], diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json index b14928d840f9..8ab85beed751 100644 --- a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsAccessPolicy.Recording.json @@ -1,12 +1,12 @@ { - "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview", "Content": "{\n \"properties\": {\n \"roles\": [ \"Contributor\" ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "f4d74f35-2c70-4039-bb73-38f0b88ab1ea" ], + "x-ms-unique-id": [ "63" ], + "x-ms-client-request-id": [ "a84cd930-f4dd-417d-9c67-e1b961adc76f" ], "CommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -23,31 +23,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "69f0fd84-d51a-441f-ae0a-250165562fe7" ], + "x-ms-request-id": [ "e5472a95-a623-4cdb-9ee2-1419a9a99c6d" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "b0c06b50-3eb6-4707-893e-ec02f29fdb5f" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122109Z:b0c06b50-3eb6-4707-893e-ec02f29fdb5f" ], - "Date": [ "Thu, 02 Apr 2020 12:21:09 GMT" ] + "x-ms-correlation-request-id": [ "5a5d262f-d34b-40f8-909b-526e72389f93" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073902Z:5a5d262f-d34b-40f8-909b-526e72389f93" ], + "Date": [ "Wed, 08 Apr 2020 07:39:02 GMT" ] }, "ContentHeaders": { "Content-Length": [ "371" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } }, - "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accessPolicies?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accessPolicies?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "38e3dc61-0d63-49d0-b5cf-29a83ff275c9" ], + "x-ms-unique-id": [ "64" ], + "x-ms-client-request-id": [ "bf56f731-ba33-4b8d-b728-337fc1ffc16b" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -62,31 +62,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11955" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0271ff39-149b-47a3-8524-63ff23c733fe" ], + "x-ms-request-id": [ "f179438f-2a8a-46ca-91e0-d0dbbf0ff0a7" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "3e59a917-82cf-4e47-a6eb-327177ef7779" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122110Z:3e59a917-82cf-4e47-a6eb-327177ef7779" ], - "Date": [ "Thu, 02 Apr 2020 12:21:10 GMT" ] + "x-ms-correlation-request-id": [ "afd0d3b4-3283-4b51-a03b-d04e741c17b0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073902Z:afd0d3b4-3283-4b51-a03b-d04e741c17b0" ], + "Date": [ "Wed, 08 Apr 2020 07:39:02 GMT" ] }, "ContentHeaders": { "Content-Length": [ "383" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" + "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" } }, - "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "19a1e1a7-a533-4c40-90c0-9bd89460743f" ], + "x-ms-unique-id": [ "65" ], + "x-ms-client-request-id": [ "42898952-68e5-42e9-b6fa-309d7c1c3a5e" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -101,31 +101,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11954" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "38492eaa-0b24-4da4-9091-465ecad6fdb6" ], + "x-ms-request-id": [ "3d121e14-2eff-4b28-83f2-893097f009cb" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "8790235b-980f-48f9-9e09-cb37151e645f" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122110Z:8790235b-980f-48f9-9e09-cb37151e645f" ], - "Date": [ "Thu, 02 Apr 2020 12:21:10 GMT" ] + "x-ms-correlation-request-id": [ "8edd06da-4ce0-44bd-bc55-4f8d81d69553" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073902Z:8edd06da-4ce0-44bd-bc55-4f8d81d69553" ], + "Date": [ "Wed, 08 Apr 2020 07:39:02 GMT" ] }, "ContentHeaders": { "Content-Length": [ "371" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Contributor\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } }, - "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y?api-version=2018-08-15-preview", "Content": "{\n \"properties\": {\n \"roles\": [ \"Reader\" ]\n }\n}", "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "76e56a5e-decb-4e68-8410-49ea3903dd85" ], + "x-ms-unique-id": [ "66" ], + "x-ms-client-request-id": [ "07bb0f0a-ba1b-4692-8a3d-f4d5834b23a6" ], "CommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsAccessPolicy_UpdateViaIdentityExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -142,31 +142,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1186" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ed51a691-7265-48a7-8e0c-5a2220c81cbf" ], + "x-ms-request-id": [ "60f943bc-ab95-4c9d-994b-888d12683ef5" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "146df797-4fcc-48f3-b965-e7ea9f0a72e7" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122111Z:146df797-4fcc-48f3-b965-e7ea9f0a72e7" ], - "Date": [ "Thu, 02 Apr 2020 12:21:11 GMT" ] + "x-ms-correlation-request-id": [ "0a10e43e-428d-40eb-8f16-5db4e8c753a1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073903Z:0a10e43e-428d-40eb-8f16-5db4e8c753a1" ], + "Date": [ "Wed, 08 Apr 2020 07:39:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "366" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" + "Content": "{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}" } }, - "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview+3": { + "Update-AzTimeSeriesInsightsAccessPolicy+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accessPolicies?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accessPolicies?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accessPolicies?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "caffa40d-1ef9-4d83-b18e-becc9a346651" ], + "x-ms-unique-id": [ "67" ], + "x-ms-client-request-id": [ "cbb8ce59-96c8-452b-bcaa-22b1771214a2" ], "CommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsAccessPolicy_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -181,21 +181,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11953" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "a66fed4a-a6e7-4712-9f32-b3500429b45b" ], + "x-ms-request-id": [ "e6503286-5464-45c0-bbd6-051b6c6b8cc1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "0a175906-3a30-4294-a60b-521837599e2b" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122112Z:0a175906-3a30-4294-a60b-521837599e2b" ], - "Date": [ "Thu, 02 Apr 2020 12:21:11 GMT" ] + "x-ms-correlation-request-id": [ "0171e83a-47ed-43f2-8bf3-1b80362b7b23" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073903Z:0171e83a-47ed-43f2-8bf3-1b80362b7b23" ], + "Date": [ "Wed, 08 Apr 2020 07:39:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "378" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/accesspolicies/tsi-apr3q8wo\",\"name\":\"tsi-apr3q8wo\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" + "Content": "{\"value\":[{\"properties\":{\"principalObjectId\":\"97deab6c-e478-40b4-b4da-e7d9353dc1e8\",\"roles\":[\"Reader\"]},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/accesspolicies/tsi-apilgj5y\",\"name\":\"tsi-apilgj5y\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/AccessPolicies\"}]}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json index a2dd0c9bf4f4..491dfcbe6fb3 100644 --- a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEnvironment.Recording.json @@ -1,12 +1,12 @@ { - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "e4f86f3a-5389-4019-9275-0b2ae285e42a" ], + "x-ms-unique-id": [ "68" ], + "x-ms-client-request-id": [ "9d94d60b-5d28-4c62-922c-392726cd4309" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -21,31 +21,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11952" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "26d5f9e7-4c71-46f2-b371-98eeeb80d810" ], + "x-ms-request-id": [ "0542c858-c492-49d9-9926-21d3d77a4ca2" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "35d8a0af-cb7a-42b9-852e-6f642fccb61e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122209Z:35d8a0af-cb7a-42b9-852e-6f642fccb61e" ], - "Date": [ "Thu, 02 Apr 2020 12:22:08 GMT" ] + "x-ms-correlation-request-id": [ "8839181f-a613-468c-82c1-c76ca286c542" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073904Z:8839181f-a613-468c-82c1-c76ca286c542" ], + "Date": [ "Wed, 08 Apr 2020 07:39:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "693" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":null,\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview", "Content": "{\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 2\n }\n}", "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "303069b2-3605-4071-9bab-59f57a0f2f9a" ], + "x-ms-unique-id": [ "69" ], + "x-ms-client-request-id": [ "e50a1426-3e20-4481-986e-38753f398d35" ], "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -62,31 +62,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1185" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "6cb13e03-8c80-4248-be97-7778a85ffc5e" ], + "x-ms-request-id": [ "06d11567-1fc7-498c-b4ea-c2c950f5044b" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "5f3475da-ce77-4373-9de8-e098dc8d324b" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122214Z:5f3475da-ce77-4373-9de8-e098dc8d324b" ], - "Date": [ "Thu, 02 Apr 2020 12:22:14 GMT" ] + "x-ms-correlation-request-id": [ "24d603d9-0623-4788-9d4c-70dc112cba15" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073906Z:24d603d9-0623-4788-9d4c-70dc112cba15" ], + "Date": [ "Wed, 08 Apr 2020 07:39:06 GMT" ] }, "ContentHeaders": { "Content-Length": [ "691" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+3": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandard+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "00e72186-daca-4d13-8937-776b89535e41" ], + "x-ms-unique-id": [ "70" ], + "x-ms-client-request-id": [ "57d34c26-487c-454f-90b3-48696b73a259" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -101,31 +101,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11951" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4feedc9a-d96f-435c-9f68-8bcb48dbd4c0" ], + "x-ms-request-id": [ "e0fd8e01-3ba7-4725-b711-c8633a15d8e1" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "00279bd9-4f05-4383-87c2-548dca3e4089" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122215Z:00279bd9-4f05-4383-87c2-548dca3e4089" ], - "Date": [ "Thu, 02 Apr 2020 12:22:14 GMT" ] + "x-ms-correlation-request-id": [ "ce118cba-75a7-4c8d-98e1-2a02df742803" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073907Z:ce118cba-75a7-4c8d-98e1-2a02df742803" ], + "Date": [ "Wed, 08 Apr 2020 07:39:06 GMT" ] }, "ContentHeaders": { "Content-Length": [ "691" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "c4d27cee-8461-489e-b666-d52e7390fba0" ], + "x-ms-unique-id": [ "71" ], + "x-ms-client-request-id": [ "b1cce224-cbb6-4d9d-9449-1c9b7079ab77" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -140,31 +140,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11950" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "63ccc24c-daea-46ff-81f9-a47e850eeea4" ], + "x-ms-request-id": [ "24213696-c73a-4879-9a60-a6caba2ade36" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "1cf6e17f-8693-4876-b8a0-bf271a67ffd2" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122216Z:1cf6e17f-8693-4876-b8a0-bf271a67ffd2" ], - "Date": [ "Thu, 02 Apr 2020 12:22:15 GMT" ] + "x-ms-correlation-request-id": [ "97d2fcdc-9372-4199-b93b-c205ef04d2a9" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073907Z:97d2fcdc-9372-4199-b93b-c205ef04d2a9" ], + "Date": [ "Wed, 08 Apr 2020 07:39:07 GMT" ] }, "ContentHeaders": { "Content-Length": [ "691" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":2},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview", "Content": "{\n \"sku\": {\n \"name\": \"S1\",\n \"capacity\": 1\n }\n}", "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "6ef29ef9-b14e-4403-9ad5-271e3dcf6a03" ], + "x-ms-unique-id": [ "72" ], + "x-ms-client-request-id": [ "55d5387c-8c20-4e2f-a84c-3cd0ed8871f4" ], "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateViaIdentityExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -181,31 +181,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1184" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ebba3dae-1fc0-473a-9a6a-dc6996d4a45d" ], + "x-ms-request-id": [ "639afc93-98fb-49a0-8bbd-3695fd455c8c" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "09634ea7-d1c0-47e0-b13c-63b57682628c" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122219Z:09634ea7-d1c0-47e0-b13c-63b57682628c" ], - "Date": [ "Thu, 02 Apr 2020 12:22:18 GMT" ] + "x-ms-correlation-request-id": [ "7589dd39-a5c5-4602-a7d4-b4ae966b2b5f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073909Z:7589dd39-a5c5-4602-a7d4-b4ae966b2b5f" ], + "Date": [ "Wed, 08 Apr 2020 07:39:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "691" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":1},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":1},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview+3": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateStandardInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "fbd27812-0c5a-4c2d-ad58-fdb1122de35b" ], + "x-ms-unique-id": [ "73" ], + "x-ms-client-request-id": [ "2f5c49cf-9a03-475e-a780-b6030b4971f4" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -220,31 +220,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11949" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "cdeb36f2-18f4-4831-ad9f-b4fc9c89e588" ], + "x-ms-request-id": [ "fd475efb-c89f-41bb-a2c3-4820625a0caa" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "6aab11d6-b7dc-4f20-ae29-bbd38c0f7c8e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122219Z:6aab11d6-b7dc-4f20-ae29-bbd38c0f7c8e" ], - "Date": [ "Thu, 02 Apr 2020 12:22:18 GMT" ] + "x-ms-correlation-request-id": [ "58ad3c47-ee51-4b72-9382-3e6759dd31c1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073910Z:58ad3c47-ee51-4b72-9382-3e6759dd31c1" ], + "Date": [ "Wed, 08 Apr 2020 07:39:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "691" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":1},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Thu, 02 Apr 2020 11:28:45 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"b81741c3-794f-4cf5-af9e-42edd9afd658\",\"dataAccessFqdn\":\"b81741c3-794f-4cf5-af9e-42edd9afd658.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm\",\"name\":\"tsi-envr0gwcm\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"S1\",\"capacity\":1},\"kind\":\"Standard\",\"location\":\"eastus2\",\"tags\":{},\"properties\":{\"dataRetentionTime\":\"P1DT1H25M\",\"creationTime\":\"Wed, 08 Apr 2020 07:30:17 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9\",\"dataAccessFqdn\":\"d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com\",\"storageLimitExceededBehavior\":\"PurgeOldData\",\"partitionKeyProperties\":null},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x\",\"name\":\"tsi-envv8u56x\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "9de47406-8736-406b-bec0-5c630ce60e21" ], + "x-ms-unique-id": [ "74" ], + "x-ms-client-request-id": [ "c8e18c99-c754-482b-92f9-cb4c9d83df0e" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -259,31 +259,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11948" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e85a83de-aeb8-4844-b2c1-870c011b2002" ], + "x-ms-request-id": [ "3490d466-64d4-4b65-97a3-365d83c5b5c2" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "55f90d8c-73dc-45b4-913c-efeb2aedb584" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122220Z:55f90d8c-73dc-45b4-913c-efeb2aedb584" ], - "Date": [ "Thu, 02 Apr 2020 12:22:19 GMT" ] + "x-ms-correlation-request-id": [ "8dc0ea96-4642-4975-ad25-4b3a4672d9b3" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073910Z:8dc0ea96-4642-4975-ad25-4b3a4672d9b3" ], + "Date": [ "Wed, 08 Apr 2020 07:39:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "701" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":null,\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": "{\n \"sku\": {\n \"name\": \"L1\",\n \"capacity\": 1\n }\n}", "Headers": { - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "7baddd1a-345a-41e2-9180-1cf492c06942" ], + "x-ms-unique-id": [ "75" ], + "x-ms-client-request-id": [ "e46989b6-81b3-4011-a723-b56bec81b293" ], "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -300,31 +300,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1183" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "2e3747bb-bf42-4a4e-90f2-a377c32dd306" ], + "x-ms-request-id": [ "a2962f94-ad46-4869-a481-e96c156e0be3" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "9f2aa2dd-ce61-45f8-819e-8c2677a02829" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122223Z:9f2aa2dd-ce61-45f8-819e-8c2677a02829" ], - "Date": [ "Thu, 02 Apr 2020 12:22:22 GMT" ] + "x-ms-correlation-request-id": [ "1fda1129-f7fd-4ab2-b7e9-189c9674c152" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073912Z:1fda1129-f7fd-4ab2-b7e9-189c9674c152" ], + "Date": [ "Wed, 08 Apr 2020 07:39:12 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+3": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTerm+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "5efdb6b6-c521-4a4a-ba83-af2235e461fa" ], + "x-ms-unique-id": [ "76" ], + "x-ms-client-request-id": [ "95a88ffe-8456-4031-ac4b-1601a2970c77" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -339,31 +339,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11947" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bfe59bfa-69e2-40d3-8852-b836086c798b" ], + "x-ms-request-id": [ "6f782396-ac4b-4b1a-9c95-511e9c57b79a" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "a422f942-f46d-42c8-9aa1-688e6f2785de" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122223Z:a422f942-f46d-42c8-9aa1-688e6f2785de" ], - "Date": [ "Thu, 02 Apr 2020 12:22:22 GMT" ] + "x-ms-correlation-request-id": [ "4255239b-307c-4e5a-a0c2-d63c7e8531f1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073912Z:4255239b-307c-4e5a-a0c2-d63c7e8531f1" ], + "Date": [ "Wed, 08 Apr 2020 07:39:12 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "0d84085f-7282-42a3-8d95-3b7310bc20a2" ], + "x-ms-unique-id": [ "77" ], + "x-ms-client-request-id": [ "bb50b12c-6115-49ea-9be6-a90ee400f538" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -378,31 +378,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11946" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ddb21910-39fc-4f5b-966a-39a6520154cb" ], + "x-ms-request-id": [ "5d351085-02c6-4975-b90e-7e6f1ba96457" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "49e847ce-1094-4312-a41a-f33202f07987" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122224Z:49e847ce-1094-4312-a41a-f33202f07987" ], - "Date": [ "Thu, 02 Apr 2020 12:22:23 GMT" ] + "x-ms-correlation-request-id": [ "05062b0a-371b-4c17-a8d7-8afe74e816ca" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073913Z:05062b0a-371b-4c17-a8d7-8afe74e816ca" ], + "Date": [ "Wed, 08 Apr 2020 07:39:13 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": "{\n \"sku\": {\n \"name\": \"L1\",\n \"capacity\": 1\n }\n}", "Headers": { - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "0d1b0f50-bc49-4f17-999d-fc8467e0ed97" ], + "x-ms-unique-id": [ "78" ], + "x-ms-client-request-id": [ "706c923e-b9de-4a9e-99cc-d1e8c504fc51" ], "CommandName": [ "Update-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsEnvironment_UpdateViaIdentityExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -419,31 +419,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1182" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "2017b446-5081-456d-b86c-ff931393d7bf" ], + "x-ms-request-id": [ "c4a329a3-9b7e-4b1b-a134-847c8d0b4d0d" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "23b86b44-7ef9-466f-a8a8-44e192a929da" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122226Z:23b86b44-7ef9-466f-a8a8-44e192a929da" ], - "Date": [ "Thu, 02 Apr 2020 12:22:25 GMT" ] + "x-ms-correlation-request-id": [ "16632ff2-13ef-41b6-a54c-80409a32efc2" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073915Z:16632ff2-13ef-41b6-a54c-80409a32efc2" ], + "Date": [ "Wed, 08 Apr 2020 07:39:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } }, - "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview+3": { + "Update-AzTimeSeriesInsightsEnvironment+[NoContext]+UpdateLongTermInputObject+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "9a9d9bbb-db14-4add-9d5a-a5919e2df7f0" ], + "x-ms-unique-id": [ "79" ], + "x-ms-client-request-id": [ "febf9e37-c7f5-479b-8f22-89f9d2f46a19" ], "CommandName": [ "Get-AzTimeSeriesInsightsEnvironment" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEnvironment_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -458,21 +458,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11945" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "84711f28-ea77-4c2a-b7a9-70ffdc93ad53" ], + "x-ms-request-id": [ "1b06febb-07ee-49d5-a5f9-29d936caf4e6" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "9e40533b-0b7b-4c56-8c2b-1937aa6c43fb" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122226Z:9e40533b-0b7b-4c56-8c2b-1937aa6c43fb" ], - "Date": [ "Thu, 02 Apr 2020 12:22:25 GMT" ] + "x-ms-correlation-request-id": [ "dd4b4557-d8bb-445d-8044-5598bea51cc6" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073915Z:dd4b4557-d8bb-445d-8044-5598bea51cc6" ], + "Date": [ "Wed, 08 Apr 2020 07:39:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "699" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountdhtqja\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:29:21 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e\",\"dataAccessFqdn\":\"e920ab30-1f3f-4dcf-8209-8b0f5974894e.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-env4f1j2q\",\"name\":\"tsi-env4f1j2q\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" + "Content": "{\"sku\":{\"name\":\"L1\",\"capacity\":1},\"kind\":\"LongTerm\",\"location\":\"EastUs2\",\"tags\":{},\"properties\":{\"storageConfiguration\":{\"accountName\":\"staaccountxvtbjq\"},\"timeSeriesIdProperties\":[{\"name\":\"cdc\",\"type\":\"string\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:30:54 GMT\",\"provisioningState\":\"Succeeded\",\"requestApiVersion\":\"2018-08-15-preview\",\"dataAccessId\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3\",\"dataAccessFqdn\":\"d129a8b6-772d-48a8-acdb-9ad529e7ffa3.env.timeseries.azure.com\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envui70dk\",\"name\":\"tsi-envui70dk\",\"type\":\"Microsoft.TimeSeriesInsights/Environments\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json index 030af9135d5c..8d02701ca893 100644 --- a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsEventSource.Recording.json @@ -1,12 +1,12 @@ { - "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview", "Content": "{\n \"tags\": {\n \"tag1\": \"001\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "68d356bd-1986-4039-8f38-21162ec841ef" ], + "x-ms-unique-id": [ "80" ], + "x-ms-client-request-id": [ "4f3afb35-2f79-4d54-af64-f0700148f44b" ], "CommandName": [ "Update-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsEventSource_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -23,31 +23,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1181" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "5933876b-b68c-4342-8cd2-254d21c845bf" ], + "x-ms-request-id": [ "ebdd2c8c-1dd0-4347-b30c-077610d5da70" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "1344656b-699f-4b57-992c-b27cf044737a" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122310Z:1344656b-699f-4b57-992c-b27cf044737a" ], - "Date": [ "Thu, 02 Apr 2020 12:23:09 GMT" ] + "x-ms-correlation-request-id": [ "96c40d6f-fea2-49bc-ac61-6c68528d2b60" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073918Z:96c40d6f-fea2-49bc-ac61-6c68528d2b60" ], + "Date": [ "Wed, 08 Apr 2020 07:39:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "792" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"001\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"001\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-d2rvmp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-0t3khp\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:30 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h\",\"name\":\"tsi-esrfyi9h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "372f9236-074a-49be-98f3-d029432b7095" ], + "x-ms-unique-id": [ "81" ], + "x-ms-client-request-id": [ "19dc189c-4198-49a7-b111-fa573b772e42" ], "CommandName": [ "Get-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsEventSource_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -62,31 +62,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11944" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4f928fd1-5d66-4cdc-9eba-7fe8527b961f" ], + "x-ms-request-id": [ "31a98095-8a9c-4386-b0ae-3716d3659725" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "6c082a9a-008e-489b-a2ef-6ae290627af7" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122310Z:6c082a9a-008e-489b-a2ef-6ae290627af7" ], - "Date": [ "Thu, 02 Apr 2020 12:23:10 GMT" ] + "x-ms-correlation-request-id": [ "f1176dd9-bd64-4ad7-a838-18e3d56f66d0" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073918Z:f1176dd9-bd64-4ad7-a838-18e3d56f66d0" ], + "Date": [ "Wed, 08 Apr 2020 07:39:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "792" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"001\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag1\":\"001\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-d2rvmp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-0t3khp\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:30 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h\",\"name\":\"tsi-esrfyi9h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } }, - "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsEventSource+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h?api-version=2018-08-15-preview", "Content": "{\n \"tags\": {\n \"tag2\": \"002\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "63377613-d34e-4cfa-bd3c-f33fa35dc5f5" ], + "x-ms-unique-id": [ "82" ], + "x-ms-client-request-id": [ "2202c98a-b1b8-46dd-8168-38076c3c295b" ], "CommandName": [ "Update-AzTimeSeriesInsightsEventSource" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsEventSource_UpdateViaIdentityExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -103,21 +103,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1180" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "62fe351b-b056-4f71-8d76-a722dc2c3e1e" ], + "x-ms-request-id": [ "9565c863-4f9e-4a83-a87d-d5770daf0e72" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "d7d3c8c0-7807-446b-b8d1-f9ec7549f3c0" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122314Z:d7d3c8c0-7807-446b-b8d1-f9ec7549f3c0" ], - "Date": [ "Thu, 02 Apr 2020 12:23:13 GMT" ] + "x-ms-correlation-request-id": [ "ab9033ff-6126-4de5-8a69-08d955944495" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073920Z:ab9033ff-6126-4de5-8a69-08d955944495" ], + "Date": [ "Wed, 08 Apr 2020 07:39:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "792" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"002\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.EventHub/namespaces/eventhubspace-lz6hyt/eventhubs/eventhubname-dfqhbo\",\"consumerGroupName\":\"tsi-test-796bte\",\"eventHubName\":\"eventhubname-dfqhbo\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-lz6hyt\",\"creationTime\":\"Thu, 02 Apr 2020 11:29:57 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/eventsources/tsi-esaf1456\",\"name\":\"tsi-esaf1456\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" + "Content": "{\"kind\":\"Microsoft.EventHub\",\"location\":\"eastus2\",\"tags\":{\"tag2\":\"002\"},\"properties\":{\"eventSourceResourceId\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp\",\"consumerGroupName\":\"tsi-test-i01k5l\",\"eventHubName\":\"eventhubname-d2rvmp\",\"keyName\":\"RootManageSharedAccessKey\",\"serviceBusNamespace\":\"eventhubspace-0t3khp\",\"creationTime\":\"Wed, 08 Apr 2020 07:31:30 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h\",\"name\":\"tsi-esrfyi9h\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/EventSources\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json index 5ae883673fcc..04d5cd50f3db 100644 --- a/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json +++ b/src/TimeSeriesInsights/test/Update-AzTimeSeriesInsightsReferenceDataSet.Recording.json @@ -1,12 +1,12 @@ { - "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+1": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": "{\n \"tags\": {\n \"rds01\": \"001\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "545ffa7c-9c78-4719-bf53-611367531725" ], + "x-ms-unique-id": [ "83" ], + "x-ms-client-request-id": [ "dd1d2637-6d4e-45c8-a293-c858cb284596" ], "CommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet_UpdateExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -23,31 +23,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1179" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "260e4432-a2cb-437f-b4fe-cd7a79524932" ], + "x-ms-request-id": [ "a8d8d4a5-68bc-401a-8c2f-5e4ec8181178" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "cae20cbc-475b-4467-8bb6-ca6d7278a40e" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122730Z:cae20cbc-475b-4467-8bb6-ca6d7278a40e" ], - "Date": [ "Thu, 02 Apr 2020 12:27:29 GMT" ] + "x-ms-correlation-request-id": [ "4b560830-fb70-49c8-a891-76225f33573b" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073923Z:4b560830-fb70-49c8-a891-76225f33573b" ], + "Date": [ "Wed, 08 Apr 2020 07:39:22 GMT" ] }, "ContentHeaders": { "Content-Length": [ "512" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "1ab465fb-ece4-45af-ad3d-75814d89a913" ], + "x-ms-unique-id": [ "84" ], + "x-ms-client-request-id": [ "a6a93536-e609-4ff6-b20a-a69392f4ea81" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -62,31 +62,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11943" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8d4097bd-fde1-474b-9ccb-dabbd239f2d4" ], + "x-ms-request-id": [ "6d290c53-4789-498f-b818-9c4d5cf42d6b" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "b1e37f30-34d3-4b8c-a4f9-1adaa5413e17" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122732Z:b1e37f30-34d3-4b8c-a4f9-1adaa5413e17" ], - "Date": [ "Thu, 02 Apr 2020 12:27:32 GMT" ] + "x-ms-correlation-request-id": [ "704540a2-1717-4988-85a5-56109bb8e0cd" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073923Z:704540a2-1717-4988-85a5-56109bb8e0cd" ], + "Date": [ "Wed, 08 Apr 2020 07:39:23 GMT" ] }, "ContentHeaders": { "Content-Length": [ "512" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+1": { + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "f89f15e8-aff1-4ed4-a5e5-baf98d77c7a7" ], + "x-ms-unique-id": [ "85" ], + "x-ms-client-request-id": [ "f12b5cc7-1226-43f4-b57c-e740fd8cf58e" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -101,31 +101,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11942" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "14054ec8-ad21-482b-959a-5a77f88ae84c" ], + "x-ms-request-id": [ "538d920a-3c08-477d-8683-ccb600c15b1f" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "e55941dd-18a8-407e-a860-32e07af9bbe4" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122734Z:e55941dd-18a8-407e-a860-32e07af9bbe4" ], - "Date": [ "Thu, 02 Apr 2020 12:27:34 GMT" ] + "x-ms-correlation-request-id": [ "76adcbce-fd92-49bf-981b-f48c70ce0039" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073924Z:76adcbce-fd92-49bf-981b-f48c70ce0039" ], + "Date": [ "Wed, 08 Apr 2020 07:39:23 GMT" ] }, "ContentHeaders": { "Content-Length": [ "512" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds01\":\"001\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+2": { + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$PATCH+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+2": { "Request": { "Method": "PATCH", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": "{\n \"tags\": {\n \"rds02\": \"002\"\n }\n}", "Headers": { - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "2a5fe8cc-0517-401d-a938-dca3332d5c28" ], + "x-ms-unique-id": [ "86" ], + "x-ms-client-request-id": [ "2e440118-ec3f-497d-9477-9973eb232de0" ], "CommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Update-AzTimeSeriesInsightsReferenceDataSet_UpdateViaIdentityExpanded" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -142,31 +142,31 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1178" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7a4fac3f-c417-4503-85ac-ff8c26819689" ], + "x-ms-request-id": [ "8700890e-14d8-4fb6-a8d2-455e6e9df312" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "bc3a13e1-f56a-4f65-a01f-e6715853a1f5" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122739Z:bc3a13e1-f56a-4f65-a01f-e6715853a1f5" ], - "Date": [ "Thu, 02 Apr 2020 12:27:38 GMT" ] + "x-ms-correlation-request-id": [ "46fa8818-3a0c-400c-96dc-bef77b18847a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073926Z:46fa8818-3a0c-400c-96dc-bef77b18847a" ], + "Date": [ "Wed, 08 Apr 2020 07:39:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "512" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds02\":\"002\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds02\":\"002\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } }, - "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview+3": { + "Update-AzTimeSeriesInsightsReferenceDataSet+[NoContext]+UpdateViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib?api-version=2018-08-15-preview", + "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij?api-version=2018-08-15-preview", "Content": null, "Headers": { - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "9494413a-3895-441d-bcdb-3343f7f945aa" ], + "x-ms-unique-id": [ "87" ], + "x-ms-client-request-id": [ "3c926ccd-937c-44ca-98f3-c1a97ccd8dda" ], "CommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet" ], "FullCommandName": [ "Get-AzTimeSeriesInsightsReferenceDataSet_Get" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -181,21 +181,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11941" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "63fa4489-0c54-4304-a6b9-69167f9af60d" ], + "x-ms-request-id": [ "eec96dcb-8b23-42db-8794-33e7c6a3b681" ], "Server": [ "Microsoft-HTTPAPI/2.0" ], - "x-ms-correlation-request-id": [ "26566447-558b-4e3d-8efd-07beccbdecb0" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200402T122742Z:26566447-558b-4e3d-8efd-07beccbdecb0" ], - "Date": [ "Thu, 02 Apr 2020 12:27:41 GMT" ] + "x-ms-correlation-request-id": [ "f6ab6d0c-407a-4446-b268-1764146768fb" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20200408T073926Z:f6ab6d0c-407a-4446-b268-1764146768fb" ], + "Date": [ "Wed, 08 Apr 2020 07:39:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "512" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds02\":\"002\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Thu, 02 Apr 2020 11:30:07 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-796bte/providers/Microsoft.TimeSeriesInsights/environments/tsi-envr0gwcm/referenceDataSets/tsirdsxyseib\",\"name\":\"tsirdsxyseib\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" + "Content": "{\"location\":\"eastus2\",\"tags\":{\"rds02\":\"002\"},\"properties\":{\"dataStringComparisonBehavior\":\"Ordinal\",\"keyProperties\":[{\"name\":\"device01\",\"type\":\"Double\"}],\"creationTime\":\"Wed, 08 Apr 2020 07:31:41 GMT\",\"provisioningState\":\"Succeeded\"},\"id\":\"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/referenceDataSets/tsirdsqwufij\",\"name\":\"tsirdsqwufij\",\"type\":\"Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets\"}" } } } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/env.json b/src/TimeSeriesInsights/test/env.json index 3da736928c23..5884d21d150a 100644 --- a/src/TimeSeriesInsights/test/env.json +++ b/src/TimeSeriesInsights/test/env.json @@ -1,42 +1,50 @@ { - "rstrenv01": "rstr-h5qvur", - "rstr32": "rstr-qn7esp", - "referenceDataSet": "tsirdsxyseib", - "rstr33": "rstr-1psi72", - "tsiEsName01": "tsi-esyb6s7p", - "tsiEnvName01": "tsi-env4f1j2q", - "referenceDataSet01": "tsirdsmuazdc", - "rstrenv06": "rstr-ot9dc7", - "rstrenv03": "rstr-8qzfme", - "rstrenv02": "rstr-bej4z3", + "staaccountName01": "staaccountmtudlr", + "tsiEnvName01": "tsi-envui70dk", + "iotHubName_key": "2TnzezePKCeYjruy24uA4h3YGpyXEiF8jDb+fv/Hd64=", + "rstr31": "rstr-b9adi0", + "rstres01": "rstr-ra0hqf", + "accessPolicy01": "tsi-apgxltea", + "rstrenv02": "rstr-cn1yql", + "rstres02": "rstr-l1j2ti", + "eventHubSpaceName01": "eventhubspace-p6qzi9", + "rstrds02": "rstr-dw4exm", + "rstr32": "rstr-sthco3", + "eventHubName": "eventhubname-d2rvmp", + "rstrenv05": "rstr-d2ih3p", + "rstr35": "rstr-btkj0w", + "rstr30": "rstr-j1c592", + "rstrap03": "rstr-1z0luh", + "rstres04": "rstr-drj0t6", + "tsiEnvName": "tsi-envv8u56x", + "eventHubName02_id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-wcukl2/eventhubs/eventhubname-x7lcry", + "resourceGroup": "tsi-test-i01k5l", + "rstr33": "rstr-otba5r", + "eventHubName02": "eventhubname-x7lcry", + "rstrap01": "rstr-hszj9q", + "tsiEsName01": "tsi-esjar3w6", + "tsiEsName": "tsi-esrfyi9h", + "rstrenv01": "rstr-8uxmh1", + "rstrenv03": "rstr-jra51c", + "rstrenv06": "rstr-uknac6", + "referenceDataSet01": "tsirdsdvgaot", + "staaccountName01_key": "M8HfaiUFYeKeVNrsDAJGz9SzYDNSmXG9jNETt/oLcxRrW5Bsz2tVPSYePMVh7qn22yyRSNu3/pMgy0QYnKQ92Q==", + "location": "eastus2", + "iotHubName_id": "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.Devices/IotHubs/iothubname-qnivtc", + "iotHubName": "iothubname-qnivtc", + "staaccountName": "staaccountxvtbjq", + "rstrap02": "rstr-xnycis", "subscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", - "tsiEsName": "tsi-esaf1456", - "eventHubName": "eventhubname-dfqhbo", - "tsiEnvName": "tsi-envr0gwcm", - "rstres03": "rstr-9rzn7d", - "rstres04": "rstr-dzy9fp", "tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "eventHubName01": "eventhubname-3u6nbg", - "staaccountName": "staaccountdhtqja", - "eventHubSpaceName": "eventhubspace-lz6hyt", - "rstres02": "rstr-0sgkox", - "accessPolicy01": "tsi-ap3s1280", - "rstrap02": "rstr-o7f32h", - "rstres01": "rstr-lfn5ue", - "rstrap03": "rstr-xg85be", - "eventHubSpaceName01": "eventhubspace-8p0aef", - "iotHubName": "iothubname-kr1ou4", - "rstrenv04": "rstr-cjqkrd", - "location": "eastus2", - "rstrds02": "rstr-ufr0em", - "rstr35": "rstr-s65iua", + "rstres03": "rstr-mklg1c", + "referenceDataSet": "tsirdsqwufij", + "eventHubSpaceName": "eventhubspace-0t3khp", "principalObjectId": "97deab6c-e478-40b4-b4da-e7d9353dc1e8", - "accessPolicy": "tsi-apr3q8wo", - "rstr34": "rstr-h4x3tq", - "rstrap01": "rstr-b10a92", - "rstrenv05": "rstr-m9t7ls", - "rstrds01": "rstr-wenyh8", - "rstr30": "rstr-5zf1th", - "rstr31": "rstr-dicgts", - "resourceGroup": "tsi-test-796bte" + "eventHubSpaceName02": "eventhubspace-wcukl2", + "rstr34": "rstr-o4nkye", + "rstrds01": "rstr-hbozta", + "accessPolicy": "tsi-apilgj5y", + "eventHubName01": "eventhubname-vwrm83", + "eventHubName02_key": "YGX/J9qfyTCcC5AQr8h8xlIo4i8XZ6bySgglrDUyTuk=", + "rstrenv04": "rstr-s13wly" } diff --git a/src/TimeSeriesInsights/test/helper.ps1 b/src/TimeSeriesInsights/test/helper.ps1 index a7f5d20a84a4..0fb695d7f98b 100644 --- a/src/TimeSeriesInsights/test/helper.ps1 +++ b/src/TimeSeriesInsights/test/helper.ps1 @@ -29,12 +29,12 @@ function RandomLetters([int32]$len,[bool]$lowerCase) { function CreateStaAccount([string]$resourceGroup, [string]$staAccountName,[string]$location, [string]$skuName) { - Write-Host -ForegroundColor Green 'Start creating storage account for test...' - New-AzStorageAccount -ResourceGroupName $resourceGroup -AccountName $staAccountName -Location $location -SkuName $skuName - Write-Host -ForegroundColor Green 'Created storage accountsuccessfully.' - $staAccountKeys = Get-AzStorageAccountKey -ResourceGroupName $resourceGroup -Name $staAccountName - $staAccountKey = $staAccountKeys[0].Value - return $staccountParam = @{accountName=$staAccountName; accountKey=$staAccountKey} + Write-Host -ForegroundColor Green 'Start creating storage account for test...' + New-AzStorageAccount -ResourceGroupName $resourceGroup -AccountName $staAccountName -Location $location -SkuName $skuName + Write-Host -ForegroundColor Green 'Created storage account successfully.' + $staAccountKeys = Get-AzStorageAccountKey -ResourceGroupName $resourceGroup -Name $staAccountName + $staAccountKey = $staAccountKeys[0].Value + return $staccountParam = @{accountName=$staAccountName; accountKey=$staAccountKey} } function GetOrCreateTsiEnv([bool]$forceCreate, [string]$resourceGroup, $tsiEnvParamObj, $staccountParamObj) @@ -90,22 +90,45 @@ function GetOrCreateTsiEnv([bool]$forceCreate, [string]$resourceGroup, $tsiEnvPa function CreateEventHub ([string]$eventHubSpaceName,[string]$eventHubName,[string]$resourceGroup, [string]$location) { - Write-Host -ForegroundColor Green 'Start creating EventHub for test...' - $eventHubSpace = New-AzEventHubNamespace -Name $eventHubSpaceName -ResourceGroupName $resourceGroup -Location $location - $eventHub = New-AzEventHub -ResourceGroupName $resourceGroup -NamespaceName $eventHubSpace.Name -Name $eventHubName - Write-Host -ForegroundColor Green 'Created EventHub successfully.' - $eventHubKeys = Get-AzEventHubKey -ResourceGroupName $resourceGroup -NamespaceName $eventHubSpace.Name -AuthorizationRuleName RootManageSharedAccessKey - $eventHubKey = $eventHubKeys.PrimaryKey - $eventhubParam = @{eventHubSpace=$eventHubSpaceName;eventhub=$eventHub;eventHubKey=$eventHubKey} - return $eventhubParam + Write-Host -ForegroundColor Green 'Start creating EventHub for test...' + $eventHubSpace = New-AzEventHubNamespace -Name $eventHubSpaceName -ResourceGroupName $resourceGroup -Location $location + $eventHub = New-AzEventHub -ResourceGroupName $resourceGroup -NamespaceName $eventHubSpace.Name -Name $eventHubName + Write-Host -ForegroundColor Green 'Created EventHub successfully.' + $eventHubKeys = Get-AzEventHubKey -ResourceGroupName $resourceGroup -NamespaceName $eventHubSpace.Name -AuthorizationRuleName RootManageSharedAccessKey + $eventHubKey = $eventHubKeys.PrimaryKey + $eventhubParam = @{eventHubSpace=$eventHubSpaceName;eventhub=$eventHub;eventHubKey=$eventHubKey} + return $eventhubParam +} + +function CreateIotHub($iotHubParamObj,[string]$resourceGroup, [string]$location) +{ + if(!$iotHubParamObj.iotHubName) + { + $iotHubParamObj.iotHubName = 'rstr-' + (RandomString -allChars $false -len 6) + } + if(!$iotHubParamObj.iotHubSkuName) + { + $iotHubParamObj.iotHubSkuName = 'S1' + } + if(!$iotHubParamObj.iotUnits) + { + $iotHubParamObj.iotUnits = 100 + } + Write-Host -ForegroundColor Green 'Start creating IotHub for test...' + $iotHub = New-AzIotHub -ResourceGroupName $resourceGroup -Location $location -Name $iotHubParamObj.iotHubName -SkuName $iotHubParamObj.iotHubSkuName -Units $iotHubParamObj.iotUnits + $iotHubKeys = Get-AzIotHubKey -ResourceGroupName $resourceGroup -Name $iotHubParamObj.iotHubName + $iotHubKey = $iotHubKeys[0].PrimaryKey + Write-Host -ForegroundColor Green 'Created IotHub successfully.' + $iothubParam = @{iotHubName=$iotHubParamObj.iotHubName;iotHub=$iotHub;iotHubKey=$iotHubKey} + return $iothubParam } function CreateTsiEventSource([string]$tsiEevntSourceName,[string]$resourceGroup,$tsiEnv,$eventhubParam) { - # eventhub need modify. - $eventHubKey = $eventhubParam.eventHubKey | ConvertTo-SecureString -AsPlainText -Force - Write-Host -ForegroundColor Green 'Start creating TimeSeriesInsightsEventSource for test...' - $tsiEventSource = New-AzTimeSeriesInsightsEventSource -ResourceGroupName $resourceGroup -Name $tsiEevntSourceName -EnvironmentName $tsiEnv.Name.ToString() -Kind Microsoft.EventHub -ConsumerGroupName $resourceGroup -Location $tsiEnv.Location -KeyName RootManageSharedAccessKey -ServiceBusNameSpace $eventhubParam.eventHubSpace -EventHubName $eventhubParam.eventHub.Name -EventSourceResourceId $eventhubParam.eventHub.id -SharedAccessKey $eventHubKey - Write-Host -ForegroundColor Green 'Created TimeSeriesInsightsEventSource successfully.' - return $tsiEventSource + # eventhub need modify. + $eventHubKey = $eventhubParam.eventHubKey | ConvertTo-SecureString -AsPlainText -Force + Write-Host -ForegroundColor Green 'Start creating TimeSeriesInsightsEventSource for test...' + $tsiEventSource = New-AzTimeSeriesInsightsEventSource -ResourceGroupName $resourceGroup -Name $tsiEevntSourceName -EnvironmentName $tsiEnv.Name.ToString() -Kind Microsoft.EventHub -ConsumerGroupName $resourceGroup -Location $tsiEnv.Location -KeyName RootManageSharedAccessKey -ServiceBusNameSpace $eventhubParam.eventHubSpace -EventHubName $eventhubParam.eventHub.Name -EventSourceResourceId $eventhubParam.eventHub.id -SharedAccessKey $eventHubKey + Write-Host -ForegroundColor Green 'Created TimeSeriesInsightsEventSource successfully.' + return $tsiEventSource } \ No newline at end of file diff --git a/src/TimeSeriesInsights/test/utils.ps1 b/src/TimeSeriesInsights/test/utils.ps1 index 83ebec29372b..b74e03039864 100644 --- a/src/TimeSeriesInsights/test/utils.ps1 +++ b/src/TimeSeriesInsights/test/utils.ps1 @@ -15,31 +15,43 @@ function setupEnv() { $env.Add('principalObjectId','97deab6c-e478-40b4-b4da-e7d9353dc1e8') # For any resources you created for test, you should add it to $env here. $rstr01 = 'staaccount' + (RandomLetters -len 6 -lowerCase $true) + $rstr011 = 'staaccount' + (RandomLetters -len 6 -lowerCase $true) + $env.Add('staaccountName', $rstr01) + $env.Add('staaccountName01', $rstr011) + $rstr02 = 'eventhubspace-' + (RandomString -allChars $false -len 6) $rstr021 = 'eventhubspace-' + (RandomString -allChars $false -len 6) + $rstr022 = 'eventhubspace-' + (RandomString -allChars $false -len 6) $rstr03 = 'eventhubname-' + (RandomString -allChars $false -len 6) $rstr031 = 'eventhubname-' + (RandomString -allChars $false -len 6) - $rstr04 = 'iothubname-' + (RandomString -allChars $false -len 6) - $rstr05 = 'tsi-env' + (RandomString -allChars $false -len 6) - $rstr051 = 'tsi-env' + (RandomString -allChars $false -len 6) - $rstr06 = 'tsi-es' + (RandomString -allChars $false -len 6) - $rstr061 = 'tsi-es' + (RandomString -allChars $false -len 6) - $rstr07 = 'tsi-ap' + (RandomString -allChars $false -len 6) - $rstr071 = 'tsi-ap' + (RandomString -allChars $false -len 6) - $rstr08 = 'tsirds' + (RandomLetters -len 6 -lowerCase $true) - $rstr081 = 'tsirds' + (RandomLetters -len 6 -lowerCase $true) - $env.Add('staaccountName', $rstr01) + $rstr032 = 'eventhubname-' + (RandomString -allChars $false -len 6) $env.Add('eventHubSpaceName', $rstr02) $env.Add('eventHubSpaceName01', $rstr021) + $env.Add('eventHubSpaceName02', $rstr022) $env.Add('eventHubName', $rstr03) $env.Add('eventHubName01', $rstr031) + $env.Add('eventHubName02', $rstr032) + + $rstr04 = 'iothubname-' + (RandomString -allChars $false -len 6) $env.Add('iotHubName', $rstr04) + + $rstr05 = 'tsi-env' + (RandomString -allChars $false -len 6) + $rstr051 = 'tsi-env' + (RandomString -allChars $false -len 6) $env.Add('tsiEnvName', $rstr05) $env.Add('tsiEnvName01', $rstr051) + + $rstr06 = 'tsi-es' + (RandomString -allChars $false -len 6) + $rstr061 = 'tsi-es' + (RandomString -allChars $false -len 6) $env.Add('tsiEsName', $rstr06) $env.Add('tsiEsName01', $rstr061) + + $rstr07 = 'tsi-ap' + (RandomString -allChars $false -len 6) + $rstr071 = 'tsi-ap' + (RandomString -allChars $false -len 6) $env.Add('accessPolicy', $rstr07) $env.Add('accessPolicy01', $rstr071) + + $rstr08 = 'tsirds' + (RandomLetters -len 6 -lowerCase $true) + $rstr081 = 'tsirds' + (RandomLetters -len 6 -lowerCase $true) $env.Add('referenceDataSet', $rstr08) $env.Add('referenceDataSet01', $rstr081) @@ -100,15 +112,27 @@ function setupEnv() { $env.Add('resourceGroup', $resourceGroup) $env.Add('location', $Location) Write-Host -ForegroundColor Green 'Resource group created successfully.' - + Write-Host -ForegroundColor Green '--------------------------------------------' Write-Host -ForegroundColor Green 'Start deploying resources for testing.' # create storage account for test. $staAccountParam = (CreateStaAccount -staAccountName $env.staaccountName -resourceGroup $env.resourceGroup -location $env.location -Sku Standard_GRS) + $staAccountParam01 = (CreateStaAccount -staAccountName $env.staaccountName01 -resourceGroup $env.resourceGroup -location $env.location -Sku Standard_GRS) + $env.Add('staaccountName01_key', $staAccountParam01.accountKey) # create eventhub for test. $eventHubParam = (CreateEventHub -eventHubSpaceName $env.eventHubSpaceName -eventHubName $env.eventHubName -resourceGroup $env.resourceGroup -location $env.location) $eventHubParam01 = (CreateEventHub -eventHubSpaceName $env.eventHubSpaceName01 -eventHubName $env.eventHubName01 -resourceGroup $env.resourceGroup -location $env.location) + $eventHubParam02 = (CreateEventHub -eventHubSpaceName $env.eventHubSpaceName02 -eventHubName $env.eventHubName02 -resourceGroup $env.resourceGroup -location $env.location) + $env.Add('eventHubName02_id', $eventHubParam02.eventhub.id) + $env.Add('eventHubName02_key', $eventHubParam02.eventHubKey) + + # create iothub for test. + $iotHubParam = @{iotHubName=$env.iotHubName} + $iothub = (CreateIotHub -iotHubParamObj $iotHubParam -resourceGroup $env.resourceGroup -location $env.location) + $env.Add('iotHubName_id', $iothub.iotHub.id) + $env.Add('iotHubName_key', $iothub.iotHubKey) + # create TimeSeriesInsightsEnvironment for test. $tsiEnvParamObj = @{TsiEnvName = $env.tsiEnvName;Kind='Standard'; SkuName='S1'; Location=$env.location} From 59710308d46a080475f0802829c971af55cff248 Mon Sep 17 00:00:00 2001 From: LucasYao93 <53558334+LucasYao93@users.noreply.github.com> Date: Thu, 9 Apr 2020 23:04:38 +0800 Subject: [PATCH 7/7] Modified test cases and examples for timeseriesinsights. (#2) * modified and deleted file. * Modified readme.md and Rebuild docs. * Rebuild docs folder. --- .../docs/Az.TimeSeriesInsights.md | 2 +- .../Get-AzTimeSeriesInsightsAccessPolicy.md | 14 +- .../Get-AzTimeSeriesInsightsEnvironment.md | 29 +++ .../Get-AzTimeSeriesInsightsEventSource.md | 25 ++- ...et-AzTimeSeriesInsightsReferenceDataSet.md | 14 +- ...Remove-AzTimeSeriesInsightsAccessPolicy.md | 11 +- .../Remove-AzTimeSeriesInsightsEnvironment.md | 11 +- .../Remove-AzTimeSeriesInsightsEventSource.md | 11 +- ...ve-AzTimeSeriesInsightsReferenceDataSet.md | 11 +- ...Update-AzTimeSeriesInsightsAccessPolicy.md | 14 +- .../Update-AzTimeSeriesInsightsEnvironment.md | 29 ++- .../Update-AzTimeSeriesInsightsEventSource.md | 22 ++- ...te-AzTimeSeriesInsightsReferenceDataSet.md | 14 +- src/TimeSeriesInsights/docs/readme.md | 11 -- .../Get-AzTimeSeriesInsightsEnvironment.md | 2 +- src/TimeSeriesInsights/readme.md | 3 - .../Az.TimeSeriesInsights-TestResults.xml | 173 ------------------ 17 files changed, 192 insertions(+), 204 deletions(-) delete mode 100644 src/TimeSeriesInsights/docs/readme.md delete mode 100644 src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml diff --git a/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md b/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md index 39a4ad65476b..34438cff1e97 100644 --- a/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md +++ b/src/TimeSeriesInsights/docs/Az.TimeSeriesInsights.md @@ -1,6 +1,6 @@ --- Module Name: Az.TimeSeriesInsights -Module Guid: 19712dc5-d904-4d19-bf3a-7a01dd02cc5d +Module Guid: 02d7130c-f4fa-4432-b57e-c66af9708f66 Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights Help Version: 1.0.0.0 Locale: en-US diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md index b2c9b658e028..1fca48eeea87 100644 --- a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsAccessPolicy.md @@ -47,7 +47,7 @@ policy002 Microsoft.TimeSeriesInsights/Environments/AccessPolicies This command lists all access policies under a specified environment. -### Example 2: Get a specified access policy +### Example 2: Get a specified access policy by name ```powershell PS C:\> Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name policy001 @@ -58,6 +58,18 @@ policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies This command gets a specified access policy. +### Example 3: Get a specified access policy by object +```powershell +PS C:\>$ap = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsi-envv8u56x -ResourceGroupName tsi-test-i01k5l -Name tsi-apilgj5y +PS C:\>Get-AzTimeSeriesInsightsAccessPolicy -InputObject $ap + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command gets a specified access policy. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md index bd07927232ed..7c9a28c1dcf5 100644 --- a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEnvironment.md @@ -121,6 +121,35 @@ Type : Microsoft.TimeSeriesInsights/Environments This command lists all time series insights environments in a resource group. +### Example 3: Get a time series insights environment by object +```powershell +PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x +PS C:\> Get-AzTimeSeriesInsightsEnvironment -InputObject $env + +DataAccessFqdn : d76a61f2-8a30-41a5-9587-f241eb9b48d9.env.timeseries.azure.com +DataAccessId : d76a61f2-8a30-41a5-9587-f241eb9b48d9 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x +IngressState : +Kind : Standard +Location : eastus2 +Name : tsi-envv8u56x +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 1 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments +``` + +This command gets a time series insights environments. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md index 28e69f50d162..29c20eaf5a5d 100644 --- a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsEventSource.md @@ -70,9 +70,9 @@ Type : Microsoft.TimeSeriesInsights/Environments/EventSources This command lists all event sources under the specified environments. -### Example 2: Get a specified event source +### Example 2: Get a specified event source by name ```powershell -PS C:\> et-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 +PS C:\> Get-AzTimeSeriesInsightsEventSource -ResourceGroupName testgroup -EnvironmentName tsitest001 -Name iots001 ConsumerGroupName : testgroup2 EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 @@ -90,6 +90,27 @@ Type : Microsoft.TimeSeriesInsights/Environments/EventSources This command gets a specific event source. +### Example 3: Get a specified event source by object +```powershell +PS C:\> $es = Get-AzTimeSeriesInsightsEventSource -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsi-esrfyi9h +PS C:\> Get-AzTimeSeriesInsightsEventSource -InputObject $es + +ConsumerGroupName : tsi-test-i01k5l +EventHubName : eventhubname-d2rvmp +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.EventHub/namespaces/eventhubspace-0t3khp/eventhubs/eventhubname-d2rvmp +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/tsi-test-i01k5l/providers/Microsoft.TimeSeriesInsights/environments/tsi-envv8u56x/eventsources/tsi-esrfyi9h +KeyName : RootManageSharedAccessKey +Kind : Microsoft.EventHub +Location : eastus2 +Name : tsi-esrfyi9h +ServiceBusNamespace : eventhubspace-0t3khp +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command gets a specific event source. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md index 71e32b3820d5..69801f9b127c 100644 --- a/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md +++ b/src/TimeSeriesInsights/docs/Get-AzTimeSeriesInsightsReferenceDataSet.md @@ -47,7 +47,7 @@ eastus dstest002 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets This command lists all reference data sets under the specified environment. -### Get a specified reference data set +### Example 2: Get a specified reference data set by name ```powershell PS C:\> Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 @@ -58,6 +58,18 @@ eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets This command gets a specified reference data set. +### Example 3: Get a specified reference data set by object +```powershell +PS C:\> $ds = Get-AzTimeSeriesInsightsReferenceDataSet -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x -Name tsirdsqwufij +PS C:\>Get-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds + +Location Name Type +-------- ---- ---- +eastus2 tsirdsqwufij Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command gets a specified reference data set. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md index 627b4f5b080c..4dd267b1e719 100644 --- a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsAccessPolicy.md @@ -29,7 +29,7 @@ Deletes the access policy with the specified name in the specified subscription, ## EXAMPLES -### Example 1: Remove a specified access policy +### Example 1: Remove a specified access policy by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup @@ -37,6 +37,15 @@ PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Nam This command removes a specified access policy. +### Example 2: Remove a specified access policy by object +```powershell +PS C:\> $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup +PS C:\> Remove-AzTimeSeriesInsightsAccessPolicy -InputObject $policy + +``` + +This command removes a specified access policy. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md index 5dd00eca1b5c..606ab8675bad 100644 --- a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEnvironment.md @@ -29,7 +29,7 @@ Deletes the environment with the specified name in the specified subscription an ## EXAMPLES -### Example 1: Remove a time series insights environment +### Example 1: Remove a time series insights environment by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill @@ -37,6 +37,15 @@ PS C:\> Remove-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Nam This command removes a time series insights environment. +### Example 2: Remove a time series insights environment by object +```powershell +PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsill +PS C:\> Remove-AzTimeSeriesInsightsEnvironment -InputObject $env + +``` + +This command removes a time series insights environment. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md index 8c4b37446b5f..fd8d562d1889 100644 --- a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsEventSource.md @@ -29,7 +29,7 @@ Deletes the event source with the specified name in the specified subscription, ## EXAMPLES -### Example 1: Remove a specified event source +### Example 1: Remove a specified event source by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup @@ -37,6 +37,15 @@ PS C:\> Remove-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name This removes a specific event source. +### Example 2: Remove a specified event source by object +```powershell +PS C:\> $es = Get-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name iots001 +PS C:\> Remove-AzTimeSeriesInsightsEventSource -InputObject $es + +``` + +This removes a specific event source. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md index c7c8deae209c..b774b17dcb4a 100644 --- a/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md +++ b/src/TimeSeriesInsights/docs/Remove-AzTimeSeriesInsightsReferenceDataSet.md @@ -30,7 +30,7 @@ Deletes the reference data set with the specified name in the specified subscrip ## EXAMPLES -### Example 1: Remove a specified reference data set +### Example 1: Remove a specified reference data set by name ```powershell PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup @@ -38,6 +38,15 @@ PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 This command removes a specified reference data set. +### Example 2: Remove a specified reference data set by object +```powershell +PS C:\> $ds = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup +PS C:\> Remove-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds + +``` + +This command removes a specified reference data set. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md index 2bdfda120a6c..2d20d53a4dd5 100644 --- a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsAccessPolicy.md @@ -30,7 +30,7 @@ Updates the access policy with the specified name in the specified subscription, ## EXAMPLES -### Example 1: Update a specified access policy +### Example 1: Update a specified access policy by name ```powershell PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -Name policy001 -ResourceGroupName testgroup -Role Contributor,Reader @@ -41,6 +41,18 @@ policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies This command updates a specified access policy. +### Example 2: Update a specified access policy by object +```powershell +PS C:\> $policy = Get-AzTimeSeriesInsightsAccessPolicy -EnvironmentName tsitest001 -ResourceGroupName $env.resourceGroup -Name policy001 +PS C:\> Update-AzTimeSeriesInsightsAccessPolicy -InputObject $policy -Role Contributor + +Name Type +---- ---- +policy001 Microsoft.TimeSeriesInsights/Environments/AccessPolicies +``` + +This command updates a specified access policy. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md index b6141ca0943b..63ef1475949c 100644 --- a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEnvironment.md @@ -62,14 +62,35 @@ Type : Microsoft.TimeSeriesInsights/Environments This command updates a standard time series insights environment. -### Example 2: {{ Api definition for update a longterm environment is missing in swagger and should be added in the future}} +### Example 2: Update a standard time series insights environment ```powershell -PS C:\> {{ Add code here }} +PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName testgroup -Name tsitest001 +PS C:\> PS C:\> Update-AzTimeSeriesInsightsEnvironment -InputObject $env -Capacity 6 -Sku S1 -{{ Add output here }} +DataAccessFqdn : b6d113a4-0865-405f-b09e-ad4355b5d046.env.timeseries.azure.com +DataAccessId : b6d113a4-0865-405f-b09e-ad4355b5d046 +DataRetentionTime : 1.01:25:00 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest + 001 +IngressState : +Kind : Standard +Location : eastus +Name : tsitest001 +PartitionKeyProperty : +PropertyUsageState : +Sku : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.Sku +SkuCapacity : 6 +SkuName : S1 +StateDetailCode : +StateDetailCurrentCount : +StateDetailMaxCount : +StateDetailMessage : +StorageLimitExceededBehavior : PurgeOldData +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +Type : Microsoft.TimeSeriesInsights/Environments ``` -{{ Add description here }} +This command updates a standard time series insights environment. ## PARAMETERS diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md index fe5013c066ea..a73e116fe2dd 100644 --- a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsEventSource.md @@ -30,7 +30,7 @@ Updates the event source with the specified name in the specified subscription, ## EXAMPLES -### Example 1: Update a specified event source +### Example 1: Update a specified event source by name ```powershell PS C:\> Update-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -Name iots001 -ResourceGroupName testgroup -Tag @{"tgk"="001"} @@ -49,6 +49,26 @@ Type : Microsoft.TimeSeriesInsights/Environments/EventSources This command updates a specific event source. +### Example 3: Update a specified event source by object +```powershell +PS C:\>$es = Get-AzTimeSeriesInsightsEventSource -EnvironmentName tsitest001 -ResourceGroupName testgroup -Name iots001 +PS C:\> Update-AzTimeSeriesInsightsEventSource -InputObject -Tag @{"tgb"="002"} + +ConsumerGroupName : testgroup2 +EventSourceResourceId : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup2/providers/Microsoft.Devices/IotHubs/iotname001 +Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/testgroup/providers/Microsoft.TimeSeriesInsights/environments/tsitest001/eventsources/iots001 +IotHubName : iotname001 +KeyName : RootManageSharedAccessKey +Kind : Microsoft.IoTHub +Location : eastus +Name : iots001 +Tag : Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.TrackedResourceTags +TimestampPropertyName : +Type : Microsoft.TimeSeriesInsights/Environments/EventSources +``` + +This command updates a specific event source. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md index 692a916fcbf5..d31f8bc3a0ba 100644 --- a/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md +++ b/src/TimeSeriesInsights/docs/Update-AzTimeSeriesInsightsReferenceDataSet.md @@ -30,7 +30,7 @@ Updates the reference data set with the specified name in the specified subscrip ## EXAMPLES -### Example 1: Update a specified reference data set +### Example 1: Update a specified reference data set by name ```powershell PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -Name dstest001 -ResourceGroupName testgroup -Tag @{"tstg"="lb001"} @@ -41,6 +41,18 @@ eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets This command updates a specified reference data set. +### Example 2: Update a specified reference data set by object +```powershell +PS C:\> $ds = Get-AzTimeSeriesInsightsReferenceDataSet -EnvironmentName tsitest001 -ResourceGroupName testgroup -ReferenceDataSetName dstest001 +PS C:\> Update-AzTimeSeriesInsightsReferenceDataSet -InputObject $ds -Tag @{"tstg"="lb001"} + +Location Name Type +-------- ---- ---- +eastus dstest001 Microsoft.TimeSeriesInsights/Environments/ReferenceDataSets +``` + +This command updates a specified reference data set. + ## PARAMETERS ### -DefaultProfile diff --git a/src/TimeSeriesInsights/docs/readme.md b/src/TimeSeriesInsights/docs/readme.md deleted file mode 100644 index 8f5f212dd65a..000000000000 --- a/src/TimeSeriesInsights/docs/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# Docs -This directory contains the documentation of the cmdlets for the `Az.TimeSeriesInsights` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overriden on regeneration*. To update documentation examples, please use the `..\examples` folder. - -## Info -- Modifiable: no -- Generated: all -- Committed: yes -- Packaged: yes - -## Details -The process of documentation generation loads `Az.TimeSeriesInsights` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md index b2f1a722375c..fbe15c40b7b0 100644 --- a/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md +++ b/src/TimeSeriesInsights/examples/Get-AzTimeSeriesInsightsEnvironment.md @@ -78,7 +78,7 @@ Type : Microsoft.TimeSeriesInsights/Environments This command lists all time series insights environments in a resource group. -### Example 3: Get a time series insights environments by object +### Example 3: Get a time series insights environment by object ```powershell PS C:\> $env = Get-AzTimeSeriesInsightsEnvironment -ResourceGroupName tsi-test-i01k5l -EnvironmentName tsi-envv8u56x PS C:\> Get-AzTimeSeriesInsightsEnvironment -InputObject $env diff --git a/src/TimeSeriesInsights/readme.md b/src/TimeSeriesInsights/readme.md index 2ec5e3ec6e24..bb18d5bfb834 100644 --- a/src/TimeSeriesInsights/readme.md +++ b/src/TimeSeriesInsights/readme.md @@ -61,15 +61,12 @@ directive: - from: swagger-document where: $ transform: return $.replace(/Microsoft.IotHub/g, "Microsoft.IoTHub") -<<<<<<< HEAD -======= - from: swagger-document where: $ transform: return $.replace(/\/eventSources\//g, "/eventsources/") - from: swagger-document where: $ transform: return $.replace(/\/accessPolicies\//g, "/accesspolicies/") ->>>>>>> upstream/generation # Remove the unneeded parameter set - where: variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ diff --git a/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml b/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml deleted file mode 100644 index f89de130ad8b..000000000000 --- a/src/TimeSeriesInsights/test/Az.TimeSeriesInsights-TestResults.xml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file