Merge
This commit is contained in:
Коммит
b954569025
|
@ -5,7 +5,7 @@ variables:
|
|||
LinuxImage: ubuntu-18.04
|
||||
MacOSName: macOS
|
||||
MacOSImage: macOS-10.13
|
||||
TestFramework: netcoreapp2.1
|
||||
TestFramework: netcoreapp2.2
|
||||
TestTarget: Test
|
||||
Configuration: Debug
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
variables:
|
||||
WindowsName: windows
|
||||
WindowsImage: VS2017-Win2016
|
||||
TestFramework: net472
|
||||
TestTarget: TestNet472
|
||||
TestFramework: netcoreapp2.2
|
||||
TestTarget: Test
|
||||
Configuration: Debug
|
||||
|
||||
jobs:
|
||||
|
|
82
ChangeLog.md
82
ChangeLog.md
|
@ -1,3 +1,85 @@
|
|||
## 3.1.0 - November 2019
|
||||
### Highlights since the last major release
|
||||
* Az.DataBoxEdge 1.0.0 released
|
||||
* Az.SqlVirtualMachine 1.0.0 released
|
||||
|
||||
#### Az.Compute
|
||||
* VM Reapply feature
|
||||
- Add Reapply parameter to Set-AzVM cmdlet
|
||||
* VM Scale Set AutomaticRepairs feature:
|
||||
- Add EnableAutomaticRepair, AutomaticRepairGracePeriod, and AutomaticRepairMaxInstanceRepairsPercent parameters to the following cmdlets:
|
||||
New-AzVmssConfig
|
||||
Update-AzVmss
|
||||
* Cross tenant gallery image support for New-AzVM
|
||||
* Add 'Spot' to the argument completer of Priority parameter in New-AzVM, New-AzVMConfig and New-AzVmss cmdlets
|
||||
* Add DiskIOPSReadWrite and DiskMBpsReadWrite parameters to Add-AzVmssDataDisk cmdlet
|
||||
* Change SourceImageId parameter of New-AzGalleryImageVersion cmdlet to optional
|
||||
* Add OSDiskImage and DataDiskImage parameters to New-AzGalleryImageVersion cmdlet
|
||||
* Add HyperVGeneration parameter to New-AzGalleryImageDefinition cmdlet
|
||||
* Add SkipExtensionsOnOverprovisionedVMs parameters to New-AzVmss, New-AzVmssConfig and Update-AzVmss cmdlets
|
||||
|
||||
#### Az.DataBoxEdge
|
||||
* Added cmdlet `Get-AzDataBoxEdgeOrder`
|
||||
- Get the Order
|
||||
* Added cmdlet `New-AzDataBoxEdgeOrder`
|
||||
- Create new Order
|
||||
* Added cmdlet `Remove-AzDataBoxEdgeOrder`
|
||||
- Remove the Order
|
||||
* Change in cmdlet `New-AzDataBoxEdgeShare`
|
||||
- Now creates Local Share
|
||||
* Added cmdlet `Set-AzDataBoxEdgeRole`
|
||||
- Now IotRole can be mapped to Share
|
||||
* Added cmdlet `Invoke-AzDataBoxEdgeDevice`
|
||||
- Invoke scan update, download update, install updates on the device
|
||||
* Added cmdlet `Get-AzDataBoxEdgeTrigger`
|
||||
- Gets the information about Triggers
|
||||
* Added cmdlet `New-AzDataBoxEdgeTrigger`
|
||||
- Create new Triggers
|
||||
* Added cmdlet `Remove-AzDataBoxEdgeTrigger`
|
||||
- Remove the Triggers
|
||||
|
||||
#### Az.DataFactory
|
||||
* Update ADF .Net SDK version to 4.4.0
|
||||
* Add parameter 'ExpressCustomSetup' for 'Set-AzureRmDataFactoryV2IntegrationRuntime' cmd to enable setup configurations and 3rd party components without custom setup script.
|
||||
|
||||
#### Az.DataLakeStore
|
||||
* Update documentation of Get-AzDataLakeStoreDeletedItem and Restore-AzDataLakeStoreDeletedItem
|
||||
|
||||
#### Az.EventHub
|
||||
* Fix for issue 10301 : Fix the SAS Token date format
|
||||
|
||||
#### Az.FrontDoor
|
||||
* Add MinimumTlsVersion parameter to Enable-AzFrontDoorCustomDomainHttps and New-AzFrontDoorFrontendEndpointObject
|
||||
* Add HealthProbeMethod and EnabledState parameters to New-AzFrontDoorHealthProbeSettingObject
|
||||
* Add new cmdlet to create BackendPoolsSettings objec to pass into creation/update of Front Door
|
||||
- New-AzFrontDoorBackendPoolsSettingObject
|
||||
|
||||
#### Az.Network
|
||||
* Change 'Start-AzVirtualNetworkGatewayConnectionPacketCapture.md' and 'Start-AzVirtualnetworkGatewayPacketCapture.md' FilterData option examples.
|
||||
|
||||
#### Az.PrivateDns
|
||||
* Updated PrivateDns .net sdk to version 1.0.0
|
||||
|
||||
#### Az.RecoveryServices
|
||||
* Azure Site Recovery support to select disk type at enabling protection.
|
||||
* Azure Site Recovery bug fix for recovery plan action edit.
|
||||
* Azure Backup SQL Restore support to accept filestream DBs.
|
||||
|
||||
#### Az.RedisCache
|
||||
* Added 'MinimumTlsVersion' parameter in 'New-AzRedisCache' and 'Set-AzRedisCache' cmdlets. Also, added 'MinimumTlsVersion' in the output of 'Get-AzRedisCache' cmdlet.
|
||||
* Added validation on '-Size' parameter for 'Set-AzRedisCache' and 'New-AzRedisCache' cmdlets
|
||||
|
||||
#### Az.Resources
|
||||
- Updated policy cmdlets to use new api version 2019-06-01 that has new EnforcementMode property in policy assignment.
|
||||
- Updated create policy definition help example
|
||||
- Fix bug Remove-AZADServicePrincipal -ServicePrincipalName, throw null reference when service principal name not found.
|
||||
- Fix bug New-AZADServicePrincipal, throw null reference when tenant doesn't have any subscription.
|
||||
- Change New-AzAdServicePrincipal to add credentials only to associated application.
|
||||
|
||||
#### Az.Sql
|
||||
* Added support for database ReadReplicaCount.
|
||||
* Fixed Set-AzSqlDatabase when zone redundancy not set
|
||||
|
||||
## 3.0.0 - November 2019
|
||||
### General
|
||||
* Az.PrivateDns 1.0.0 released
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<!-- General -->
|
||||
<Configuration Condition="'$(Configuration)' != 'Release'">Debug</Configuration>
|
||||
<Scope Condition="$(Scope) == ''">All</Scope>
|
||||
<TestFramework Condition="'$(TestFramework)' == ''">netcoreapp2.1</TestFramework>
|
||||
<TestFramework Condition="'$(TestFramework)' == ''">netcoreapp2.2</TestFramework>
|
||||
|
||||
<!-- Flags -->
|
||||
<CodeSign Condition ="'$(CodeSign)' == ''">false</CodeSign>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<PropertyGroup>
|
||||
<RootNamespace>$(LegacyAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</RootNamespace>
|
||||
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
|
||||
<TargetFrameworks>netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.2;netcoreapp2.1</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<!-- Build -->
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0;netstandard2.0</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp2.2;netcoreapp2.1;netstandard2.0</TargetFrameworks>
|
||||
<AssemblyName>$(AzAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</AssemblyName>
|
||||
<RootNamespace>$(AzAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</RootNamespace>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
|
|
@ -123,5 +123,12 @@ namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests
|
|||
{
|
||||
TestRunner.RunTestScript("Test-SimpleNewVmssScaleInPolicy");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait(Category.AcceptanceType, Category.CheckIn)]
|
||||
public void SimpleNewVmssSkipExtOverprovision()
|
||||
{
|
||||
TestRunner.RunTestScript("Test-SimpleNewVmssSkipExtOverprovision");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -470,3 +470,32 @@ function Test-SimpleNewVmssScaleInPolicy
|
|||
Clean-ResourceGroup $vmssname
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Test Simple Paremeter Set for New Vmss with SkipExtensionsOnOverprovisionedVMs.
|
||||
#>
|
||||
function Test-SimpleNewVmssSkipExtOverprovision
|
||||
{
|
||||
# Setup
|
||||
$vmssname = Get-ResourceName
|
||||
|
||||
try
|
||||
{
|
||||
$username = "admin01"
|
||||
$password = Get-PasswordForVM | ConvertTo-SecureString -AsPlainText -Force
|
||||
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
|
||||
[string]$domainNameLabel = "$vmssname$vmssname".tolower();
|
||||
|
||||
# Common
|
||||
New-AzVmss -Name $vmssname -Location "westus2" -Credential $cred -DomainNameLabel $domainNameLabel `
|
||||
-SkipExtensionsOnOverprovisionedVMs;
|
||||
$vmss = Get-AzVmss -ResourceGroupName $vmssname -Name $vmssname;
|
||||
Assert-True { $vmss.DoNotRunExtensionsOnOverprovisionedVMs };
|
||||
}
|
||||
finally
|
||||
{
|
||||
# Cleanup
|
||||
Clean-ResourceGroup $vmssname
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,11 +133,12 @@ function Test-VirtualMachineScaleSetProfile
|
|||
$exttype2 = 'AzureCATExtensionHandler';
|
||||
$extver2 = '2.2';
|
||||
|
||||
$vmss2 = New-AzVmssConfig -Location $loc -SkuCapacity 2 -SkuName 'Standard_A0' -UpgradePolicyMode 'Automatic' -DisableAutoRollback $false `
|
||||
$vmss2 = New-AzVmssConfig -Location $loc -SkuCapacity 2 -SkuName 'Standard_A0' -UpgradePolicyMode 'Automatic' -DisableAutoRollback $false -SkipExtensionsOnOverprovisionedVMs `
|
||||
| Add-AzVmssExtension -Name $extname -Publisher $publisher -Type $exttype -TypeHandlerVersion $extver -AutoUpgradeMinorVersion $false `
|
||||
| Add-AzVmssExtension -Name $extname2 -Publisher $publisher2 -Type $exttype2 -TypeHandlerVersion $extver2 -AutoUpgradeMinorVersion $false -ProvisionAfterExtension $extname;
|
||||
|
||||
Assert-False { $vmss2.UpgradePolicy.AutomaticOSUpgradePolicy.DisableAutomaticRollback };
|
||||
Assert-True { $vmss2.DoNotRunExtensionsOnOverprovisionedVMs };
|
||||
|
||||
Assert-AreEqual $extname $vmss2.VirtualMachineProfile.ExtensionProfile.Extensions[0].Name;
|
||||
Assert-False { $vmss2.VirtualMachineProfile.ExtensionProfile.Extensions[0].AutoUpgradeMinorVersion };
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/21/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '3.0.0'
|
||||
ModuleVersion = '3.1.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -203,31 +203,19 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Disk Encryption Set feature
|
||||
- New cmdlets:
|
||||
New-AzDiskEncryptionSetConfig
|
||||
New-AzDiskEncryptionSet
|
||||
Get-AzDiskEncryptionSet
|
||||
Remove-AzDiskEncryptionSet
|
||||
- DiskEncryptionSetId parameter is added to the following cmdlets:
|
||||
Set-AzImageOSDisk
|
||||
Set-AzVMOSDisk
|
||||
Set-AzVmssStorageProfile
|
||||
Add-AzImageDataDisk
|
||||
New-AzVMDataDisk
|
||||
Set-AzVMDataDisk
|
||||
Add-AzVMDataDisk
|
||||
Add-AzVmssDataDisk
|
||||
Add-AzVmssVMDataDisk
|
||||
- DiskEncryptionSetId and EncryptionType parameters are added to the following cmdlets:
|
||||
New-AzDiskConfig
|
||||
New-AzSnapshotConfig
|
||||
* Add PublicIPAddressVersion parameter to New-AzVmssIPConfig
|
||||
* Move FileUris of custom script extension from public setting to protected setting
|
||||
* Add ScaleInPolicy to New-AzVmss, New-AzVmssConfig and Update-AzVmss cmdlets
|
||||
* Breaking changes
|
||||
- UploadSizeInBytes parameter is used instead of DiskSizeGB for New-AzDiskConfig when CreateOption is Upload
|
||||
- PublishingProfile.Source.ManagedImage.Id is replaced with StorageProfile.Source.Id in GalleryImageVersion object'
|
||||
ReleaseNotes = '* VM Reapply feature
|
||||
- Add Reapply parameter to Set-AzVM cmdlet
|
||||
* VM Scale Set AutomaticRepairs feature:
|
||||
- Add EnableAutomaticRepair, AutomaticRepairGracePeriod, and AutomaticRepairMaxInstanceRepairsPercent parameters to the following cmdlets:
|
||||
New-AzVmssConfig
|
||||
Update-AzVmss
|
||||
* Cross tenant gallery image support for New-AzVM
|
||||
* Add ''Spot'' to the argument completer of Priority parameter in New-AzVM, New-AzVMConfig and New-AzVmss cmdlets
|
||||
* Add DiskIOPSReadWrite and DiskMBpsReadWrite parameters to Add-AzVmssDataDisk cmdlet
|
||||
* Change SourceImageId parameter of New-AzGalleryImageVersion cmdlet to optional
|
||||
* Add OSDiskImage and DataDiskImage parameters to New-AzGalleryImageVersion cmdlet
|
||||
* Add HyperVGeneration parameter to New-AzGalleryImageDefinition cmdlet
|
||||
* Add SkipExtensionsOnOverprovisionedVMs parameters to New-AzVmss, New-AzVmssConfig and Update-AzVmss cmdlets'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
- Additional information about change #1
|
||||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 3.1.0
|
||||
* VM Reapply feature
|
||||
- Add Reapply parameter to Set-AzVM cmdlet
|
||||
* VM Scale Set AutomaticRepairs feature:
|
||||
|
@ -31,6 +33,7 @@
|
|||
* Change SourceImageId parameter of New-AzGalleryImageVersion cmdlet to optional
|
||||
* Add OSDiskImage and DataDiskImage parameters to New-AzGalleryImageVersion cmdlet
|
||||
* Add HyperVGeneration parameter to New-AzGalleryImageDefinition cmdlet
|
||||
* Add SkipExtensionsOnOverprovisionedVMs parameters to New-AzVmss, New-AzVmssConfig and Update-AzVmss cmdlets
|
||||
|
||||
## Version 3.0.0
|
||||
* Disk Encryption Set feature
|
||||
|
|
|
@ -104,6 +104,10 @@ namespace Microsoft.Azure.Commands.Compute.Automation
|
|||
ValueFromPipelineByPropertyName = true)]
|
||||
public VirtualMachineScaleSetExtension[] Extension { get; set; }
|
||||
|
||||
[Parameter(
|
||||
Mandatory = false)]
|
||||
public SwitchParameter SkipExtensionsOnOverprovisionedVMs { get; set; }
|
||||
|
||||
[Parameter(
|
||||
Mandatory = false,
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
|
@ -616,6 +620,7 @@ namespace Microsoft.Azure.Commands.Compute.Automation
|
|||
var vVirtualMachineScaleSet = new PSVirtualMachineScaleSet
|
||||
{
|
||||
Overprovision = this.IsParameterBound(c => c.Overprovision) ? this.Overprovision : (bool?)null,
|
||||
DoNotRunExtensionsOnOverprovisionedVMs = this.SkipExtensionsOnOverprovisionedVMs.IsPresent ? true : (bool?)null,
|
||||
SinglePlacementGroup = this.IsParameterBound(c => c.SinglePlacementGroup) ? this.SinglePlacementGroup : (bool?)null,
|
||||
ZoneBalance = this.ZoneBalance.IsPresent ? true : (bool?)null,
|
||||
PlatformFaultDomainCount = this.IsParameterBound(c => c.PlatformFaultDomainCount) ? this.PlatformFaultDomainCount : (int?)null,
|
||||
|
|
|
@ -255,6 +255,10 @@ namespace Microsoft.Azure.Commands.Compute.Automation
|
|||
Mandatory = false)]
|
||||
public bool SinglePlacementGroup { get; set; }
|
||||
|
||||
[Parameter(
|
||||
Mandatory = false)]
|
||||
public bool SkipExtensionsOnOverprovisionedVMs { get; set; }
|
||||
|
||||
[Parameter(
|
||||
Mandatory = false)]
|
||||
public int SkuCapacity { get; set; }
|
||||
|
@ -917,6 +921,15 @@ namespace Microsoft.Azure.Commands.Compute.Automation
|
|||
this.VirtualMachineScaleSetUpdate.SinglePlacementGroup = this.SinglePlacementGroup;
|
||||
}
|
||||
|
||||
if (this.IsParameterBound(c => c.SkipExtensionsOnOverprovisionedVMs))
|
||||
{
|
||||
if (this.VirtualMachineScaleSetUpdate == null)
|
||||
{
|
||||
this.VirtualMachineScaleSetUpdate = new VirtualMachineScaleSetUpdate();
|
||||
}
|
||||
this.VirtualMachineScaleSetUpdate.DoNotRunExtensionsOnOverprovisionedVMs = this.SkipExtensionsOnOverprovisionedVMs;
|
||||
}
|
||||
|
||||
if (this.IsParameterBound(c => c.SkuCapacity))
|
||||
{
|
||||
if (this.VirtualMachineScaleSetUpdate == null)
|
||||
|
@ -1555,6 +1568,11 @@ namespace Microsoft.Azure.Commands.Compute.Automation
|
|||
this.VirtualMachineScaleSet.SinglePlacementGroup = this.SinglePlacementGroup;
|
||||
}
|
||||
|
||||
if (this.IsParameterBound(c => c.SkipExtensionsOnOverprovisionedVMs))
|
||||
{
|
||||
this.VirtualMachineScaleSet.DoNotRunExtensionsOnOverprovisionedVMs = this.SkipExtensionsOnOverprovisionedVMs;
|
||||
}
|
||||
|
||||
if (this.IsParameterBound(c => c.SkuCapacity))
|
||||
{
|
||||
if (this.VirtualMachineScaleSet.Sku == null)
|
||||
|
|
|
@ -162,6 +162,11 @@ namespace Microsoft.Azure.Commands.Compute.Automation
|
|||
[PSArgumentCompleter("Default", "OldestVM", "NewestVM")]
|
||||
public string[] ScaleInPolicy { get; set; }
|
||||
|
||||
[Parameter(ParameterSetName = SimpleParameterSet, Mandatory = false,
|
||||
HelpMessage = "When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. "
|
||||
+ "This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.")]
|
||||
public SwitchParameter SkipExtensionsOnOverprovisionedVMs { get; set; }
|
||||
|
||||
const int FirstPortRangeStart = 50000;
|
||||
|
||||
sealed class Parameters : IParameters<VirtualMachineScaleSet>
|
||||
|
@ -299,7 +304,8 @@ namespace Microsoft.Azure.Commands.Compute.Automation
|
|||
priority: _cmdlet.Priority,
|
||||
evictionPolicy: _cmdlet.EvictionPolicy,
|
||||
maxPrice: _cmdlet.IsParameterBound(c => c.MaxPrice) ? _cmdlet.MaxPrice : (double?)null,
|
||||
scaleInPolicy: _cmdlet.ScaleInPolicy
|
||||
scaleInPolicy: _cmdlet.ScaleInPolicy,
|
||||
doNotRunExtensionsOnOverprovisionedVMs: _cmdlet.SkipExtensionsOnOverprovisionedVMs.IsPresent
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("91792853-487B-4DC2-BE6C-DD09A0A1BC10")]
|
||||
[assembly: AssemblyVersion("3.0.0")]
|
||||
[assembly: AssemblyFileVersion("3.0.0")]
|
||||
[assembly: AssemblyVersion("3.1.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.0")]
|
||||
#if !SIGN
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.Compute.Test")]
|
||||
#endif
|
||||
|
|
|
@ -58,7 +58,8 @@ namespace Microsoft.Azure.Commands.Compute.Strategies.ComputeRp
|
|||
string priority,
|
||||
string evictionPolicy,
|
||||
double? maxPrice,
|
||||
string[] scaleInPolicy)
|
||||
string[] scaleInPolicy,
|
||||
bool doNotRunExtensionsOnOverprovisionedVMs)
|
||||
=> Strategy.CreateResourceConfig(
|
||||
resourceGroup: resourceGroup,
|
||||
name: name,
|
||||
|
@ -128,7 +129,8 @@ namespace Microsoft.Azure.Commands.Compute.Strategies.ComputeRp
|
|||
ScaleInPolicy = (scaleInPolicy == null) ? null : new ScaleInPolicy
|
||||
{
|
||||
Rules = scaleInPolicy
|
||||
}
|
||||
},
|
||||
DoNotRunExtensionsOnOverprovisionedVMs = doNotRunExtensionsOnOverprovisionedVMs ? true : (bool?)null
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,8 @@ New-AzVmss [[-ResourceGroupName] <String>] [-VMScaleSetName] <String> [-AsJob] [
|
|||
[-Zone <System.Collections.Generic.List`1[System.String]>] [-NatBackendPort <Int32[]>]
|
||||
[-DataDiskSizeInGb <Int32[]>] [-ProximityPlacementGroup <String>] [-Priority <String>]
|
||||
[-EvictionPolicy <String>] [-MaxPrice <Double>] [-ScaleInPolicy <String[]>]
|
||||
[-DefaultProfile <IAzureContextContainer>] [-SinglePlacementGroup] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
[-SkipExtensionsOnOverprovisionedVMs] [-DefaultProfile <IAzureContextContainer>] [-SinglePlacementGroup]
|
||||
[-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
@ -540,6 +541,21 @@ Accept pipeline input: False
|
|||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipExtensionsOnOverprovisionedVMs
|
||||
Specifies that the extensions do not run on the extra overprovisioned VMs.
|
||||
|
||||
```yaml
|
||||
Type: System.Management.Automation.SwitchParameter
|
||||
Parameter Sets: SimpleParameterSet
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SubnetAddressPrefix
|
||||
The address prefix of the Subnet this ScaleSet will use. Default Subnet settings (192.168.1.0/24) will be applied if no value is provided.
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ New-AzVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [[-Tag] <Ha
|
|||
[[-SkuTier] <String>] [[-SkuCapacity] <Int32>] [[-UpgradePolicyMode] <UpgradeMode>]
|
||||
[[-OsProfile] <VirtualMachineScaleSetOSProfile>] [[-StorageProfile] <VirtualMachineScaleSetStorageProfile>]
|
||||
[[-NetworkInterfaceConfiguration] <VirtualMachineScaleSetNetworkConfiguration[]>]
|
||||
[[-Extension] <VirtualMachineScaleSetExtension[]>] [-SinglePlacementGroup <Boolean>] [-ZoneBalance]
|
||||
[-PlatformFaultDomainCount <Int32>] [-Zone <String[]>] [-PlanName <String>] [-PlanPublisher <String>]
|
||||
[-PlanProduct <String>] [-PlanPromotionCode <String>] [-RollingUpgradePolicy <RollingUpgradePolicy>]
|
||||
[-EnableAutomaticRepair] [-AutomaticRepairGracePeriod <String>]
|
||||
[[-Extension] <VirtualMachineScaleSetExtension[]>] [-SkipExtensionsOnOverprovisionedVMs]
|
||||
[-SinglePlacementGroup <Boolean>] [-ZoneBalance] [-PlatformFaultDomainCount <Int32>] [-Zone <String[]>]
|
||||
[-PlanName <String>] [-PlanPublisher <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>]
|
||||
[-RollingUpgradePolicy <RollingUpgradePolicy>] [-EnableAutomaticRepair] [-AutomaticRepairGracePeriod <String>]
|
||||
[-AutomaticRepairMaxInstanceRepairsPercent <Int32>] [-AutoOSUpgrade] [-DisableAutoRollback <Boolean>]
|
||||
[-EnableUltraSSD] [-HealthProbeId <String>] [-BootDiagnostic <BootDiagnostics>] [-LicenseType <String>]
|
||||
[-Priority <String>] [-EvictionPolicy <String>] [-MaxPrice <Double>] [-TerminateScheduledEvents]
|
||||
|
@ -37,10 +37,10 @@ New-AzVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [[-Tag] <Ha
|
|||
[[-SkuTier] <String>] [[-SkuCapacity] <Int32>] [[-UpgradePolicyMode] <UpgradeMode>]
|
||||
[[-OsProfile] <VirtualMachineScaleSetOSProfile>] [[-StorageProfile] <VirtualMachineScaleSetStorageProfile>]
|
||||
[[-NetworkInterfaceConfiguration] <VirtualMachineScaleSetNetworkConfiguration[]>]
|
||||
[[-Extension] <VirtualMachineScaleSetExtension[]>] [-SinglePlacementGroup <Boolean>] [-ZoneBalance]
|
||||
[-PlatformFaultDomainCount <Int32>] [-Zone <String[]>] [-PlanName <String>] [-PlanPublisher <String>]
|
||||
[-PlanProduct <String>] [-PlanPromotionCode <String>] [-RollingUpgradePolicy <RollingUpgradePolicy>]
|
||||
[-EnableAutomaticRepair] [-AutomaticRepairGracePeriod <String>]
|
||||
[[-Extension] <VirtualMachineScaleSetExtension[]>] [-SkipExtensionsOnOverprovisionedVMs]
|
||||
[-SinglePlacementGroup <Boolean>] [-ZoneBalance] [-PlatformFaultDomainCount <Int32>] [-Zone <String[]>]
|
||||
[-PlanName <String>] [-PlanPublisher <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>]
|
||||
[-RollingUpgradePolicy <RollingUpgradePolicy>] [-EnableAutomaticRepair] [-AutomaticRepairGracePeriod <String>]
|
||||
[-AutomaticRepairMaxInstanceRepairsPercent <Int32>] [-AutoOSUpgrade] [-DisableAutoRollback <Boolean>]
|
||||
[-EnableUltraSSD] [-HealthProbeId <String>] [-BootDiagnostic <BootDiagnostics>] [-LicenseType <String>]
|
||||
[-Priority <String>] [-EvictionPolicy <String>] [-MaxPrice <Double>] [-TerminateScheduledEvents]
|
||||
|
@ -55,10 +55,10 @@ New-AzVmssConfig [[-Overprovision] <Boolean>] [[-Location] <String>] [[-Tag] <Ha
|
|||
[[-SkuTier] <String>] [[-SkuCapacity] <Int32>] [[-UpgradePolicyMode] <UpgradeMode>]
|
||||
[[-OsProfile] <VirtualMachineScaleSetOSProfile>] [[-StorageProfile] <VirtualMachineScaleSetStorageProfile>]
|
||||
[[-NetworkInterfaceConfiguration] <VirtualMachineScaleSetNetworkConfiguration[]>]
|
||||
[[-Extension] <VirtualMachineScaleSetExtension[]>] [-SinglePlacementGroup <Boolean>] [-ZoneBalance]
|
||||
[-PlatformFaultDomainCount <Int32>] [-Zone <String[]>] [-PlanName <String>] [-PlanPublisher <String>]
|
||||
[-PlanProduct <String>] [-PlanPromotionCode <String>] [-RollingUpgradePolicy <RollingUpgradePolicy>]
|
||||
[-EnableAutomaticRepair] [-AutomaticRepairGracePeriod <String>]
|
||||
[[-Extension] <VirtualMachineScaleSetExtension[]>] [-SkipExtensionsOnOverprovisionedVMs]
|
||||
[-SinglePlacementGroup <Boolean>] [-ZoneBalance] [-PlatformFaultDomainCount <Int32>] [-Zone <String[]>]
|
||||
[-PlanName <String>] [-PlanPublisher <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>]
|
||||
[-RollingUpgradePolicy <RollingUpgradePolicy>] [-EnableAutomaticRepair] [-AutomaticRepairGracePeriod <String>]
|
||||
[-AutomaticRepairMaxInstanceRepairsPercent <Int32>] [-AutoOSUpgrade] [-DisableAutoRollback <Boolean>]
|
||||
[-EnableUltraSSD] [-HealthProbeId <String>] [-BootDiagnostic <BootDiagnostics>] [-LicenseType <String>]
|
||||
[-Priority <String>] [-EvictionPolicy <String>] [-MaxPrice <Double>] [-TerminateScheduledEvents]
|
||||
|
@ -562,6 +562,21 @@ Accept pipeline input: True (ByPropertyName)
|
|||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipExtensionsOnOverprovisionedVMs
|
||||
Specifies that the extensions do not run on the extra overprovisioned VMs.
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -SkuCapacity
|
||||
Specifies the number of instances in the VMSS.
|
||||
|
||||
|
|
|
@ -28,11 +28,11 @@ Update-AzVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String>
|
|||
[-OsDiskWriteAccelerator <Boolean>] [-Overprovision <Boolean>] [-PauseTimeBetweenBatches <String>]
|
||||
[-PlanName <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>] [-PlanPublisher <String>]
|
||||
[-ProvisionVMAgent <Boolean>] [-ScaleInPolicy <String[]>] [-SinglePlacementGroup <Boolean>]
|
||||
[-SkuCapacity <Int32>] [-SkuName <String>] [-SkuTier <String>] [-Tag <Hashtable>]
|
||||
[-TerminateScheduledEventNotBeforeTimeoutInMinutes <Int32>] [-TerminateScheduledEvents <Boolean>]
|
||||
[-TimeZone <String>] [-UltraSSDEnabled <Boolean>] [-UpgradePolicyMode <UpgradeMode>]
|
||||
[-VhdContainer <String[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
[-SkipExtensionsOnOverprovisionedVMs <Boolean>] [-SkuCapacity <Int32>] [-SkuName <String>] [-SkuTier <String>]
|
||||
[-Tag <Hashtable>] [-TerminateScheduledEventNotBeforeTimeoutInMinutes <Int32>]
|
||||
[-TerminateScheduledEvents <Boolean>] [-TimeZone <String>] [-UltraSSDEnabled <Boolean>]
|
||||
[-UpgradePolicyMode <UpgradeMode>] [-VhdContainer <String[]>] [-AsJob]
|
||||
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### ExplicitIdentityParameterSet
|
||||
|
@ -50,11 +50,12 @@ Update-AzVmss [-ResourceGroupName] <String> [-VMScaleSetName] <String>
|
|||
[-OsDiskCaching <CachingTypes>] [-OsDiskWriteAccelerator <Boolean>] [-Overprovision <Boolean>]
|
||||
[-PauseTimeBetweenBatches <String>] [-PlanName <String>] [-PlanProduct <String>] [-PlanPromotionCode <String>]
|
||||
[-PlanPublisher <String>] [-ProvisionVMAgent <Boolean>] [-ScaleInPolicy <String[]>]
|
||||
[-SinglePlacementGroup <Boolean>] [-SkuCapacity <Int32>] [-SkuName <String>] [-SkuTier <String>]
|
||||
[-Tag <Hashtable>] [-TerminateScheduledEventNotBeforeTimeoutInMinutes <Int32>]
|
||||
[-TerminateScheduledEvents <Boolean>] [-TimeZone <String>] [-UltraSSDEnabled <Boolean>]
|
||||
[-UpgradePolicyMode <UpgradeMode>] [-VhdContainer <String[]>] [-AsJob]
|
||||
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
[-SinglePlacementGroup <Boolean>] [-SkipExtensionsOnOverprovisionedVMs <Boolean>] [-SkuCapacity <Int32>]
|
||||
[-SkuName <String>] [-SkuTier <String>] [-Tag <Hashtable>]
|
||||
[-TerminateScheduledEventNotBeforeTimeoutInMinutes <Int32>] [-TerminateScheduledEvents <Boolean>]
|
||||
[-TimeZone <String>] [-UltraSSDEnabled <Boolean>] [-UpgradePolicyMode <UpgradeMode>]
|
||||
[-VhdContainer <String[]>] [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
|
@ -677,6 +678,21 @@ Accept pipeline input: False
|
|||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipExtensionsOnOverprovisionedVMs
|
||||
Specifies that the extensions do not run on the extra overprovisioned VMs.
|
||||
|
||||
```yaml
|
||||
Type: System.Boolean
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkuCapacity
|
||||
Specifies the number of instances in the VMSS.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '0.1.1'
|
||||
ModuleVersion = '1.0.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -75,11 +75,11 @@ NestedModules = @('.\Microsoft.Azure.PowerShell.Cmdlets.DataBoxEdge.dll')
|
|||
FunctionsToExport = @()
|
||||
|
||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||
|
||||
CmdletsToExport = 'Get-AzDataBoxEdgeJob', 'Get-AzDataBoxEdgeDevice', 'Invoke-AzDataBoxEdgeDevice',
|
||||
'New-AzDataBoxEdgeDevice', 'Remove-AzDataBoxEdgeDevice',
|
||||
'Get-AzDataBoxEdgeUser', 'New-AzDataBoxEdgeUser',
|
||||
'Set-AzDataBoxEdgeUser', 'Remove-AzDataBoxEdgeUser',
|
||||
CmdletsToExport = 'Get-AzDataBoxEdgeJob', 'Get-AzDataBoxEdgeDevice',
|
||||
'Invoke-AzDataBoxEdgeDevice', 'New-AzDataBoxEdgeDevice',
|
||||
'Remove-AzDataBoxEdgeDevice', 'Get-AzDataBoxEdgeUser',
|
||||
'New-AzDataBoxEdgeUser', 'Set-AzDataBoxEdgeUser',
|
||||
'Remove-AzDataBoxEdgeUser',
|
||||
'Get-AzDataBoxEdgeStorageAccountCredential',
|
||||
'New-AzDataBoxEdgeStorageAccountCredential',
|
||||
'Remove-AzDataBoxEdgeStorageAccountCredential',
|
||||
|
@ -88,11 +88,12 @@ CmdletsToExport = 'Get-AzDataBoxEdgeJob', 'Get-AzDataBoxEdgeDevice', 'Invoke-AzD
|
|||
'Get-AzDataBoxEdgeBandwidthSchedule',
|
||||
'Set-AzDataBoxEdgeBandwidthSchedule',
|
||||
'New-AzDataBoxEdgeBandwidthSchedule',
|
||||
'Remove-AzDataBoxEdgeBandwidthSchedule', 'Get-AzDataBoxEdgeRole', 'Set-AzDataBoxEdgeRole',
|
||||
'New-AzDataBoxEdgeRole', 'Remove-AzDataBoxEdgeRole',
|
||||
'Get-AzDataBoxEdgeTrigger', 'New-AzDataBoxEdgeTrigger',
|
||||
'Remove-AzDataBoxEdgeTrigger',
|
||||
'Get-AzDataBoxEdgeOrder', 'New-AzDataBoxEdgeOrder', 'Remove-AzDataBoxEdgeOrder'
|
||||
'Remove-AzDataBoxEdgeBandwidthSchedule', 'Get-AzDataBoxEdgeRole',
|
||||
'Set-AzDataBoxEdgeRole', 'New-AzDataBoxEdgeRole',
|
||||
'Remove-AzDataBoxEdgeRole', 'Get-AzDataBoxEdgeTrigger',
|
||||
'New-AzDataBoxEdgeTrigger', 'Remove-AzDataBoxEdgeTrigger',
|
||||
'Get-AzDataBoxEdgeOrder', 'New-AzDataBoxEdgeOrder',
|
||||
'Remove-AzDataBoxEdgeOrder'
|
||||
|
||||
# Variables to export from this module
|
||||
# VariablesToExport = @()
|
||||
|
@ -127,7 +128,24 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Remove cmdlet ''Set-AzDataBoxEdgeStorageAccountCredential'''
|
||||
ReleaseNotes = '* Added cmdlet ''Get-AzDataBoxEdgeOrder''
|
||||
- Get the Order
|
||||
* Added cmdlet ''New-AzDataBoxEdgeOrder''
|
||||
- Create new Order
|
||||
* Added cmdlet ''Remove-AzDataBoxEdgeOrder''
|
||||
- Remove the Order
|
||||
* Change in cmdlet ''New-AzDataBoxEdgeShare''
|
||||
- Now creates Local Share
|
||||
* Added cmdlet ''Set-AzDataBoxEdgeRole''
|
||||
- Now IotRole can be mapped to Share
|
||||
* Added cmdlet ''Invoke-AzDataBoxEdgeDevice''
|
||||
- Invoke scan update, download update, install updates on the device
|
||||
* Added cmdlet ''Get-AzDataBoxEdgeTrigger''
|
||||
- Gets the information about Triggers
|
||||
* Added cmdlet ''New-AzDataBoxEdgeTrigger''
|
||||
- Create new Triggers
|
||||
* Added cmdlet ''Remove-AzDataBoxEdgeTrigger''
|
||||
- Remove the Triggers'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
|
||||
## Upcoming Release
|
||||
|
||||
## Version 1.0.0
|
||||
* Added cmdlet `Get-AzDataBoxEdgeOrder`
|
||||
- Get the Order
|
||||
* Added cmdlet `New-AzDataBoxEdgeOrder`
|
||||
|
|
|
@ -24,5 +24,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("4D3E68BD-35BC-4C97-8F40-A832CBA17AF7")]
|
||||
[assembly: AssemblyVersion("0.1.1")]
|
||||
[assembly: AssemblyFileVersion("0.1.1")]
|
||||
[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0")]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.4.1'
|
||||
ModuleVersion = '1.5.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -170,7 +170,8 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Update ADF .Net SDK version to 4.3.0'
|
||||
ReleaseNotes = '* Update ADF .Net SDK version to 4.4.0
|
||||
* Add parameter ''ExpressCustomSetup'' for ''Set-AzureRmDataFactoryV2IntegrationRuntime'' cmd to enable setup configurations and 3rd party components without custom setup script.'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
- Additional information about change #1
|
||||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 1.5.0
|
||||
* Update ADF .Net SDK version to 4.4.0
|
||||
* Add parameter "ExpressCustomSetup" for "Set-AzureRmDataFactoryV2IntegrationRuntime" cmd to enable setup configurations and 3rd party components without custom setup script.
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("5d024af0-81c9-44f0-b3b0-7080f103fb4d")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
[assembly: AssemblyVersion("1.5.0")]
|
||||
[assembly: AssemblyFileVersion("1.5.0")]
|
||||
#if !SIGN
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.DataFactoryV2.Test")]
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.2.4'
|
||||
ModuleVersion = '1.2.5'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -159,12 +159,7 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Update ADLS SDK version (https://github.com/Azure/azure-data-lake-store-net/blob/preview-alpha/CHANGELOG.md#version-123-alpha), brings following fixes
|
||||
* Avoid throwing exception while unable to deserialize the creationtime of the trash or directory entry.
|
||||
* Expose setting per request timeout in adlsclient
|
||||
* Fix passing the original syncflag for badoffset recovery
|
||||
* Fix EnumerateDirectory to retrieve continuation token once response is checked
|
||||
* Fix Concat Bug'
|
||||
ReleaseNotes = '* Update documentation of Get-AzDataLakeStoreDeletedItem and Restore-AzDataLakeStoreDeletedItem'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
- Additional information about change #1
|
||||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 1.2.5
|
||||
* Update documentation of Get-AzDataLakeStoreDeletedItem and Restore-AzDataLakeStoreDeletedItem
|
||||
|
||||
## Version 1.2.4
|
||||
|
|
|
@ -36,8 +36,8 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.2.4")]
|
||||
[assembly: AssemblyFileVersion("1.2.4")]
|
||||
[assembly: AssemblyVersion("1.2.5")]
|
||||
[assembly: AssemblyFileVersion("1.2.5")]
|
||||
#if SIGN
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.DataLakeStore.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
|
||||
#else
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 8/22/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.4.0'
|
||||
ModuleVersion = '1.4.1'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -128,11 +128,7 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Fixed miscellaneous typos across module
|
||||
* Fix for issue #9658 : Typo VirtualNteworkRule parameter in Set-AzEventHubNetworkRuleSet
|
||||
* Fix for issue #9558 : Set-AzEventHubNamespace is using PATCH instead of PUT
|
||||
* added EnableKafka parameter to Set-AzEventHubNamespace cmdlet
|
||||
* Fix for issue #9786 : cannot create a rule with Listen only rights'
|
||||
ReleaseNotes = '* Fix for issue 10301 : Fix the SAS Token date format'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
- Additional information about change #1
|
||||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 1.4.1
|
||||
* Fix for issue 10301 : Fix the SAS Token date format
|
||||
|
||||
## Version 1.4.0
|
||||
|
|
|
@ -25,5 +25,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("3ea250fe-7987-426b-8ca0-2dd65deda73c")]
|
||||
[assembly: AssemblyVersion("1.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.4.1")]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.1.2'
|
||||
ModuleVersion = '1.2.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -126,7 +126,10 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Fixed miscellaneous typos across module'
|
||||
ReleaseNotes = '* Add MinimumTlsVersion parameter to Enable-AzFrontDoorCustomDomainHttps and New-AzFrontDoorFrontendEndpointObject
|
||||
* Add HealthProbeMethod and EnabledState parameters to New-AzFrontDoorHealthProbeSettingObject
|
||||
* Add new cmdlet to create BackendPoolsSettings objec to pass into creation/update of Front Door
|
||||
- New-AzFrontDoorBackendPoolsSettingObject'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
-->
|
||||
## Upcoming Release
|
||||
* Added WAF managed rules exclusion support
|
||||
|
||||
## Version 1.2.0
|
||||
* Add MinimumTlsVersion parameter to Enable-AzFrontDoorCustomDomainHttps and New-AzFrontDoorFrontendEndpointObject
|
||||
* Add HealthProbeMethod and EnabledState parameters to New-AzFrontDoorHealthProbeSettingObject
|
||||
* Add new cmdlet to create BackendPoolsSettings objec to pass into creation/update of Front Door
|
||||
|
|
|
@ -25,5 +25,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("d90791a2-8102-47fc-2483-de25ae796eb1")]
|
||||
[assembly: AssemblyVersion("1.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.1.2")]
|
||||
[assembly: AssemblyVersion("1.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.0")]
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<PsModuleName>Maintenance</PsModuleName>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.Test.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>$(LegacyAssemblyPrefix)$(PsModuleName)$(AzTestAssemblySuffix)</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.Management.Maintenance" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="SessionRecords\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Commands.Maintenance.Test")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Commands.Maintenance.Test")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f5d771be-9c6b-4af9-ac41-b2d7f3267868")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.1.0")]
|
||||
[assembly: AssemblyFileVersion("0.1.0")]
|
|
@ -0,0 +1,89 @@
|
|||
# ----------------------------------------------------------------------------------
|
||||
#
|
||||
# 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
|
||||
Gets maintenance configuration name
|
||||
#>
|
||||
function Get-RandomMaintenanceConfigurationName
|
||||
{
|
||||
return getAssetName
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets virtual machine name
|
||||
#>
|
||||
function Get-RandomVirtualMachineName
|
||||
{
|
||||
return getAssetName
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets dedicated host name
|
||||
#>
|
||||
function Get-RandomDedicatedHostName
|
||||
{
|
||||
return getAssetName
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets resource group name
|
||||
#>
|
||||
function Get-RandomResourceGroupName
|
||||
{
|
||||
return getAssetName
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the default location for a provider
|
||||
#>
|
||||
function Get-ProviderLocation($provider)
|
||||
{
|
||||
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
|
||||
{
|
||||
$namespace = $provider.Split("/")[0]
|
||||
if($provider.Contains("/"))
|
||||
{
|
||||
$type = $provider.Substring($namespace.Length + 1)
|
||||
$location = Get-AzResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type}
|
||||
|
||||
if ($location -eq $null)
|
||||
{
|
||||
return "westus"
|
||||
} else
|
||||
{
|
||||
return $location.Locations[0].ToLower() -replace '\s',''
|
||||
}
|
||||
}
|
||||
|
||||
return "westus"
|
||||
}
|
||||
|
||||
return "westus"
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Cleans the created resource groups
|
||||
#>
|
||||
function Clean-ResourceGroup($rgname)
|
||||
{
|
||||
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback) {
|
||||
Remove-AzResourceGroup -Name $rgname -Force
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.ScenarioTest;
|
||||
using Microsoft.Azure.ServiceManagement.Common.Models;
|
||||
using Microsoft.WindowsAzure.Commands.ScenarioTest;
|
||||
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Test.ScenarioTests
|
||||
{
|
||||
public class MaintenanceTests : RMTestBase
|
||||
{
|
||||
public XunitTracingInterceptor _logger;
|
||||
|
||||
public MaintenanceTests(Xunit.Abstractions.ITestOutputHelper output)
|
||||
{
|
||||
_logger = new XunitTracingInterceptor(output);
|
||||
XunitTracingInterceptor.AddToContext(_logger);
|
||||
TestExecutionHelpers.SetUpSessionAndProfile();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait(Category.AcceptanceType, Category.CheckIn)]
|
||||
public void TestMaintenanceConfiguration()
|
||||
{
|
||||
TestController.NewInstance.RunPowerShellTest(_logger, "Test-AzMaintenanceConfiguration");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait(Category.AcceptanceType, Category.CheckIn)]
|
||||
public void TestConfigurationAssignment()
|
||||
{
|
||||
TestController.NewInstance.RunPowerShellTest(_logger, "Test-AzConfigurationAssignment");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Trait(Category.AcceptanceType, Category.CheckIn)]
|
||||
public void TestMaintenanceUpdate()
|
||||
{
|
||||
TestController.NewInstance.RunPowerShellTest(_logger, "Test-AzMaintenanceUpdate");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
# ----------------------------------------------------------------------------------
|
||||
#
|
||||
# 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
|
||||
Test New-AzMaintenanceConfiguration, Get-AzMaintenanceConfiguration, Remove-AzMaintenanceConfiguration
|
||||
#>
|
||||
function Test-AzMaintenanceConfiguration
|
||||
{
|
||||
$resourceGroupName = Get-RandomResourceGroupName
|
||||
$maintenanceConfigurationName = Get-RandomMaintenanceConfigurationName
|
||||
$location = Get-ProviderLocation "Microsoft.Maintenance/MaintenanceConfigurations"
|
||||
$maintenanceScope = "Host"
|
||||
|
||||
try
|
||||
{
|
||||
New-AzResourceGroup -Name $resourceGroupName -Location $location
|
||||
Write-Host "Created RG $location"
|
||||
|
||||
$maintenanceConfigurationCreated = New-AzMaintenanceConfiguration -ResourceGroupName $resourceGroupName -Name $maintenanceConfigurationName -MaintenanceScope $maintenanceScope -Location $location
|
||||
Write-Host "Created configuration $maintenanceConfigurationName"
|
||||
Write-Output $maintenanceConfigurationCreated
|
||||
|
||||
Assert-AreEqual $maintenanceConfigurationCreated.Name $maintenanceConfigurationName
|
||||
Assert-AreEqual $maintenanceConfigurationCreated.Location $location
|
||||
Assert-AreEqual $maintenanceConfigurationCreated.MaintenanceScope $maintenanceScope
|
||||
Assert-AreEqual $maintenanceConfigurationCreated.Type "Microsoft.Maintenance/MaintenanceConfigurations"
|
||||
|
||||
|
||||
$retrievedMaintenanceConfiguration = Get-AzMaintenanceConfiguration -ResourceGroupName $resourceGroupName -Name $maintenanceConfigurationName
|
||||
Assert-MaintenanceConfiguration $maintenanceConfigurationCreated $retrievedMaintenanceConfiguration
|
||||
|
||||
Remove-AzMaintenanceConfiguration -ResourceGroupName $resourceGroupName -Name $maintenanceConfigurationName -Force
|
||||
}
|
||||
finally
|
||||
{
|
||||
# Cleanup
|
||||
Clean-ResourceGroup $resourceGroupName
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Test New-AzConfigurationAssignment, Get-AzConfigurationAssignment, Remove-AzConfigurationAssignment
|
||||
#>
|
||||
function Test-AzConfigurationAssignment
|
||||
{
|
||||
$resourceGroupName = Get-RandomResourceGroupName
|
||||
$maintenanceConfigurationName = Get-RandomMaintenanceConfigurationName
|
||||
$location = "westus2"
|
||||
$maintenanceScope = "Host"
|
||||
|
||||
try
|
||||
{
|
||||
New-AzResourceGroup -Name $resourceGroupName -Location $location
|
||||
$maintenanceConfigurationCreated = New-AzMaintenanceConfiguration -ResourceGroupName $resourceGroupName -Name $maintenanceConfigurationName -MaintenanceScope $maintenanceScope -Location $location
|
||||
|
||||
$configurationAssignmentCreated = New-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute -ConfigurationAssignmentName $maintenanceConfigurationName -MaintenanceConfigurationId $maintenanceConfigurationCreated.Id -Location $location
|
||||
|
||||
Assert-AreEqual $configurationAssignmentCreated.Name $maintenanceConfigurationName
|
||||
Assert-AreEqual $configurationAssignmentCreated.Type "Microsoft.Maintenance/configurationAssignments"
|
||||
Assert-AreEqual $configurationAssignmentCreated.MaintenanceConfigurationId $maintenanceConfigurationCreated.Id
|
||||
|
||||
$retrievedConfigurationAssignmentList = Get-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute
|
||||
|
||||
Assert-AreEqual $retrievedConfigurationAssignmentList.Count 1
|
||||
#Assert-ConfigurationAssignment $configurationAssignmentCreated $retrievedConfigurationAssignmentList[0]
|
||||
|
||||
Remove-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute -ConfigurationAssignmentName $maintenanceConfigurationName -Force
|
||||
|
||||
Remove-AzMaintenanceConfiguration -ResourceGroupName $resourceGroupName -Name $maintenanceConfigurationName -Force
|
||||
}
|
||||
finally
|
||||
{
|
||||
# Cleanup
|
||||
Clean-ResourceGroup $resourceGroupName
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Test New-AzConfigurationAssignment, Get-AzMaintenanceUpdate, Remove-AzConfigurationAssignment
|
||||
#>
|
||||
function Test-AzMaintenanceUpdate
|
||||
{
|
||||
$resourceGroupName = Get-RandomResourceGroupName
|
||||
$maintenanceConfigurationName = Get-RandomMaintenanceConfigurationName
|
||||
$virtualMachineName = Get-RandomMaintenanceConfigurationName
|
||||
$location = "westus2"
|
||||
$maintenanceScope = "Host"
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
New-AzResourceGroup -Name $resourceGroupName -Location $location
|
||||
$maintenanceConfigurationCreated = New-AzMaintenanceConfiguration -ResourceGroupName $resourceGroupName -Name $maintenanceConfigurationName -MaintenanceScope $maintenanceScope -Location $location
|
||||
|
||||
$configurationAssignmentCreated = New-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute -ConfigurationAssignmentName $maintenanceConfigurationName -MaintenanceConfigurationId $maintenanceConfigurationCreated.Id -Location $location
|
||||
|
||||
Assert-AreEqual $configurationAssignmentCreated.Name $maintenanceConfigurationName
|
||||
Assert-AreEqual $configurationAssignmentCreated.Type "Microsoft.Maintenance/configurationAssignments"
|
||||
Assert-AreEqual $configurationAssignmentCreated.MaintenanceConfigurationId $maintenanceConfigurationCreated.Id
|
||||
|
||||
$retrievedMaintenanceUpdateList = Get-AzMaintenanceUpdate -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute
|
||||
#Assert-NotNull $retrievedMaintenanceUpdateList
|
||||
|
||||
Remove-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute -ConfigurationAssignmentName $maintenanceConfigurationName -Force
|
||||
|
||||
Remove-AzMaintenanceConfiguration -ResourceGroupName $resourceGroupName -Name $maintenanceConfigurationName -Force
|
||||
}
|
||||
finally
|
||||
{
|
||||
# Cleanup
|
||||
Clean-ResourceGroup $resourceGroupName
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Assert a maintenace configuration object.
|
||||
|
||||
.PARAMETER expected
|
||||
The expected maintenace configuration object.
|
||||
|
||||
.PARAMETER actual
|
||||
The actual maintenace configuration object.
|
||||
#>
|
||||
function Assert-MaintenanceConfiguration
|
||||
{
|
||||
Param
|
||||
(
|
||||
[parameter(position=0)]
|
||||
$Expected,
|
||||
[parameter(position=1)]
|
||||
$Actual
|
||||
)
|
||||
|
||||
Assert-AreEqual $Actual.Name $Expected.Name
|
||||
Assert-AreEqual $Actual.Location $Expected.Location
|
||||
Assert-AreEqual $Actual.MaintenanceType $Expected.MaintenanceType
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Assert a configuration assignment object.
|
||||
|
||||
.PARAMETER expected
|
||||
The expected configuration assignment object.
|
||||
|
||||
.PARAMETER actual
|
||||
The actual configuration assignment object.
|
||||
#>
|
||||
function Assert-ConfigurationAssignment
|
||||
{
|
||||
Param
|
||||
(
|
||||
[parameter(position=0)]
|
||||
$Expected,
|
||||
[parameter(position=1)]
|
||||
$Actual
|
||||
)
|
||||
|
||||
Assert-AreEqual $Actual.Name $Expected.Name
|
||||
Assert-AreEqual $Actual.MaintenanceConfigurationId $Expected.MaintenanceConfigurationId
|
||||
Assert-AreEqual $Actual.ResourceId $Expected.ResourceId
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.Azure.Commands.Common.Authentication;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Internal.Resources;
|
||||
using Microsoft.Azure.Test.HttpRecorder;
|
||||
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
|
||||
using Microsoft.WindowsAzure.Commands.ScenarioTest;
|
||||
using Microsoft.Azure.ServiceManagement.Common.Models;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Test.ScenarioTests
|
||||
{
|
||||
public class TestController
|
||||
{
|
||||
private readonly EnvironmentSetupHelper _helper;
|
||||
|
||||
public MaintenanceManagementClient MaintenanceClient { get; private set; }
|
||||
|
||||
public ResourceManagementClient ResourceClient { get; private set; }
|
||||
|
||||
public TestController()
|
||||
{
|
||||
_helper = new EnvironmentSetupHelper();
|
||||
}
|
||||
|
||||
public static TestController NewInstance => new TestController();
|
||||
|
||||
public void RunPowerShellTest(XunitTracingInterceptor logger, params string[] scripts)
|
||||
{
|
||||
var sf = new StackTrace().GetFrame(1);
|
||||
var callingClassType = sf.GetMethod().ReflectedType?.ToString();
|
||||
var mockName = sf.GetMethod().Name;
|
||||
|
||||
_helper.TracingInterceptor = logger;
|
||||
|
||||
var providers = new Dictionary<string, string>()
|
||||
{
|
||||
{ "Microsoft.Resources", null },
|
||||
{ "Microsoft.Features", null },
|
||||
{ "Microsoft.Authorization", null },
|
||||
{ "Microsoft.Maintenance", null }
|
||||
};
|
||||
|
||||
var providersToIgnore = new Dictionary<string, string>()
|
||||
{
|
||||
{ "Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01" }
|
||||
};
|
||||
|
||||
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, providers, providersToIgnore);
|
||||
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");
|
||||
|
||||
using (var context = MockContext.Start(callingClassType, mockName))
|
||||
{
|
||||
SetupManagementClients(context);
|
||||
|
||||
var callingClassName = callingClassType?.Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries).Last();
|
||||
|
||||
_helper.SetupEnvironment(AzureModule.AzureResourceManager);
|
||||
_helper.SetupModules(AzureModule.AzureResourceManager,
|
||||
"ScenarioTests\\" + callingClassName + ".ps1",
|
||||
"AzureRM.Resources.ps1",
|
||||
"ScenarioTests\\Common.ps1",
|
||||
_helper.RMProfileModule,
|
||||
_helper.GetRMModulePath(@"Az.Maintenance.psd1"));
|
||||
|
||||
if (scripts != null)
|
||||
{
|
||||
_helper.RunPowerShellTest(scripts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupManagementClients(MockContext context)
|
||||
{
|
||||
ResourceClient = GetResourceManagementClient(context);
|
||||
MaintenanceClient = GetMaintenanceManagementClient(context);
|
||||
_helper.SetupManagementClients(ResourceClient, MaintenanceClient);
|
||||
}
|
||||
|
||||
private static MaintenanceManagementClient GetMaintenanceManagementClient(MockContext context)
|
||||
{
|
||||
return context.GetServiceClient<MaintenanceManagementClient>(TestEnvironmentFactory.GetTestEnvironment());
|
||||
}
|
||||
|
||||
private static ResourceManagementClient GetResourceManagementClient(MockContext context)
|
||||
{
|
||||
return context.GetServiceClient<ResourceManagementClient>(TestEnvironmentFactory.GetTestEnvironment());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,664 @@
|
|||
{
|
||||
"Entries": [
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODEyOD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "PUT",
|
||||
"RequestBody": "{\r\n \"location\": \"westus2\"\r\n}",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"a8e82f8f-7cff-413c-bf53-786395075428"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Content-Length": [
|
||||
"29"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-writes": [
|
||||
"1199"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"4074eb9b-c743-4afa-b438-42ccc9596156"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"4074eb9b-c743-4afa-b438-42ccc9596156"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055628Z:4074eb9b-c743-4afa-b438-42ccc9596156"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:28 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"166"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"id\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourceGroups/ps8128\",\r\n \"name\": \"ps8128\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}",
|
||||
"StatusCode": 201
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128/providers/Microsoft.Maintenance/maintenanceConfigurations/ps5307?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODEyOC9wcm92aWRlcnMvTWljcm9zb2Z0Lk1haW50ZW5hbmNlL21haW50ZW5hbmNlQ29uZmlndXJhdGlvbnMvcHM1MzA3P2FwaS12ZXJzaW9uPTIwMTgtMDYtMDEtcHJldmlldw==",
|
||||
"RequestMethod": "PUT",
|
||||
"RequestBody": "{\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"maintenanceScope\": \"Host\"\r\n }\r\n}",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"b654573f-4739-4a63-963f-852ecc439444"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Content-Length": [
|
||||
"86"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"e2d16bf8-1139-47cc-9d07-86919a6cae3f"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-writes": [
|
||||
"1199"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"e2d16bf8-1139-47cc-9d07-86919a6cae3f"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055630Z:e2d16bf8-1139-47cc-9d07-86919a6cae3f"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:29 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"396"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"extensionProperties\": {},\r\n \"maintenanceScope\": \"Host\"\r\n },\r\n \"maintenanceWindows\": [],\r\n \"id\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128/providers/Microsoft.Maintenance/maintenanceConfigurations/ps5307\",\r\n \"name\": \"ps5307\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps5307?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3NtZHRlc3R3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS9ob3N0R3JvdXBzL3NtZGRoZ3dlc3R1czIvaG9zdHMvc21kZGh3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFpbnRlbmFuY2UvY29uZmlndXJhdGlvbkFzc2lnbm1lbnRzL3BzNTMwNz9hcGktdmVyc2lvbj0yMDE4LTA2LTAxLXByZXZpZXc=",
|
||||
"RequestMethod": "PUT",
|
||||
"RequestBody": "{\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128/providers/Microsoft.Maintenance/maintenanceConfigurations/ps5307\"\r\n }\r\n}",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"9864b50b-b147-48ea-b3ec-f7b23b29746b"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Content-Length": [
|
||||
"230"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"026c43c4-0e51-4908-b8b7-f0d03f6c175d"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-writes": [
|
||||
"1198"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"026c43c4-0e51-4908-b8b7-f0d03f6c175d"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055634Z:026c43c4-0e51-4908-b8b7-f0d03f6c175d"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:34 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"601"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128/providers/Microsoft.Maintenance/maintenanceConfigurations/ps5307\",\r\n \"resourceId\": \"7b32ed22-dc7b-4a17-9c42-36c024f4c9f9\"\r\n },\r\n \"id\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps5307\",\r\n \"name\": \"ps5307\",\r\n \"type\": \"Microsoft.Maintenance/configurationAssignments\"\r\n}",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3NtZHRlc3R3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS9ob3N0R3JvdXBzL3NtZGRoZ3dlc3R1czIvaG9zdHMvc21kZGh3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFpbnRlbmFuY2UvY29uZmlndXJhdGlvbkFzc2lnbm1lbnRzP2FwaS12ZXJzaW9uPTIwMTgtMDYtMDEtcHJldmlldw==",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"d4045169-f094-44e2-9f4f-d6e4da4f5115"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"a5d85491-414d-4a03-917d-cd1705965e09"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11999"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"a5d85491-414d-4a03-917d-cd1705965e09"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055634Z:a5d85491-414d-4a03-917d-cd1705965e09"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:34 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"573"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128/providers/Microsoft.Maintenance/maintenanceConfigurations/ps5307\"\r\n },\r\n \"id\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps5307\",\r\n \"name\": \"ps5307\",\r\n \"type\": \"Microsoft.Maintenance/configurationAssignments\"\r\n }\r\n ]\r\n}",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps5307?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3NtZHRlc3R3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS9ob3N0R3JvdXBzL3NtZGRoZ3dlc3R1czIvaG9zdHMvc21kZGh3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFpbnRlbmFuY2UvY29uZmlndXJhdGlvbkFzc2lnbm1lbnRzL3BzNTMwNz9hcGktdmVyc2lvbj0yMDE4LTA2LTAxLXByZXZpZXc=",
|
||||
"RequestMethod": "DELETE",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"c3e54e11-6b5b-4380-879d-0308d22ac375"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"12a31e57-146e-4fea-946f-ff9979f2b32e"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-deletes": [
|
||||
"14999"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"12a31e57-146e-4fea-946f-ff9979f2b32e"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055636Z:12a31e57-146e-4fea-946f-ff9979f2b32e"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:35 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128/providers/Microsoft.Maintenance/maintenanceConfigurations/ps5307?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODEyOC9wcm92aWRlcnMvTWljcm9zb2Z0Lk1haW50ZW5hbmNlL21haW50ZW5hbmNlQ29uZmlndXJhdGlvbnMvcHM1MzA3P2FwaS12ZXJzaW9uPTIwMTgtMDYtMDEtcHJldmlldw==",
|
||||
"RequestMethod": "DELETE",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"0256d33b-362f-4cc7-b75c-3e1a535a961b"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"cfe114c1-7bf9-409d-9816-9d296519eff8"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-deletes": [
|
||||
"14998"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"cfe114c1-7bf9-409d-9816-9d296519eff8"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055636Z:cfe114c1-7bf9-409d-9816-9d296519eff8"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:36 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8128?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODEyOD9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "DELETE",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"3753d02d-2f51-46db-bdc3-254a9c148835"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgxMjgtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-deletes": [
|
||||
"14999"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"8cb08470-a10e-412e-85e5-c8d0598a3e86"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"8cb08470-a10e-412e-85e5-c8d0598a3e86"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055637Z:8cb08470-a10e-412e-85e5-c8d0598a3e86"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:36 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgxMjgtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneE1qZ3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgxMjgtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11999"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"13c87831-0328-42c7-9187-4dc4fc7590b0"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"13c87831-0328-42c7-9187-4dc4fc7590b0"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055652Z:13c87831-0328-42c7-9187-4dc4fc7590b0"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:56:52 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgxMjgtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneE1qZ3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgxMjgtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11998"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"118f5198-7dd5-4fa5-9707-525353ba28d3"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"118f5198-7dd5-4fa5-9707-525353ba28d3"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055707Z:118f5198-7dd5-4fa5-9707-525353ba28d3"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:57:07 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgxMjgtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneE1qZ3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11997"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"12d0ea01-1839-4392-927c-bb39ddd0d41d"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"12d0ea01-1839-4392-927c-bb39ddd0d41d"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055722Z:12d0ea01-1839-4392-927c-bb39ddd0d41d"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:57:22 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgxMjgtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneE1qZ3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11996"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"268eb273-1406-4547-9e0e-66714b52755b"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"268eb273-1406-4547-9e0e-66714b52755b"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T055722Z:268eb273-1406-4547-9e0e-66714b52755b"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:57:22 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
}
|
||||
],
|
||||
"Names": {
|
||||
"Test-AzConfigurationAssignment": [
|
||||
"ps8128",
|
||||
"ps5307"
|
||||
]
|
||||
},
|
||||
"Variables": {
|
||||
"SubscriptionId": "42c974dd-2c03-4f1b-96ad-b07f050aaa74"
|
||||
}
|
||||
}
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,779 @@
|
|||
{
|
||||
"Entries": [
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8227?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODIyNz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "PUT",
|
||||
"RequestBody": "{\r\n \"location\": \"westus2\"\r\n}",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"f557fbdf-5ea6-4d6e-be65-ef20f34822f1"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Content-Length": [
|
||||
"29"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-writes": [
|
||||
"1199"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"e96c02bf-4175-437a-8b58-f7aba3fc2c92"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"e96c02bf-4175-437a-8b58-f7aba3fc2c92"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054411Z:e96c02bf-4175-437a-8b58-f7aba3fc2c92"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:11 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"166"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"id\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourceGroups/ps8227\",\r\n \"name\": \"ps8227\",\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}",
|
||||
"StatusCode": 201
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8227/providers/Microsoft.Maintenance/maintenanceConfigurations/ps7059?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODIyNy9wcm92aWRlcnMvTWljcm9zb2Z0Lk1haW50ZW5hbmNlL21haW50ZW5hbmNlQ29uZmlndXJhdGlvbnMvcHM3MDU5P2FwaS12ZXJzaW9uPTIwMTgtMDYtMDEtcHJldmlldw==",
|
||||
"RequestMethod": "PUT",
|
||||
"RequestBody": "{\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"maintenanceScope\": \"Host\"\r\n }\r\n}",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"782c71ca-57a7-4797-bf29-8bd89ff473cd"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Content-Length": [
|
||||
"86"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"159d8fe5-89da-4f19-83f4-f948bd974dd3"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-writes": [
|
||||
"1199"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"159d8fe5-89da-4f19-83f4-f948bd974dd3"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054412Z:159d8fe5-89da-4f19-83f4-f948bd974dd3"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:12 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"396"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"location\": \"westus2\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"extensionProperties\": {},\r\n \"maintenanceScope\": \"Host\"\r\n },\r\n \"maintenanceWindows\": [],\r\n \"id\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8227/providers/Microsoft.Maintenance/maintenanceConfigurations/ps7059\",\r\n \"name\": \"ps7059\",\r\n \"type\": \"Microsoft.Maintenance/maintenanceConfigurations\"\r\n}",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps7059?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3NtZHRlc3R3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS9ob3N0R3JvdXBzL3NtZGRoZ3dlc3R1czIvaG9zdHMvc21kZGh3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFpbnRlbmFuY2UvY29uZmlndXJhdGlvbkFzc2lnbm1lbnRzL3BzNzA1OT9hcGktdmVyc2lvbj0yMDE4LTA2LTAxLXByZXZpZXc=",
|
||||
"RequestMethod": "PUT",
|
||||
"RequestBody": "{\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8227/providers/Microsoft.Maintenance/maintenanceConfigurations/ps7059\"\r\n }\r\n}",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"85ca3d85-5349-4f4d-a9bb-49d12b5bf361"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Content-Length": [
|
||||
"230"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"d078d1c2-fd60-4fe4-84af-c957f4115cb5"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-writes": [
|
||||
"1198"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"d078d1c2-fd60-4fe4-84af-c957f4115cb5"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054415Z:d078d1c2-fd60-4fe4-84af-c957f4115cb5"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:15 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"601"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"location\": \"westus2\",\r\n \"properties\": {\r\n \"maintenanceConfigurationId\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8227/providers/Microsoft.Maintenance/maintenanceConfigurations/ps7059\",\r\n \"resourceId\": \"7b32ed22-dc7b-4a17-9c42-36c024f4c9f9\"\r\n },\r\n \"id\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps7059\",\r\n \"name\": \"ps7059\",\r\n \"type\": \"Microsoft.Maintenance/configurationAssignments\"\r\n}",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/updates?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3NtZHRlc3R3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS9ob3N0R3JvdXBzL3NtZGRoZ3dlc3R1czIvaG9zdHMvc21kZGh3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFpbnRlbmFuY2UvdXBkYXRlcz9hcGktdmVyc2lvbj0yMDE4LTA2LTAxLXByZXZpZXc=",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"d3e74d39-a7c9-427d-a1c2-0cbe611ed3d9"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"bbe799ea-d30e-41db-9fca-dd11c2bb6a1c"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11999"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"bbe799ea-d30e-41db-9fca-dd11c2bb6a1c"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054415Z:bbe799ea-d30e-41db-9fca-dd11c2bb6a1c"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:15 GMT"
|
||||
],
|
||||
"Content-Length": [
|
||||
"427"
|
||||
],
|
||||
"Content-Type": [
|
||||
"application/json; charset=utf-8"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"maintenanceScope\": \"Host\",\r\n \"impactType\": \"Freeze\",\r\n \"status\": \"Pending\",\r\n \"impactDurationInSec\": 9,\r\n \"notBefore\": \"2019-12-06T20:53:46.9891398Z\",\r\n \"properties\": {\r\n \"resourceId\": \"/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2\"\r\n }\r\n }\r\n ]\r\n}",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps7059?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3NtZHRlc3R3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29tcHV0ZS9ob3N0R3JvdXBzL3NtZGRoZ3dlc3R1czIvaG9zdHMvc21kZGh3ZXN0dXMyL3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFpbnRlbmFuY2UvY29uZmlndXJhdGlvbkFzc2lnbm1lbnRzL3BzNzA1OT9hcGktdmVyc2lvbj0yMDE4LTA2LTAxLXByZXZpZXc=",
|
||||
"RequestMethod": "DELETE",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"000cf29f-1d20-4c4a-9b10-8894c5b521d2"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"9ca6e93c-e530-412b-bbed-9adc98dabf15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-deletes": [
|
||||
"14999"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"9ca6e93c-e530-412b-bbed-9adc98dabf15"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054417Z:9ca6e93c-e530-412b-bbed-9adc98dabf15"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:16 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8227/providers/Microsoft.Maintenance/maintenanceConfigurations/ps7059?api-version=2018-06-01-preview",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODIyNy9wcm92aWRlcnMvTWljcm9zb2Z0Lk1haW50ZW5hbmNlL21haW50ZW5hbmNlQ29uZmlndXJhdGlvbnMvcHM3MDU5P2FwaS12ZXJzaW9uPTIwMTgtMDYtMDEtcHJldmlldw==",
|
||||
"RequestMethod": "DELETE",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"4d9c4280-1a4b-49a1-b658-aa6af4e8d17e"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Maintenance.MaintenanceManagementClient/1.0.0"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"0d02c229-58c7-4df5-af40-be9ad69174ac"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-deletes": [
|
||||
"14998"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"0d02c229-58c7-4df5-af40-be9ad69174ac"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054417Z:0d02c229-58c7-4df5-af40-be9ad69174ac"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:17 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps8227?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L3Jlc291cmNlZ3JvdXBzL3BzODIyNz9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "DELETE",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"x-ms-client-request-id": [
|
||||
"cc20a8ff-3e1f-458b-8ac7-7dad9d693f69"
|
||||
],
|
||||
"Accept-Language": [
|
||||
"en-US"
|
||||
],
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-deletes": [
|
||||
"14999"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"becf3033-ba5a-487b-81e7-db6a4b3521ff"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"becf3033-ba5a-487b-81e7-db6a4b3521ff"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054418Z:becf3033-ba5a-487b-81e7-db6a4b3521ff"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:17 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneU1qY3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11999"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"42985247-a92d-4e8a-bbe1-569b7681600d"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"42985247-a92d-4e8a-bbe1-569b7681600d"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054433Z:42985247-a92d-4e8a-bbe1-569b7681600d"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:32 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneU1qY3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11998"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"30818836-d92e-4d8b-9ca0-b788bf68d075"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"30818836-d92e-4d8b-9ca0-b788bf68d075"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054448Z:30818836-d92e-4d8b-9ca0-b788bf68d075"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:44:47 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneU1qY3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11997"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"545b645b-750d-4e2f-9eed-141b0b578685"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"545b645b-750d-4e2f-9eed-141b0b578685"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054503Z:545b645b-750d-4e2f-9eed-141b0b578685"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:45:03 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneU1qY3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"Location": [
|
||||
"https://management.azure.com/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01"
|
||||
],
|
||||
"Retry-After": [
|
||||
"15"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11996"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"17590fac-5c9c-4cf8-aa67-8690fdf28c8e"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"17590fac-5c9c-4cf8-aa67-8690fdf28c8e"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054518Z:17590fac-5c9c-4cf8-aa67-8690fdf28c8e"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:45:18 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 202
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneU1qY3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11995"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"a1c44fc6-62c9-4faa-936a-711a63de2380"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"a1c44fc6-62c9-4faa-936a-711a63de2380"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054534Z:a1c44fc6-62c9-4faa-936a-711a63de2380"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:45:33 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
},
|
||||
{
|
||||
"RequestUri": "/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzgyMjctV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2016-09-01",
|
||||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNDJjOTc0ZGQtMmMwMy00ZjFiLTk2YWQtYjA3ZjA1MGFhYTc0L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpneU1qY3RWMFZUVkZWVE1pSXNJbXB2WWt4dlkyRjBhVzl1SWpvaWQyVnpkSFZ6TWlKOT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx",
|
||||
"RequestMethod": "GET",
|
||||
"RequestBody": "",
|
||||
"RequestHeaders": {
|
||||
"User-Agent": [
|
||||
"FxVersion/4.6.28008.01",
|
||||
"OSName/Windows",
|
||||
"OSVersion/Microsoft.Windows.10.0.18362.",
|
||||
"Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.2"
|
||||
]
|
||||
},
|
||||
"ResponseHeaders": {
|
||||
"Cache-Control": [
|
||||
"no-cache"
|
||||
],
|
||||
"Pragma": [
|
||||
"no-cache"
|
||||
],
|
||||
"x-ms-ratelimit-remaining-subscription-reads": [
|
||||
"11994"
|
||||
],
|
||||
"x-ms-request-id": [
|
||||
"3cb4c769-21a0-4171-9407-7ee5c056ec18"
|
||||
],
|
||||
"x-ms-correlation-request-id": [
|
||||
"3cb4c769-21a0-4171-9407-7ee5c056ec18"
|
||||
],
|
||||
"x-ms-routing-request-id": [
|
||||
"WESTUS:20191108T054534Z:3cb4c769-21a0-4171-9407-7ee5c056ec18"
|
||||
],
|
||||
"Strict-Transport-Security": [
|
||||
"max-age=31536000; includeSubDomains"
|
||||
],
|
||||
"X-Content-Type-Options": [
|
||||
"nosniff"
|
||||
],
|
||||
"Date": [
|
||||
"Fri, 08 Nov 2019 05:45:33 GMT"
|
||||
],
|
||||
"Expires": [
|
||||
"-1"
|
||||
],
|
||||
"Content-Length": [
|
||||
"0"
|
||||
]
|
||||
},
|
||||
"ResponseBody": "",
|
||||
"StatusCode": 200
|
||||
}
|
||||
],
|
||||
"Names": {
|
||||
"Test-AzMaintenanceUpdate": [
|
||||
"ps8227",
|
||||
"ps7059",
|
||||
"ps8286"
|
||||
]
|
||||
},
|
||||
"Variables": {
|
||||
"SubscriptionId": "42c974dd-2c03-4f1b-96ad-b07f050aaa74"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2042
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maintenance", "Maintenance\Maintenance.csproj", "{0E11B67A-1257-40D0-BD33-8315759FDB01}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{254150A6-D7EB-4D1B-9EB1-15B836D6F493}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maintenance.Test", "Maintenance.Test\Maintenance.Test.csproj", "{F5D771BE-9C6B-4AF9-AC41-B2D7F3267868}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{3E016018-D65D-4336-9F64-17DA97783AD0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScenarioTest.ResourceManager", "..\..\tools\ScenarioTest.ResourceManager\ScenarioTest.ResourceManager.csproj", "{F83FBA8D-732D-437C-A0E2-02E45B01E123}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFx", "..\..\tools\TestFx\TestFx.csproj", "{BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0E11B67A-1257-40D0-BD33-8315759FDB01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0E11B67A-1257-40D0-BD33-8315759FDB01}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0E11B67A-1257-40D0-BD33-8315759FDB01}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0E11B67A-1257-40D0-BD33-8315759FDB01}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F5D771BE-9C6B-4AF9-AC41-B2D7F3267868}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F5D771BE-9C6B-4AF9-AC41-B2D7F3267868}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F5D771BE-9C6B-4AF9-AC41-B2D7F3267868}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F5D771BE-9C6B-4AF9-AC41-B2D7F3267868}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3E016018-D65D-4336-9F64-17DA97783AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3E016018-D65D-4336-9F64-17DA97783AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3E016018-D65D-4336-9F64-17DA97783AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3E016018-D65D-4336-9F64-17DA97783AD0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F83FBA8D-732D-437C-A0E2-02E45B01E123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F83FBA8D-732D-437C-A0E2-02E45B01E123}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F83FBA8D-732D-437C-A0E2-02E45B01E123}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F83FBA8D-732D-437C-A0E2-02E45B01E123}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BC80A1D0-FFA4-43D9-AA74-799F5CB54B58}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{F5D771BE-9C6B-4AF9-AC41-B2D7F3267868} = {254150A6-D7EB-4D1B-9EB1-15B836D6F493}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {3555524E-A7CA-4A4B-B228-08B2ED034EC5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,106 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ApplyUpdate", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
|
||||
[OutputType(typeof(PSApplyUpdate))]
|
||||
public partial class NewAzureRmApplyUpdate : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
if (ShouldProcess("default", VerbsCommon.New))
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string providerName = this.ProviderName;
|
||||
string resourceParentType = this.ResourceParentType;
|
||||
string resourceParentName = this.ResourceParentName;
|
||||
string resourceType = this.ResourceType;
|
||||
string resourceName = this.ResourceName;
|
||||
|
||||
var result = (!string.IsNullOrEmpty(resourceParentType) && !string.IsNullOrEmpty(resourceParentName)) ?
|
||||
ApplyUpdatesClient.CreateOrUpdateParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType, resourceName) :
|
||||
ApplyUpdatesClient.CreateOrUpdate(resourceGroupName, providerName, resourceType, resourceName);
|
||||
|
||||
var psObject = new PSApplyUpdate();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<ApplyUpdate, PSApplyUpdate>(result, psObject);
|
||||
WriteObject(psObject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource provider Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ProviderName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 3,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceName { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
|
||||
public SwitchParameter AsJob { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ApplyUpdate", DefaultParameterSetName = "DefaultParameter")]
|
||||
[OutputType(typeof(PSApplyUpdate))]
|
||||
public partial class GetAzureRmApplyUpdate : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string resourceParentType = this.ResourceParentType;
|
||||
string resourceParentName = this.ResourceParentName;
|
||||
string providerName = this.ProviderName;
|
||||
string resourceType = this.ResourceType;
|
||||
string resourceName = this.ResourceName;
|
||||
string applyUpdateName = this.ApplyUpdateName;
|
||||
|
||||
var result = (!string.IsNullOrEmpty(resourceParentType) && !string.IsNullOrEmpty(resourceParentName)) ?
|
||||
ApplyUpdatesClient.GetParent(resourceGroupName, resourceParentType, resourceParentName, providerName, resourceType, resourceName, applyUpdateName) :
|
||||
ApplyUpdatesClient.Get(resourceGroupName, providerName, resourceType, resourceName, applyUpdateName);
|
||||
|
||||
var psObject = new PSApplyUpdate();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<ApplyUpdate, PSApplyUpdate>(result, psObject);
|
||||
WriteObject(psObject);
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource provider Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ProviderName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 3,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = true,
|
||||
HelpMessage = "The apply update resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ApplyUpdateName { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
#
|
||||
# Module manifest for module 'PSGet_Az.ContainerInstance'
|
||||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 4/4/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
||||
# Script module or binary module file associated with this manifest.
|
||||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '0.1.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '4c06e8d3-d64f-4497-8574-16e0c9dfebb2'
|
||||
|
||||
# Author of this module
|
||||
Author = 'Microsoft Corporation'
|
||||
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'Microsoft Corporation'
|
||||
|
||||
# Copyright statement for this module
|
||||
Copyright = 'Microsoft Corporation. All rights reserved.'
|
||||
|
||||
# Description of the functionality provided by this module
|
||||
Description = 'Microsoft Azure PowerShell - Maintenance cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
|
||||
|
||||
For more information on Maintenance, please visit the following: https://docs.microsoft.com/azure/maintenance/'
|
||||
|
||||
# Minimum version of the PowerShell engine required by this module
|
||||
PowerShellVersion = '5.1'
|
||||
|
||||
# Name of the PowerShell host required by this module
|
||||
# PowerShellHostName = ''
|
||||
|
||||
# Minimum version of the PowerShell host required by this module
|
||||
# PowerShellHostVersion = ''
|
||||
|
||||
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
DotNetFrameworkVersion = '4.7.2'
|
||||
|
||||
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
|
||||
# CLRVersion = ''
|
||||
|
||||
# Processor architecture (None, X86, Amd64) required by this module
|
||||
# ProcessorArchitecture = ''
|
||||
|
||||
# Modules that must be imported into the global environment prior to importing this module
|
||||
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '1.6.4'; })
|
||||
|
||||
# Assemblies that must be loaded prior to importing this module
|
||||
RequiredAssemblies = '.\AutoMapper.dll',
|
||||
'.\Microsoft.Azure.Management.Maintenance.dll'
|
||||
|
||||
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
|
||||
# ScriptsToProcess = @()
|
||||
|
||||
# Type files (.ps1xml) to be loaded when importing this module
|
||||
# TypesToProcess = @()
|
||||
|
||||
# Format files (.ps1xml) to be loaded when importing this module
|
||||
FormatsToProcess = '.\Maintenance.format.ps1xml'
|
||||
|
||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
||||
NestedModules = @('.\Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll')
|
||||
|
||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||
FunctionsToExport = @()
|
||||
|
||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||
CmdletsToExport = 'Get-AzApplyUpdate','Get-AzConfigurationAssignment', 'Get-AzMaintenanceConfiguration', 'Get-AzMaintenanceUpdate',
|
||||
'New-AzApplyUpdate', 'New-AzConfigurationAssignment', 'New-AzMaintenanceConfiguration',
|
||||
'Remove-AzConfigurationAssignment', 'Remove-AzMaintenanceConfiguration',
|
||||
'Update-AzMaintenanceConfiguration'
|
||||
|
||||
# Variables to export from this module
|
||||
# VariablesToExport = @()
|
||||
|
||||
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
|
||||
AliasesToExport = @()
|
||||
|
||||
# DSC resources to export from this module
|
||||
# DscResourcesToExport = @()
|
||||
|
||||
# List of all modules packaged with this module
|
||||
# ModuleList = @()
|
||||
|
||||
# List of all files packaged with this module
|
||||
# FileList = @()
|
||||
|
||||
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
|
||||
PrivateData = @{
|
||||
|
||||
PSData = @{
|
||||
|
||||
# Tags applied to this module. These help with module discovery in online galleries.
|
||||
Tags = 'Azure','ResourceManager','ARM','Maintenance'
|
||||
|
||||
# A URL to the license for this module.
|
||||
LicenseUri = 'https://aka.ms/azps-license'
|
||||
|
||||
# A URL to the main website for this project.
|
||||
ProjectUri = 'https://github.com/Azure/azure-powershell'
|
||||
|
||||
# A URL to an icon representing this module.
|
||||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Adding support for Azure Maintenance using powershell'
|
||||
|
||||
# Prerelease string of this module
|
||||
Prerelease = 'preview'
|
||||
|
||||
# Flag to indicate whether the module requires explicit user acceptance for install/update
|
||||
# RequireLicenseAcceptance = $false
|
||||
|
||||
# External dependent modules of this module
|
||||
# ExternalModuleDependencies = @()
|
||||
|
||||
} # End of PSData hashtable
|
||||
|
||||
} # End of PrivateData hashtable
|
||||
|
||||
# HelpInfo URI of this module
|
||||
# HelpInfoURI = ''
|
||||
|
||||
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
||||
# DefaultCommandPrefix = ''
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<!--
|
||||
Please leave this section at the top of the change log.
|
||||
|
||||
Changes for the upcoming release should go under the section titled "Upcoming Release", and should adhere to the following format:
|
||||
|
||||
## Upcoming Release
|
||||
* Overview of change #1
|
||||
- Additional information about change #1
|
||||
* Overview of change #2
|
||||
- Additional information about change #2
|
||||
- Additional information about change #2
|
||||
* Overview of change #3
|
||||
* Overview of change #4
|
||||
- Additional information about change #4
|
||||
|
||||
## YYYY.MM.DD - Version X.Y.Z (Previous Release)
|
||||
* Overview of change #1
|
||||
- Additional information about change #1
|
||||
-->
|
||||
|
||||
## Upcoming Release
|
||||
* Preview release of `Az.Maintenance` module
|
||||
|
||||
## Version 0.1.0
|
||||
|
|
@ -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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Common
|
||||
{
|
||||
public static class HashTableExtensions
|
||||
{
|
||||
public static Dictionary<string, string> ToDictionary(this Hashtable tags)
|
||||
{
|
||||
return TagsConversionHelper.CreateTagDictionary(tags, true);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Common.Authentication;
|
||||
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
|
||||
using Microsoft.Azure.Commands.Common.Authentication.Models;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
public class MaintenanceClient
|
||||
{
|
||||
public IMaintenanceManagementClient MaintenanceManagementClient { get; private set; }
|
||||
|
||||
public Action<string> VerboseLogger { get; set; }
|
||||
|
||||
public Action<string> ErrorLogger { get; set; }
|
||||
|
||||
public MaintenanceClient(IAzureContext context)
|
||||
: this(AzureSession.Instance.ClientFactory.CreateArmClient<MaintenanceManagementClient>(
|
||||
context, AzureEnvironment.Endpoint.ResourceManager))
|
||||
{
|
||||
}
|
||||
|
||||
public MaintenanceClient(IMaintenanceManagementClient maintenancManagementClient)
|
||||
{
|
||||
MaintenanceManagementClient = maintenancManagementClient;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Management.Automation;
|
||||
using System.Text.RegularExpressions;
|
||||
using Microsoft.Azure.Commands.Maintenance.Common;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
public abstract class MaintenanceClientBaseCmdlet : AzureRMCmdlet
|
||||
{
|
||||
protected const string VirtualMachineExtensionType = "Microsoft.Maintenance/virtualMachines/extensions";
|
||||
|
||||
protected override bool IsUsageMetricEnabled => true;
|
||||
protected DateTime StartTime;
|
||||
|
||||
private MaintenanceClient computeClient;
|
||||
|
||||
public MaintenanceClient MaintenanceClient
|
||||
{
|
||||
get
|
||||
{
|
||||
if (computeClient == null)
|
||||
{
|
||||
computeClient = new MaintenanceClient(DefaultProfile.DefaultContext);
|
||||
}
|
||||
|
||||
this.computeClient.VerboseLogger = WriteVerboseWithTimestamp;
|
||||
this.computeClient.ErrorLogger = WriteErrorWithTimestamp;
|
||||
return computeClient;
|
||||
}
|
||||
|
||||
set { computeClient = value; }
|
||||
}
|
||||
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
StartTime = DateTime.Now;
|
||||
base.ExecuteCmdlet();
|
||||
}
|
||||
|
||||
protected void ExecuteClientAction(Action action)
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
catch (Rest.Azure.CloudException ex)
|
||||
{
|
||||
try
|
||||
{
|
||||
base.EndProcessing();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Ignore exceptions during end processing
|
||||
}
|
||||
|
||||
throw new MaintenanceCloudException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
protected void ThrowInvalidArgumentError(string errorMessage, string arg)
|
||||
{
|
||||
ThrowTerminatingError
|
||||
(new ErrorRecord(
|
||||
new ArgumentException(string.Format(CultureInfo.InvariantCulture,
|
||||
errorMessage, arg)),
|
||||
"InvalidArgument",
|
||||
ErrorCategory.InvalidArgument,
|
||||
null));
|
||||
}
|
||||
|
||||
protected string GetDiskNameFromId(string Id)
|
||||
{
|
||||
return Id.Substring(Id.LastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
public static string GetOperationIdFromUrlString(string Url)
|
||||
{
|
||||
Regex r = new Regex(@"(.*?)operations/(?<id>[a-f0-9]{8}[-]([a-f0-9]{4}[-]){3}[a-f0-9]{12})", RegexOptions.IgnoreCase);
|
||||
Match m = r.Match(Url);
|
||||
return m.Success ? m.Groups["id"].Value : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Common
|
||||
{
|
||||
public class MaintenanceCloudException : Rest.Azure.CloudException
|
||||
{
|
||||
protected const string RequestIdHeaderInResponse = "x-ms-request-id";
|
||||
|
||||
public MaintenanceCloudException(Rest.Azure.CloudException ex)
|
||||
: base(GetErrorMessageWithRequestIdInfo(ex), ex)
|
||||
{
|
||||
}
|
||||
|
||||
protected static string GetErrorMessageWithRequestIdInfo(Rest.Azure.CloudException cloudException)
|
||||
{
|
||||
if (cloudException == null)
|
||||
{
|
||||
return "No information in the cloud exception.";
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
|
||||
if (!string.IsNullOrEmpty(cloudException.Message))
|
||||
{
|
||||
sb.Append(cloudException.Message);
|
||||
}
|
||||
|
||||
if (cloudException.Response == null)
|
||||
{
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
if (!cloudException.Response.StatusCode.Equals(HttpStatusCode.OK))
|
||||
{
|
||||
sb.AppendLine().AppendFormat("StatusCode: {0}", cloudException.Response.StatusCode.GetHashCode());
|
||||
sb.AppendLine().AppendFormat("ReasonPhrase: {0}", cloudException.Response.ReasonPhrase);
|
||||
if (cloudException.Response.Headers == null
|
||||
|| !cloudException.Response.Headers.ContainsKey(RequestIdHeaderInResponse))
|
||||
{
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
string operationId = cloudException.RequestId;
|
||||
|
||||
sb.AppendLine().AppendFormat(
|
||||
"OperationID : {0}",
|
||||
operationId);
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ConfigurationAssignment", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
|
||||
[OutputType(typeof(PSConfigurationAssignment))]
|
||||
public partial class NewAzureRmConfigurationAssignment : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
if (ShouldProcess(this.ConfigurationAssignmentName, VerbsCommon.New))
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string providerName = this.ProviderName;
|
||||
string resourceParentType = this.ResourceParentType;
|
||||
string resourceParentName = this.ResourceParentName;
|
||||
string resourceType = this.ResourceType;
|
||||
string resourceName = this.ResourceName;
|
||||
string configurationAssignmentName = this.ConfigurationAssignmentName;
|
||||
var configurationAssignment = new ConfigurationAssignment();
|
||||
configurationAssignment.ResourceId = this.ResourceId;
|
||||
|
||||
configurationAssignment.Location = this.Location;
|
||||
configurationAssignment.MaintenanceConfigurationId = this.MaintenanceConfigurationId;
|
||||
|
||||
var result = (!string.IsNullOrEmpty(resourceParentType) && !string.IsNullOrEmpty(resourceParentName)) ?
|
||||
ConfigurationAssignmentsClient.CreateOrUpdateParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType, resourceName, configurationAssignmentName, configurationAssignment) :
|
||||
ConfigurationAssignmentsClient.CreateOrUpdate(resourceGroupName, providerName, resourceType, resourceName, configurationAssignmentName, configurationAssignment);
|
||||
|
||||
var psObject = new PSConfigurationAssignment();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<ConfigurationAssignment, PSConfigurationAssignment>(result, psObject);
|
||||
WriteObject(psObject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource provider Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ProviderName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 3,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = true,
|
||||
HelpMessage = "The configuration assignment name, should match the MaintenanceConfigurationName.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ConfigurationAssignmentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
HelpMessage = "The configuration assignment name, should match the MaintenanceConfigurationName.",
|
||||
Mandatory = false)]
|
||||
public string ResourceId { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
HelpMessage = "The location without spaces for the resource.",
|
||||
Mandatory = true)]
|
||||
public string Location { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
HelpMessage = "The fully qualified MaintenanceConfiguration.",
|
||||
Mandatory = true)]
|
||||
public string MaintenanceConfigurationId { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
|
||||
public SwitchParameter AsJob { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ConfigurationAssignment", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
|
||||
[OutputType(typeof(bool))]
|
||||
public partial class RemoveAzureRmConfigurationAssignment : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
if (ShouldProcess(this.ConfigurationAssignmentName, VerbsCommon.Remove)
|
||||
&& (this.Force.IsPresent ||
|
||||
this.ShouldContinue(Properties.Resources.ResourceRemovalConfirmation,
|
||||
"Remove-AzConfigurationAssignment operation")))
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string providerName = this.ProviderName;
|
||||
string resourceParentType = this.ResourceParentType;
|
||||
string resourceParentName = this.ResourceParentName;
|
||||
string resourceType = this.ResourceType;
|
||||
string resourceName = this.ResourceName;
|
||||
string configurationAssignmentName = this.ConfigurationAssignmentName;
|
||||
|
||||
if (!string.IsNullOrEmpty(resourceParentType) && !string.IsNullOrEmpty(resourceParentName))
|
||||
{
|
||||
ConfigurationAssignmentsClient.DeleteParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType, resourceName, configurationAssignmentName);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConfigurationAssignmentsClient.Delete(resourceGroupName, providerName, resourceType, resourceName, configurationAssignmentName);
|
||||
}
|
||||
|
||||
if (this.PassThru.IsPresent)
|
||||
{
|
||||
this.WriteObject(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource provider Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ProviderName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 3,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = true,
|
||||
HelpMessage = "The configuration assignment name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ConfigurationAssignmentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
HelpMessage = "Force remove without confirmation.",
|
||||
Mandatory = false)]
|
||||
public SwitchParameter Force { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
|
||||
public SwitchParameter AsJob { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Returns the status of the Remove operation. By default, this cmdlet does not generate any output.")]
|
||||
public SwitchParameter PassThru { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ConfigurationAssignment", DefaultParameterSetName = "DefaultParameter")]
|
||||
[OutputType(typeof(PSConfigurationAssignment))]
|
||||
public partial class GetAzureRmConfigurationAssignment : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string providerName = this.ProviderName;
|
||||
string resourceParentType = this.ResourceParentType;
|
||||
string resourceParentName = this.ResourceParentName;
|
||||
string resourceType = this.ResourceType;
|
||||
string resourceName = this.ResourceName;
|
||||
|
||||
var result = (!string.IsNullOrEmpty(resourceParentType) && !string.IsNullOrEmpty(resourceParentName)) ?
|
||||
ConfigurationAssignmentsClient.ListParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType, resourceName) :
|
||||
ConfigurationAssignmentsClient.List(resourceGroupName, providerName, resourceType, resourceName);
|
||||
|
||||
var psObject = new List<PSConfigurationAssignment>();
|
||||
|
||||
foreach (var configurationAssignment in result)
|
||||
{
|
||||
PSConfigurationAssignment psConfigurationAssignment = new PSConfigurationAssignment();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<ConfigurationAssignment, PSConfigurationAssignment>(configurationAssignment, psConfigurationAssignment);
|
||||
psObject.Add(psConfigurationAssignment);
|
||||
}
|
||||
|
||||
WriteObject(psObject);
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource provider Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ProviderName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 3,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceName { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<PsModuleName>Maintenance</PsModuleName>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>$(LegacyAssemblyPrefix)$(PsModuleName)</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="6.2.2" />
|
||||
<PackageReference Include="Microsoft.Azure.Management.Maintenance" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="help\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
//
|
||||
// Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
// Warning: This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if the
|
||||
// code is regenerated.
|
||||
-->
|
||||
<Configuration>
|
||||
<ViewDefinitions>
|
||||
<View>
|
||||
<Name>Microsoft.Azure.Commands.Maintenance.Models.PSApplyUpdate</Name>
|
||||
<ViewSelectedBy>
|
||||
<TypeName>Microsoft.Azure.Commands.Maintenance.Models.PSApplyUpdate</TypeName>
|
||||
</ViewSelectedBy>
|
||||
<CustomControl>
|
||||
<CustomEntries>
|
||||
<CustomEntry>
|
||||
<CustomItem>
|
||||
<ExpressionBinding>
|
||||
<ScriptBlock>[Microsoft.Azure.Commands.Maintenance.MaintenanceAutomationBaseCmdlet]::FormatObject($_)</ScriptBlock>
|
||||
</ExpressionBinding>
|
||||
</CustomItem>
|
||||
</CustomEntry>
|
||||
</CustomEntries>
|
||||
</CustomControl>
|
||||
</View>
|
||||
<View>
|
||||
<Name>Microsoft.Azure.Commands.Maintenance.Models.PSConfigurationAssignment</Name>
|
||||
<ViewSelectedBy>
|
||||
<TypeName>Microsoft.Azure.Commands.Maintenance.Models.PSConfigurationAssignment</TypeName>
|
||||
</ViewSelectedBy>
|
||||
<CustomControl>
|
||||
<CustomEntries>
|
||||
<CustomEntry>
|
||||
<CustomItem>
|
||||
<ExpressionBinding>
|
||||
<ScriptBlock>[Microsoft.Azure.Commands.Maintenance.MaintenanceAutomationBaseCmdlet]::FormatObject($_)</ScriptBlock>
|
||||
</ExpressionBinding>
|
||||
</CustomItem>
|
||||
</CustomEntry>
|
||||
</CustomEntries>
|
||||
</CustomControl>
|
||||
</View>
|
||||
<View>
|
||||
<Name>Microsoft.Azure.Commands.Maintenance.Models.PSMaintenanceConfiguration</Name>
|
||||
<ViewSelectedBy>
|
||||
<TypeName>Microsoft.Azure.Commands.Maintenance.Models.PSMaintenanceConfiguration</TypeName>
|
||||
</ViewSelectedBy>
|
||||
<CustomControl>
|
||||
<CustomEntries>
|
||||
<CustomEntry>
|
||||
<CustomItem>
|
||||
<ExpressionBinding>
|
||||
<ScriptBlock>[Microsoft.Azure.Commands.Maintenance.MaintenanceAutomationBaseCmdlet]::FormatObject($_)</ScriptBlock>
|
||||
</ExpressionBinding>
|
||||
</CustomItem>
|
||||
</CustomEntry>
|
||||
</CustomEntries>
|
||||
</CustomControl>
|
||||
</View>
|
||||
<View>
|
||||
<Name>Microsoft.Azure.Commands.Maintenance.Models.PSUpdate</Name>
|
||||
<ViewSelectedBy>
|
||||
<TypeName>Microsoft.Azure.Commands.Maintenance.Models.PSUpdate</TypeName>
|
||||
</ViewSelectedBy>
|
||||
<CustomControl>
|
||||
<CustomEntries>
|
||||
<CustomEntry>
|
||||
<CustomItem>
|
||||
<ExpressionBinding>
|
||||
<ScriptBlock>[Microsoft.Azure.Commands.Maintenance.MaintenanceAutomationBaseCmdlet]::FormatObject($_)</ScriptBlock>
|
||||
</ExpressionBinding>
|
||||
</CustomItem>
|
||||
</CustomEntry>
|
||||
</CustomEntries>
|
||||
</CustomControl>
|
||||
</View>
|
||||
</ViewDefinitions>
|
||||
</Configuration>
|
|
@ -0,0 +1,281 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
public abstract class MaintenanceAutomationBaseCmdlet : Microsoft.Azure.Commands.Maintenance.MaintenanceClientBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
}
|
||||
|
||||
protected static PSArgument[] ConvertFromObjectsToArguments(string[] names, object[] objects)
|
||||
{
|
||||
var arguments = new PSArgument[objects.Length];
|
||||
|
||||
for (int index = 0; index < objects.Length; index++)
|
||||
{
|
||||
arguments[index] = new PSArgument
|
||||
{
|
||||
Name = names[index],
|
||||
Type = objects[index].GetType(),
|
||||
Value = objects[index]
|
||||
};
|
||||
}
|
||||
|
||||
return arguments;
|
||||
}
|
||||
|
||||
protected static object[] ConvertFromArgumentsToObjects(object[] arguments)
|
||||
{
|
||||
if (arguments == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var objects = new object[arguments.Length];
|
||||
|
||||
for (int index = 0; index < arguments.Length; index++)
|
||||
{
|
||||
if (arguments[index] is PSArgument)
|
||||
{
|
||||
objects[index] = ((PSArgument)arguments[index]).Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
objects[index] = arguments[index];
|
||||
}
|
||||
}
|
||||
|
||||
return objects;
|
||||
}
|
||||
|
||||
public IApplyUpdatesOperations ApplyUpdatesClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return MaintenanceClient.MaintenanceManagementClient.ApplyUpdates;
|
||||
}
|
||||
}
|
||||
|
||||
public IConfigurationAssignmentsOperations ConfigurationAssignmentsClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return MaintenanceClient.MaintenanceManagementClient.ConfigurationAssignments;
|
||||
}
|
||||
}
|
||||
|
||||
public IMaintenanceConfigurationsOperations MaintenanceConfigurationsClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return MaintenanceClient.MaintenanceManagementClient.MaintenanceConfigurations;
|
||||
}
|
||||
}
|
||||
|
||||
public IUpdatesOperations UpdatesClient
|
||||
{
|
||||
get
|
||||
{
|
||||
return MaintenanceClient.MaintenanceManagementClient.Updates;
|
||||
}
|
||||
}
|
||||
|
||||
public static string FormatObject(Object obj)
|
||||
{
|
||||
var objType = obj.GetType();
|
||||
|
||||
System.Reflection.PropertyInfo[] pros = objType.GetProperties();
|
||||
string result = "\n";
|
||||
var resultTuples = new List<Tuple<string, string, int>>();
|
||||
var totalTab = GetTabLength(obj, 0, 0, resultTuples) + 1;
|
||||
foreach (var t in resultTuples)
|
||||
{
|
||||
string preTab = new string(' ', t.Item3 * 2);
|
||||
string postTab = new string(' ', totalTab - t.Item3 * 2 - t.Item1.Length);
|
||||
|
||||
result += preTab + t.Item1 + postTab + ": " + t.Item2 + "\n";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static int GetTabLength(Object obj, int max, int depth, List<Tuple<string, string, int>> tupleList)
|
||||
{
|
||||
var objType = obj.GetType();
|
||||
var propertySet = new List<PropertyInfo>();
|
||||
if (objType.BaseType != null)
|
||||
{
|
||||
foreach (var property in objType.BaseType.GetProperties())
|
||||
{
|
||||
propertySet.Add(property);
|
||||
}
|
||||
}
|
||||
foreach (var property in objType.GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public))
|
||||
{
|
||||
propertySet.Add(property);
|
||||
}
|
||||
|
||||
foreach (var property in propertySet)
|
||||
{
|
||||
Object childObject = property.GetValue(obj, null);
|
||||
|
||||
var isJObject = childObject as Newtonsoft.Json.Linq.JObject;
|
||||
if (isJObject != null)
|
||||
{
|
||||
var objStringValue = Newtonsoft.Json.JsonConvert.SerializeObject(childObject);
|
||||
|
||||
int i = objStringValue.IndexOf("xmlCfg");
|
||||
if (i >= 0)
|
||||
{
|
||||
var xmlCfgString = objStringValue.Substring(i + 7);
|
||||
int start = xmlCfgString.IndexOf('"');
|
||||
int end = xmlCfgString.IndexOf('"', start + 1);
|
||||
xmlCfgString = xmlCfgString.Substring(start + 1, end - start - 1);
|
||||
objStringValue = objStringValue.Replace(xmlCfgString, "...");
|
||||
}
|
||||
|
||||
tupleList.Add(MakeTuple(property.Name, objStringValue, depth));
|
||||
max = Math.Max(max, depth * 2 + property.Name.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
var elem = childObject as IList;
|
||||
if (elem != null)
|
||||
{
|
||||
if (elem.Count != 0)
|
||||
{
|
||||
max = Math.Max(max, depth * 2 + property.Name.Length + 4);
|
||||
for (int i = 0; i < elem.Count; i++)
|
||||
{
|
||||
Type propType = elem[i].GetType();
|
||||
|
||||
if (propType.IsSerializable || propType.Equals(typeof(Newtonsoft.Json.Linq.JObject)))
|
||||
{
|
||||
tupleList.Add(MakeTuple(property.Name + "[" + i + "]", elem[i].ToString(), depth));
|
||||
}
|
||||
else
|
||||
{
|
||||
tupleList.Add(MakeTuple(property.Name + "[" + i + "]", "", depth));
|
||||
max = Math.Max(max, GetTabLength((Object)elem[i], max, depth + 1, tupleList));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (property.PropertyType.IsSerializable)
|
||||
{
|
||||
if (childObject != null)
|
||||
{
|
||||
tupleList.Add(MakeTuple(property.Name, childObject.ToString(), depth));
|
||||
max = Math.Max(max, depth * 2 + property.Name.Length);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var isDictionary = childObject as IDictionary;
|
||||
if (isDictionary != null)
|
||||
{
|
||||
tupleList.Add(MakeTuple(property.Name, Newtonsoft.Json.JsonConvert.SerializeObject(childObject), depth));
|
||||
max = Math.Max(max, depth * 2 + property.Name.Length);
|
||||
}
|
||||
else if (childObject != null)
|
||||
{
|
||||
tupleList.Add(MakeTuple(property.Name, "", depth));
|
||||
max = Math.Max(max, GetTabLength(childObject, max, depth + 1, tupleList));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
private static Tuple<string, string, int> MakeTuple(string key, string value, int depth)
|
||||
{
|
||||
return new Tuple<string, string, int>(key, value, depth);
|
||||
}
|
||||
|
||||
public static string GetResourceGroupName(string resourceId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(resourceId)) { return null; }
|
||||
Regex r = new Regex(@"(.*?)/resourcegroups/(?<rgname>\S+)/providers/(.*?)", RegexOptions.IgnoreCase);
|
||||
Match m = r.Match(resourceId);
|
||||
return m.Success ? m.Groups["rgname"].Value : null;
|
||||
}
|
||||
|
||||
public static string GetResourceName(string resourceId, string resourceName, string instanceName = null, string version = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(resourceId)) { return null; }
|
||||
Regex r = (instanceName == null && version == null)
|
||||
? new Regex(@"(.*?)/" + resourceName + @"/(?<rgname>\S+)", RegexOptions.IgnoreCase)
|
||||
: new Regex(@"(.*?)/" + resourceName + @"/(?<rgname>\S+)/" + instanceName + @"/(?<instanceId>\S+)", RegexOptions.IgnoreCase);
|
||||
Match m = r.Match(resourceId);
|
||||
return m.Success ? m.Groups["rgname"].Value : null;
|
||||
}
|
||||
|
||||
public static string GetInstanceId(string resourceId, string resourceName, string instanceName, string version = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(resourceId)) { return null; }
|
||||
Regex r = (version == null)
|
||||
? new Regex(@"(.*?)/" + resourceName + @"/(?<rgname>\S+)/" + instanceName + @"/(?<instanceId>\S+)", RegexOptions.IgnoreCase)
|
||||
: new Regex(@"(.*?)/" + resourceName + @"/(?<rgname>\S+)/" + instanceName + @"/(?<instanceId>\S+)/" + version + @"/(?<version>\S+)", RegexOptions.IgnoreCase);
|
||||
Match m = r.Match(resourceId);
|
||||
return m.Success ? m.Groups["instanceId"].Value : null;
|
||||
}
|
||||
|
||||
public static string GetVersion(string resourceId, string resourceName, string instanceName, string version)
|
||||
{
|
||||
if (string.IsNullOrEmpty(resourceId)) { return null; }
|
||||
Regex r = new Regex(@"(.*?)/" + resourceName + @"/(?<rgname>\S+)/" + instanceName + @"/(?<instanceId>\S+)/" + version + @"/(?<version>\S+)", RegexOptions.IgnoreCase);
|
||||
Match m = r.Match(resourceId);
|
||||
return m.Success ? m.Groups["version"].Value : null;
|
||||
}
|
||||
}
|
||||
public static class LocationStringExtensions
|
||||
{
|
||||
public static string Canonicalize(this string location)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(location))
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (char ch in location)
|
||||
{
|
||||
if (!char.IsWhiteSpace(ch))
|
||||
{
|
||||
sb.Append(ch);
|
||||
}
|
||||
}
|
||||
|
||||
location = sb.ToString().ToLower();
|
||||
}
|
||||
|
||||
return location;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "MaintenanceConfiguration", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
|
||||
[OutputType(typeof(PSMaintenanceConfiguration))]
|
||||
public partial class NewAzureRmMaintenanceConfiguration : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
if (ShouldProcess(this.Name, VerbsCommon.New))
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string resourceName = this.Name;
|
||||
MaintenanceConfiguration configuration = new MaintenanceConfiguration();
|
||||
if (this.Location != null)
|
||||
{
|
||||
configuration.Location = this.Location;
|
||||
}
|
||||
if (this.Tag != null)
|
||||
{
|
||||
configuration.Tags = this.Tag.Cast<DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value);
|
||||
}
|
||||
|
||||
if (this.ExtensionProperty != null)
|
||||
{
|
||||
configuration.ExtensionProperties = this.ExtensionProperty.Cast<DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value);
|
||||
}
|
||||
if (this.MaintenanceScope != null)
|
||||
{
|
||||
configuration.MaintenanceScope = this.MaintenanceScope;
|
||||
}
|
||||
|
||||
var result = MaintenanceConfigurationsClient.CreateOrUpdate(resourceGroupName, resourceName, configuration);
|
||||
var psObject = new PSMaintenanceConfiguration();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<MaintenanceConfiguration, PSMaintenanceConfiguration>(result, psObject);
|
||||
WriteObject(psObject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The maintenance configuration Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The maintenance configuration location.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string Location { get; set; }
|
||||
|
||||
[Parameter(
|
||||
Mandatory = false,
|
||||
HelpMessage = "The ARM Tags.")]
|
||||
public Hashtable Tag { get; set; }
|
||||
|
||||
[Parameter(
|
||||
Mandatory = false,
|
||||
HelpMessage = "The Extension properties per resource.")]
|
||||
public Hashtable ExtensionProperty { get; set; }
|
||||
|
||||
[Parameter(
|
||||
Mandatory = false,
|
||||
HelpMessage = "The Maintenance Scope.")]
|
||||
public string MaintenanceScope { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
|
||||
public SwitchParameter AsJob { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "MaintenanceConfiguration", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
|
||||
[OutputType(typeof(bool))]
|
||||
public partial class RemoveAzureRmMaintenanceConfiguration : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
if (ShouldProcess(this.Name, VerbsCommon.Remove)
|
||||
&& (this.Force.IsPresent ||
|
||||
this.ShouldContinue(Properties.Resources.ResourceRemovalConfirmation,
|
||||
"Remove-AzMaintenanceConfiguration operation")))
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string name = this.Name;
|
||||
|
||||
MaintenanceConfigurationsClient.Delete(resourceGroupName, name);
|
||||
|
||||
if (this.PassThru.IsPresent)
|
||||
{
|
||||
this.WriteObject(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The maintenance configuration Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
HelpMessage = "Force remove without confirmation.",
|
||||
Mandatory = false)]
|
||||
public SwitchParameter Force { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
|
||||
public SwitchParameter AsJob { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Returns the status of the Remove operation. By default, this cmdlet does not generate any output.")]
|
||||
public SwitchParameter PassThru { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "MaintenanceConfiguration", DefaultParameterSetName = "DefaultParameter")]
|
||||
[OutputType(typeof(PSMaintenanceConfiguration))]
|
||||
public partial class GetAzureRmMaintenanceConfiguration : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string name = this.Name;
|
||||
|
||||
if (!string.IsNullOrEmpty(resourceGroupName) && !string.IsNullOrEmpty(name))
|
||||
{
|
||||
var result = MaintenanceConfigurationsClient.Get(resourceGroupName, name);
|
||||
WriteObject(result);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
var psObject = new List<PSMaintenanceConfiguration>();
|
||||
var result = MaintenanceConfigurationsClient.List();
|
||||
|
||||
foreach (var maintenanceConfiguration in result)
|
||||
{
|
||||
PSMaintenanceConfiguration psMaintenanceConfiguration = new PSMaintenanceConfiguration();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<MaintenanceConfiguration, PSMaintenanceConfiguration>(maintenanceConfiguration, psMaintenanceConfiguration);
|
||||
psObject.Add(psMaintenanceConfiguration);
|
||||
}
|
||||
|
||||
WriteObject(psObject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = false,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = false,
|
||||
HelpMessage = "The maintenance configuration Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsData.Update, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "MaintenanceConfiguration", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
|
||||
[OutputType(typeof(PSMaintenanceConfiguration))]
|
||||
public partial class UpdateAzureRmMaintenanceConfiguration : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
if (ShouldProcess(this.Name, VerbsData.Update))
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string name = this.Name;
|
||||
MaintenanceConfiguration configuration = new MaintenanceConfiguration();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<PSMaintenanceConfiguration, MaintenanceConfiguration>(this.Configuration, configuration);
|
||||
|
||||
var result = MaintenanceConfigurationsClient.UpdateMethod(resourceGroupName, name, configuration);
|
||||
var psObject = new PSMaintenanceConfiguration();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<MaintenanceConfiguration, PSMaintenanceConfiguration>(result, psObject);
|
||||
WriteObject(psObject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The maintenance configuration Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The maintenance configuration to be updated.",
|
||||
ValueFromPipeline = true)]
|
||||
public PSMaintenanceConfiguration Configuration { get; set; }
|
||||
|
||||
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
|
||||
public SwitchParameter AsJob { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using AutoMapper;
|
||||
using FROM = Microsoft.Azure.Management.Maintenance.Models;
|
||||
using TO = Microsoft.Azure.Commands.Maintenance.Models;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Models
|
||||
{
|
||||
public class MaintenanceAutomationAutoMapperProfile : AutoMapper.Profile
|
||||
{
|
||||
private static IMapper _mapper = null;
|
||||
|
||||
private static readonly object _lock = new object();
|
||||
|
||||
public static IMapper Mapper
|
||||
{
|
||||
get
|
||||
{
|
||||
lock(_lock)
|
||||
{
|
||||
if (_mapper == null)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
return _mapper;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override string ProfileName
|
||||
{
|
||||
get { return "MaintenanceAutomationAutoMapperProfile"; }
|
||||
}
|
||||
|
||||
private static void Initialize()
|
||||
{
|
||||
var config = new MapperConfiguration(cfg =>
|
||||
{
|
||||
cfg.CreateMap<FROM.ApplyUpdate, TO.PSApplyUpdate>();
|
||||
cfg.CreateMap<TO.PSApplyUpdate, FROM.ApplyUpdate>();
|
||||
cfg.CreateMap<FROM.ConfigurationAssignment, TO.PSConfigurationAssignment>();
|
||||
cfg.CreateMap<TO.PSConfigurationAssignment, FROM.ConfigurationAssignment>();
|
||||
cfg.CreateMap<FROM.MaintenanceConfiguration, TO.PSMaintenanceConfiguration>();
|
||||
cfg.CreateMap<TO.PSMaintenanceConfiguration, FROM.MaintenanceConfiguration>();
|
||||
cfg.CreateMap<FROM.Update, TO.PSUpdate>();
|
||||
cfg.CreateMap<TO.PSUpdate, FROM.Update>();
|
||||
|
||||
});
|
||||
_mapper = config.CreateMapper();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Models
|
||||
{
|
||||
public partial class PSApplyUpdate
|
||||
{
|
||||
public string Status { get; set; }
|
||||
public string ResourceId { get; set; }
|
||||
public DateTime? LastUpdateTime { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Type { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
using System;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Models
|
||||
{
|
||||
public class PSArgument
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public Type Type { get; set; }
|
||||
|
||||
public object Value { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Models
|
||||
{
|
||||
public partial class PSConfigurationAssignment
|
||||
{
|
||||
public string Location { get; set; }
|
||||
public string MaintenanceConfigurationId { get; set; }
|
||||
public string ResourceId { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Type { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Models
|
||||
{
|
||||
public partial class PSMaintenanceConfiguration
|
||||
{
|
||||
public string Location { get; set; }
|
||||
public IDictionary<string, string> Tags { get; set; }
|
||||
public string NamespaceProperty { get; set; }
|
||||
public IDictionary<string, string> ExtensionProperties { get; set; }
|
||||
public string MaintenanceScope { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Type { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Models
|
||||
{
|
||||
public partial class PSUpdate
|
||||
{
|
||||
public string MaintenanceScope { get; set; }
|
||||
public string ImpactType { get; set; }
|
||||
public string Status { get; set; }
|
||||
public int? ImpactDurationInSec { get; set; }
|
||||
public DateTime? NotBefore { get; set; }
|
||||
public string ResourceId { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Commands.Maintenance")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Commands.Maintenance")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0e11b67a-1257-40d0-bd33-8315759fdb01")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0")]
|
|
@ -0,0 +1,81 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.Commands.Maintenance.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This cmdlet will remove the specified resource. Do you want to continue?.
|
||||
/// </summary>
|
||||
internal static string ResourceRemovalConfirmation {
|
||||
get {
|
||||
return ResourceManager.GetString("ResourceRemovalConfirmation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This cmdlet will stop the specified resource. Do you want to continue?.
|
||||
/// </summary>
|
||||
internal static string ResourceStoppingConfirmation {
|
||||
get {
|
||||
return ResourceManager.GetString("ResourceStoppingConfirmation", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ResourceRemovalConfirmation" xml:space="preserve">
|
||||
<value>This cmdlet will remove the specified resource. Do you want to continue?</value>
|
||||
</data>
|
||||
<data name="ResourceStoppingConfirmation" xml:space="preserve">
|
||||
<value>This cmdlet will stop the specified resource. Do you want to continue?</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1 @@
|
|||
#Placeholder for future scripts: Please delete this file and uncomment <CopyToOutputDirectory>Always</CopytoOutputDirectory> within the <None Include="StartupScripts\*.ps1"> block in the .csproj file.
|
|
@ -0,0 +1,105 @@
|
|||
// ----------------------------------------------------------------------------------
|
||||
//
|
||||
// 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.
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
using Microsoft.Azure.Commands.Maintenance.Models;
|
||||
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
|
||||
using Microsoft.Azure.Management.Maintenance;
|
||||
using Microsoft.Azure.Management.Maintenance.Models;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
|
||||
namespace Microsoft.Azure.Commands.Maintenance
|
||||
{
|
||||
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "MaintenanceUpdate", DefaultParameterSetName = "DefaultParameter")]
|
||||
[OutputType(typeof(Update))]
|
||||
public partial class GetAzureRmUpdate : MaintenanceAutomationBaseCmdlet
|
||||
{
|
||||
public override void ExecuteCmdlet()
|
||||
{
|
||||
base.ExecuteCmdlet();
|
||||
ExecuteClientAction(() =>
|
||||
{
|
||||
string resourceGroupName = this.ResourceGroupName;
|
||||
string providerName = this.ProviderName;
|
||||
string resourceParentType = this.ResourceParentType;
|
||||
string resourceParentName = this.ResourceParentName;
|
||||
string resourceType = this.ResourceType;
|
||||
string resourceName = this.ResourceName;
|
||||
|
||||
var result = (!string.IsNullOrEmpty(resourceParentType) && !string.IsNullOrEmpty(resourceParentName)) ?
|
||||
UpdatesClient.ListParent(resourceGroupName, providerName, resourceParentType, resourceParentName, resourceType, resourceName) :
|
||||
UpdatesClient.List(resourceGroupName, providerName, resourceType, resourceName);
|
||||
|
||||
var psObject = new List<PSUpdate>();
|
||||
|
||||
foreach (var update in result)
|
||||
{
|
||||
PSUpdate psUpdate = new PSUpdate();
|
||||
MaintenanceAutomationAutoMapperProfile.Mapper.Map<Update, PSUpdate>(update, psUpdate);
|
||||
psObject.Add(psUpdate);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 0,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource Group Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
[ResourceGroupCompleter]
|
||||
public string ResourceGroupName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 1,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource provider Name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ProviderName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Mandatory = false,
|
||||
HelpMessage = "The parent resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceParentName { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 2,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource type.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceType { get; set; }
|
||||
|
||||
[Parameter(
|
||||
ParameterSetName = "DefaultParameter",
|
||||
Position = 3,
|
||||
Mandatory = true,
|
||||
HelpMessage = "The resource name.",
|
||||
ValueFromPipelineByPropertyName = true)]
|
||||
public string ResourceName { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
Module Name: Az.Maintenance
|
||||
Module Guid: 9b895a4cb333f6bf9176b1eeb9260782R21
|
||||
Download Help Link: https://docs.microsoft.com/en-us/powershell/module/az.maintenance
|
||||
Help Version: 0.2.5.0
|
||||
Locale: en-us
|
||||
---
|
||||
|
||||
# Az.Maintenance Module
|
||||
## Description
|
||||
This topic displays help topics for the Azure Maintenance Cmdlets.
|
||||
|
||||
## Az.Maintenance Cmdlets
|
||||
### [Get-AzApplyUpdate](Get-AzApplyUpdate.md)
|
||||
Track maintenance updates to resource
|
||||
|
||||
### [Get-AzConfigurationAssignment](Get-AzConfigurationAssignment.md)
|
||||
List configurationAssignments for resource.
|
||||
|
||||
### [Get-AzMaintenanceConfiguration](Get-AzMaintenanceConfiguration.md)
|
||||
Get Maintenance configuration record
|
||||
|
||||
### [Get-AzMaintenanceUpdate](Get-AzMaintenanceUpdate.md)
|
||||
Get pending maintenance updates to resource.
|
||||
|
||||
### [New-AzApplyUpdate](New-AzApplyUpdate.md)
|
||||
Apply maintenance updates to resource
|
||||
|
||||
### [New-AzConfigurationAssignment](New-AzConfigurationAssignment.md)
|
||||
Register configuration for resource.
|
||||
|
||||
### [New-AzMaintenanceConfiguration](New-AzMaintenanceConfiguration.md)
|
||||
Create or Update configuration record
|
||||
|
||||
### [Remove-AzConfigurationAssignment](Remove-AzConfigurationAssignment.md)
|
||||
Unregister configuration for resource.
|
||||
|
||||
### [Remove-AzMaintenanceConfiguration](Remove-AzMaintenanceConfiguration.md)
|
||||
Delete Configuration record
|
||||
|
||||
### [Update-AzMaintenanceConfiguration](Update-AzMaintenanceConfiguration.md)
|
||||
Patch configuration record
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/get-azapplyupdate
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-AzApplyUpdate
|
||||
|
||||
## SYNOPSIS
|
||||
Track maintenance updates to resource
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-AzApplyUpdate [-ResourceGroupName] <String> [-ProviderName] <String> [-ResourceParentType <String>]
|
||||
[-ResourceParentName <String>] [-ResourceType] <String> [-ResourceName] <String> -ApplyUpdateName <String>
|
||||
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Track maintenance updates to resource
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Get-AzApplyUpdate -ResourceGroupName smdtest$region -ResourceParentType hostGroups -ResourceParentName smddhg$region -ResourceType hosts -ResourceName smddh$region -ProviderName Microsoft.Compute -ApplyUpdateName default
|
||||
|
||||
|
||||
Status : InProgress
|
||||
ResourceId : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2
|
||||
LastUpdateTime : 11/8/2019 9:39:01 AM
|
||||
Id : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/applyUpdates/default
|
||||
Name : default
|
||||
Type : Microsoft.Maintenance/applyUpdates
|
||||
```
|
||||
|
||||
Track maintenance updates to resource
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ApplyUpdateName
|
||||
The apply update resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ProviderName
|
||||
The resource provider Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceName
|
||||
The resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentName
|
||||
The parent resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentType
|
||||
The parent resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceType
|
||||
The resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSApplyUpdate
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,160 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/get-azconfigurationassignment
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-AzConfigurationAssignment
|
||||
|
||||
## SYNOPSIS
|
||||
List configurationAssignments for resource.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-AzConfigurationAssignment [-ResourceGroupName] <String> [-ProviderName] <String>
|
||||
[-ResourceParentType <String>] [-ResourceParentName <String>] [-ResourceType] <String>
|
||||
[-ResourceName] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
List configurationAssignments for resource.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Get-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute
|
||||
|
||||
|
||||
MaintenanceConfigurationId : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps1/providers/Microsoft.Maintenance/maintenanceConfigurations/ps2
|
||||
Id :
|
||||
/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps2
|
||||
Name : ps2
|
||||
Type : Microsoft.Maintenance/configurationAssignments
|
||||
```
|
||||
|
||||
List configurationAssignments for dedicated host.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ProviderName
|
||||
The resource provider Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceName
|
||||
The resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentName
|
||||
The parent resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentType
|
||||
The parent resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceType
|
||||
The resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSConfigurationAssignment
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,102 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/get-azmaintenanceconfiguration
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-AzMaintenanceConfiguration
|
||||
|
||||
## SYNOPSIS
|
||||
Get Maintenance configuration record
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-AzMaintenanceConfiguration [[-ResourceGroupName] <String>] [[-Name] <String>]
|
||||
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Get Maintenance configuration record
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Get-AzMaintenanceConfiguration -ResourceGroupName smdtest -Name workervmscentralus
|
||||
|
||||
|
||||
Location : centralus
|
||||
Tags : {}
|
||||
NamespaceProperty :
|
||||
ExtensionProperties : {}
|
||||
MaintenanceScope : Host
|
||||
Id : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtest/providers/Microsoft.Maintenance/maintenanceConfigurations/workervmscentralus
|
||||
Name : workervmscentralus
|
||||
Type : Microsoft.Maintenance/maintenanceConfigurations
|
||||
```
|
||||
|
||||
Get Maintenance configuration record
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Name
|
||||
The maintenance configuration Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSMaintenanceConfiguration
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,153 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/get-azmaintenanceupdate
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-AzMaintenanceUpdate
|
||||
|
||||
## SYNOPSIS
|
||||
Get pending maintenance updates to resource.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-AzMaintenanceUpdate [-ResourceGroupName] <String> [-ProviderName] <String> [-ResourceParentType <String>]
|
||||
[-ResourceParentName <String>] [-ResourceType] <String> [-ResourceName] <String>
|
||||
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Get pending maintenance updates to resource.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Get-AzMaintenanceUpdate -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute
|
||||
```
|
||||
|
||||
Get pending maintenance updates to resource.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ProviderName
|
||||
The resource provider Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceName
|
||||
The resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentName
|
||||
The parent resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentType
|
||||
The parent resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceType
|
||||
The resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Management.Maintenance.Models.Update
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,208 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/new-azapplyupdate
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# New-AzApplyUpdate
|
||||
|
||||
## SYNOPSIS
|
||||
Apply maintenance updates to resource
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
New-AzApplyUpdate [-ResourceGroupName] <String> [-ProviderName] <String> [-ResourceParentType <String>]
|
||||
[-ResourceParentName <String>] [-ResourceType] <String> [-ResourceName] <String> [-AsJob]
|
||||
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Apply maintenance updates to resource
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> New-AzApplyUpdate -ResourceGroupName smdtest$region -ResourceParentType hostGroups -ResourceParentName smddhg$region -ResourceType hosts -ResourceName smddh$region -ProviderName Microsoft.Compute
|
||||
|
||||
|
||||
Status : InProgress
|
||||
ResourceId : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2
|
||||
LastUpdateTime : 11/8/2019 9:39:01 AM
|
||||
Id :
|
||||
/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/applyUpdates/cbd4c97d-2011-4fa3-9df1-525f97e74eac
|
||||
Name : cbd4c97d-2011-4fa3-9df1-525f97e74eac
|
||||
Type : Microsoft.Maintenance/applyUpdates
|
||||
```
|
||||
|
||||
Apply maintenance updates to resource
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -AsJob
|
||||
Run cmdlet in the background
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ProviderName
|
||||
The resource provider Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceName
|
||||
The resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentName
|
||||
The parent resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentType
|
||||
The parent resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceType
|
||||
The resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSApplyUpdate
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,270 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/new-azconfigurationassignment
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# New-AzConfigurationAssignment
|
||||
|
||||
## SYNOPSIS
|
||||
Register configuration for resource.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
New-AzConfigurationAssignment [-ResourceGroupName] <String> [-ProviderName] <String>
|
||||
[-ResourceParentType <String>] [-ResourceParentName <String>] [-ResourceType] <String>
|
||||
[-ResourceName] <String> -ConfigurationAssignmentName <String> [-ResourceId <String>] -Location <String>
|
||||
-MaintenanceConfigurationId <String> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Register maintenance configuration for resource.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> New-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute -ConfigurationAssignmentName $maintenanceConfigurationName -MaintenanceConfigurationId $maintenanceConfigurationCreated.Id -Location $location
|
||||
|
||||
|
||||
Location : westus2
|
||||
MaintenanceConfigurationId : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/ps1/providers/Microsoft.Maintenance/maintenanceConfigurations/ps2
|
||||
ResourceId : 7b32ed22-dc7b-4a17-9c42-36c024f4c9f9
|
||||
Id :
|
||||
/subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtestwestus2/providers/Microsoft.Compute/hostGroups/smddhgwestus2/hosts/smddhwestus2/providers/Microsoft.Maintenance/configurationAssignments/ps2
|
||||
Name : ps2
|
||||
Type : Microsoft.Maintenance/configurationAssignments
|
||||
```
|
||||
|
||||
Register maintenance configuration for didicated host.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -AsJob
|
||||
Run cmdlet in the background
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -ConfigurationAssignmentName
|
||||
The configuration assignment name, should match the MaintenanceConfigurationName.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Location
|
||||
The location without spaces for 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
|
||||
```
|
||||
|
||||
### -MaintenanceConfigurationId
|
||||
The fully qualified MaintenanceConfiguration.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ProviderName
|
||||
The resource provider Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceId
|
||||
The configuration assignment name, should match the MaintenanceConfigurationName.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceName
|
||||
The resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentName
|
||||
The parent resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentType
|
||||
The parent resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceType
|
||||
The resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSConfigurationAssignment
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,208 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/new-azmaintenanceconfiguration
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# New-AzMaintenanceConfiguration
|
||||
|
||||
## SYNOPSIS
|
||||
Create or Update configuration record
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
New-AzMaintenanceConfiguration [-ResourceGroupName] <String> [-Name] <String> [-Location] <String>
|
||||
[-Tag <Hashtable>] [-ExtensionProperty <Hashtable>] [-MaintenanceScope <String>] [-AsJob]
|
||||
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Create or Update configuration record
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> New-AzMaintenanceConfiguration -ResourceGroupName smdtest -Name workervmscentralus -MaintenanceScope Host -Location centralus
|
||||
|
||||
|
||||
Location : centralus
|
||||
Tags : {}
|
||||
ExtensionProperties : {}
|
||||
MaintenanceScope : Host
|
||||
Id : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtest/providers/Microsoft.Maintenance/maintenanceConfigurations/workervmscentralus
|
||||
Name : workervmscentralus
|
||||
Type : Microsoft.Maintenance/maintenanceConfigurations
|
||||
```
|
||||
|
||||
Create a maintenance configuration with scope Host
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -AsJob
|
||||
Run cmdlet in the background
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtensionProperty
|
||||
The Extension properties per 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
|
||||
```
|
||||
|
||||
### -Location
|
||||
The maintenance configuration location.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -MaintenanceScope
|
||||
The Maintenance Scope.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Name
|
||||
The maintenance configuration Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Tag
|
||||
The ARM Tags.
|
||||
|
||||
```yaml
|
||||
Type: System.Collections.Hashtable
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: 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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSMaintenanceConfiguration
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,249 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/remove-azconfigurationassignment
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Remove-AzConfigurationAssignment
|
||||
|
||||
## SYNOPSIS
|
||||
Unregister configuration for resource.
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Remove-AzConfigurationAssignment [-ResourceGroupName] <String> [-ProviderName] <String>
|
||||
[-ResourceParentType <String>] [-ResourceParentName <String>] [-ResourceType] <String>
|
||||
[-ResourceName] <String> -ConfigurationAssignmentName <String> [-Force] [-AsJob] [-PassThru]
|
||||
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Unregister configuration for resource.
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Remove-AzConfigurationAssignment -ResourceGroupName smdtest$location -ResourceParentType hostGroups -ResourceParentName smddhg$location -ResourceType hosts -ResourceName smddh$location -ProviderName Microsoft.Compute -ConfigurationAssignmentName $maintenanceConfigurationName
|
||||
|
||||
Remove-AzConfigurationAssignment operation
|
||||
This cmdlet will remove the specified resource. Do you want to continue?
|
||||
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):
|
||||
```
|
||||
|
||||
Unregister configuration for resource.
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -AsJob
|
||||
Run cmdlet in the background
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -ConfigurationAssignmentName
|
||||
The configuration assignment name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Force
|
||||
Force remove without confirmation.
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -PassThru
|
||||
Returns the status of the Remove operation. By default, this cmdlet does not generate any output.
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -ProviderName
|
||||
The resource provider Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceName
|
||||
The resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentName
|
||||
The parent resource name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceParentType
|
||||
The parent resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceType
|
||||
The resource type.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Boolean
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,172 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/remove-azmaintenanceconfiguration
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Remove-AzMaintenanceConfiguration
|
||||
|
||||
## SYNOPSIS
|
||||
Delete Configuration record
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Remove-AzMaintenanceConfiguration [-ResourceGroupName] <String> [-Name] <String> [-Force] [-AsJob] [-PassThru]
|
||||
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Delete Maintenance Configuration record
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Remove-AzMaintenanceConfiguration -ResourceGroupName smdtest -Name workervmscentralus
|
||||
|
||||
Remove-AzMaintenanceConfiguration operation
|
||||
This cmdlet will remove the specified resource. Do you want to continue?
|
||||
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):
|
||||
```
|
||||
|
||||
Delete Maintenance Configuration record
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -AsJob
|
||||
Run cmdlet in the background
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Force
|
||||
Force remove without confirmation.
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -Name
|
||||
The maintenance configuration Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PassThru
|
||||
Returns the status of the Remove operation. By default, this cmdlet does not generate any output.
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
### System.String
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Boolean
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -0,0 +1,165 @@
|
|||
---
|
||||
external help file: Microsoft.Azure.PowerShell.Cmdlets.Maintenance.dll-Help.xml
|
||||
Module Name: Az.Maintenance
|
||||
online version: https://docs.microsoft.com/en-us/powershell/module/az.maintenance/update-azmaintenanceconfiguration
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Update-AzMaintenanceConfiguration
|
||||
|
||||
## SYNOPSIS
|
||||
Patch configuration record
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Update-AzMaintenanceConfiguration [-ResourceGroupName] <String> [-Name] <String>
|
||||
[-Configuration] <PSMaintenanceConfiguration> [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
|
||||
[-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
Patch maintenance configuration record
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> Update-AzMaintenanceConfiguration -ResourceGroupName smdtest -Name workervmscentralus -Configuration $configuration
|
||||
|
||||
|
||||
Location : centralus
|
||||
Tags : {}
|
||||
ExtensionProperties : {}
|
||||
MaintenanceScope : Host
|
||||
Id : /subscriptions/42c974dd-2c03-4f1b-96ad-b07f050aaa74/resourcegroups/smdtest/providers/Microsoft.Maintenance/maintenanceConfigurations/workervmscentralus
|
||||
Name : workervmscentralus
|
||||
Type : Microsoft.Maintenance/maintenanceConfigurations
|
||||
```
|
||||
|
||||
Patch maintenance configuration record
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -AsJob
|
||||
Run cmdlet in the background
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
### -Configuration
|
||||
The maintenance configuration to be updated.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Maintenance.Models.PSMaintenanceConfiguration
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DefaultProfile
|
||||
The credentials, account, tenant, and subscription used for communication with Azure.
|
||||
|
||||
```yaml
|
||||
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
|
||||
Parameter Sets: (All)
|
||||
Aliases: AzContext, AzureRmContext, AzureCredential
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Name
|
||||
The maintenance configuration Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResourceGroupName
|
||||
The resource Group Name.
|
||||
|
||||
```yaml
|
||||
Type: System.String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName)
|
||||
Accept wildcard characters: 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
|
||||
```
|
||||
|
||||
### -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
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
### System.String
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSMaintenanceConfiguration
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### Microsoft.Azure.Commands.Maintenance.Models.PSMaintenanceConfiguration
|
||||
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 8/22/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '0.1.2'
|
||||
ModuleVersion = '0.1.3'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -120,10 +120,9 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Addition of ProtocolTypes and MountTargets to volume properties
|
||||
* Addition of ProtocolType parameter for new volume creation
|
||||
* Pool size and Volume usageThreshold required on creation
|
||||
* Fixed miscellaneous typos across module'
|
||||
ReleaseNotes = '* Volume creation --protocol-types accepts now ''NFSv4.1'' not ''NFSv4''
|
||||
* Volume export policy property now named ''nfsv41'' not ''nfsv4''
|
||||
* Snapshot creation date now named just ''created'''
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 0.1.3
|
||||
|
||||
* Volume creation --protocol-types accepts now "NFSv4.1" not "NFSv4"
|
||||
* Volume export policy property now named 'nfsv41' not 'nfsv4'
|
||||
* Snapshot creation date now named just 'created'
|
||||
|
|
|
@ -24,5 +24,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("42656543-77AD-4968-BA4B-BE0778705625")]
|
||||
[assembly: AssemblyVersion("0.1.2")]
|
||||
[assembly: AssemblyFileVersion("0.1.2")]
|
||||
[assembly: AssemblyVersion("0.1.3")]
|
||||
[assembly: AssemblyFileVersion("0.1.3")]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '2.0.0'
|
||||
ModuleVersion = '2.1.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -371,7 +371,8 @@ CmdletsToExport = 'Add-AzApplicationGatewayAuthenticationCertificate',
|
|||
'Add-AzServiceEndpointPolicyDefinition',
|
||||
'Set-AzServiceEndpointPolicy', 'New-AzVirtualWan',
|
||||
'Update-AzVirtualWan', 'Get-AzVirtualWan', 'Remove-AzVirtualWan',
|
||||
'Get-AzVirtualWanVpnServerConfiguration', 'Get-AzVirtualWanVpnServerConfigurationVpnProfile',
|
||||
'Get-AzVirtualWanVpnServerConfiguration',
|
||||
'Get-AzVirtualWanVpnServerConfigurationVpnProfile',
|
||||
'New-AzVirtualHub', 'Get-AzVirtualHub', 'Update-AzVirtualHub',
|
||||
'Remove-AzVirtualHub', 'Set-AzVirtualHub', 'New-AzVirtualHubRoute',
|
||||
'Add-AzVirtualHubRoute', 'New-AzVirtualHubRouteTable',
|
||||
|
@ -384,11 +385,11 @@ CmdletsToExport = 'Add-AzApplicationGatewayAuthenticationCertificate',
|
|||
'Update-AzVpnConnection', 'Remove-AzVpnConnection',
|
||||
'New-AzVirtualHubVnetConnection', 'Get-AzVirtualHubVnetConnection',
|
||||
'Remove-AzVirtualHubVnetConnection',
|
||||
'Update-AzVirtualHubVnetConnection',
|
||||
'Get-AzVpnServerConfiguration',
|
||||
'Update-AzVirtualHubVnetConnection', 'Get-AzVpnServerConfiguration',
|
||||
'New-AzVpnServerConfiguration', 'Remove-AzVpnServerConfiguration',
|
||||
'Update-AzVpnServerConfiguration', 'Get-AzP2sVpnGateway',
|
||||
'Get-AzP2sVpnGatewayConnectionHealth', 'Get-AzP2sVpnGatewayDetailedConnectionHealth',
|
||||
'Get-AzP2sVpnGatewayConnectionHealth',
|
||||
'Get-AzP2sVpnGatewayDetailedConnectionHealth',
|
||||
'Get-AzP2sVpnGatewayVpnProfile', 'New-AzP2sVpnGateway',
|
||||
'Remove-AzP2sVpnGateway', 'Update-AzP2sVpnGateway',
|
||||
'Get-AzVirtualWanVpnConfiguration', 'Get-AzFirewall',
|
||||
|
@ -397,10 +398,10 @@ CmdletsToExport = 'Add-AzApplicationGatewayAuthenticationCertificate',
|
|||
'New-AzFirewallApplicationRule', 'New-AzFirewallNatRuleCollection',
|
||||
'New-AzFirewallNatRule', 'New-AzFirewallNetworkRuleCollection',
|
||||
'New-AzFirewallNetworkRule', 'New-AzFirewallThreatIntelWhitelist',
|
||||
'Get-AzFirewallFqdnTag',
|
||||
'Get-AzNetworkProfile', 'New-AzNetworkProfile',
|
||||
'Remove-AzNetworkProfile', 'Set-AzNetworkProfile',
|
||||
'New-AzContainerNicConfig', 'New-AzContainerNicConfigIpConfig',
|
||||
'Get-AzFirewallFqdnTag', 'Get-AzNetworkProfile',
|
||||
'New-AzNetworkProfile', 'Remove-AzNetworkProfile',
|
||||
'Set-AzNetworkProfile', 'New-AzContainerNicConfig',
|
||||
'New-AzContainerNicConfigIpConfig',
|
||||
'Add-AzNetworkInterfaceTapConfig',
|
||||
'Get-AzNetworkInterfaceTapConfig',
|
||||
'Set-AzNetworkInterfaceTapConfig',
|
||||
|
@ -500,68 +501,7 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Change all cmdlets for PrivateEndpointConnection to support generic service provider.
|
||||
- Updated cmdlet:
|
||||
- Approve-AzPrivateEndpointConnection
|
||||
- Deny-AzPrivateEndpointConnection
|
||||
- Get-AzPrivateEndpointConnection
|
||||
- Remove-AzPrivateEndpointConnection
|
||||
- Set-AzPrivateEndpointConnection
|
||||
* Add new cmdlet for PrivateLinkResource and it also support generic service provider.
|
||||
- New cmdlet:
|
||||
- Get-AzPrivateLinkResource
|
||||
* Add new fields and parameter for the feature Proxy Protocol V2.
|
||||
- Add property EnableProxyProtocol in PrivateLinkService
|
||||
- Add property LinkIdentifier in PrivateEndpointConnection
|
||||
- Updated New-AzPrivateLinkService to add a new optional parameter EnableProxyProtocol.
|
||||
* Fix incorrect parameter description in ''New-AzApplicationGatewaySku'' reference documentation
|
||||
* New cmdlets to support the azure firewall policy
|
||||
* Add support for child resource RouteTables of VirtualHub
|
||||
- New cmdlets added:
|
||||
- Add-AzVirtualHubRoute
|
||||
- Add-AzVirtualHubRouteTable
|
||||
- Get-AzVirtualHubRouteTable
|
||||
- Remove-AzVirtualHubRouteTable
|
||||
- Set-AzVirtualHub
|
||||
* Add support for new properties Sku of VirtualHub and VirtualWANType of VirtualWan
|
||||
- Cmdlets updated with optional parameters:
|
||||
- New-AzVirtualHub : added parameter Sku
|
||||
- Update-AzVirtualHub : added parameter Sku
|
||||
- New-AzVirtualWan : added parameter VirtualWANType
|
||||
- Update-AzVirtualWan : added parameter VirtualWANType
|
||||
* Add support for EnableInternetSecurity property for HubVnetConnection, VpnConnection and ExpressRouteConnection
|
||||
- New cmdlets added:
|
||||
- Update-AzureRmVirtualHubVnetConnection
|
||||
- Cmdlets updated with optional parameters:
|
||||
- New-AzureRmVirtualHubVnetConnection : added parameter EnableInternetSecurity
|
||||
- New-AzureRmVpnConnection : added parameter EnableInternetSecurity
|
||||
- Update-AzureRmVpnConnection : added parameter EnableInternetSecurity
|
||||
- New-AzureRmExpressRouteConnection : added parameter EnableInternetSecurity
|
||||
- Set-AzureRmExpressRouteConnection : added parameter EnableInternetSecurity
|
||||
* Add support for Configuring TopLevel WebApplicationFirewall Policy
|
||||
- New cmdlets added:
|
||||
- New-AzApplicationGatewayFirewallPolicySetting
|
||||
- New-AzApplicationGatewayFirewallPolicyExclusion
|
||||
- New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride
|
||||
- New-AzApplicationGatewayFirewallPolicyManagedRuleOverride
|
||||
- New-AzApplicationGatewayFirewallPolicyManagedRule
|
||||
- New-AzApplicationGatewayFirewallPolicyManagedRuleSet
|
||||
- Cmdlets updated with optional parameters:
|
||||
- New-AzApplicationGatewayFirewallPolicy : added parameter PolicySetting, ManagedRule
|
||||
* Added support for Geo-Match operator on CustomRule
|
||||
- Added GeoMatch to the operator on the FirewallCondition
|
||||
* Added support for perListener and perSite Firewall policy
|
||||
- Cmdlets updated with optional parameters:
|
||||
- New-AzApplicationGatewayHttpListener : added parameter FirewallPolicy, FirewallPolicyId
|
||||
- New-AzApplicationGatewayPathRuleConfig : added parameter FirewallPolicy, FirewallPolicyId
|
||||
* Fix required subnet with name AzureBastionSubnet in ''PSBastion'' can be case insensitive
|
||||
* Support for Destination FQDNs in Network Rules and Translated FQDN in NAT Rules for Azure Firewall
|
||||
* Add support for top level resource RouteTables of IpGroup
|
||||
- New cmdlets added:
|
||||
- New-AzIpGroup
|
||||
- Remove-AzIpGroup
|
||||
- Get-AzIpGroup
|
||||
- Set-AzIpGroup'
|
||||
ReleaseNotes = '* Change ''Start-AzVirtualNetworkGatewayConnectionPacketCapture.md'' and ''Start-AzVirtualnetworkGatewayPacketCapture.md'' FilterData option examples.'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
--->
|
||||
|
||||
## Upcoming Release
|
||||
|
||||
## Version 2.1.0
|
||||
* Change `Start-AzVirtualNetworkGatewayConnectionPacketCapture.md` and `Start-AzVirtualnetworkGatewayPacketCapture.md` FilterData option examples.
|
||||
|
||||
## Version 2.0.0
|
||||
|
|
|
@ -25,8 +25,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("be2ca022-590c-48ba-b465-9ab61d6e2ea0")]
|
||||
[assembly: AssemblyVersion("2.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.0.0")]
|
||||
[assembly: AssemblyVersion("2.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.0")]
|
||||
#if !SIGN
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.Network.Test")]
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.0.0'
|
||||
ModuleVersion = '1.0.1'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -118,7 +118,7 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* 1.0.0 version released'
|
||||
ReleaseNotes = '* Updated PrivateDns .net sdk to version 1.0.0'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
- Additional information about change #1
|
||||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 1.0.1
|
||||
* Updated PrivateDns .net sdk to version 1.0.0
|
||||
|
||||
## Version 1.0.0
|
||||
|
|
|
@ -44,8 +44,8 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0")]
|
||||
[assembly: AssemblyVersion("1.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.1")]
|
||||
#if SIGN
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.Resources.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
|
||||
#else
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/29/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '2.0.1'
|
||||
ModuleVersion = '2.1.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -263,15 +263,9 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Azure Site Recovery support to configure networking resources like NSG, public IP and internal load balancers for Azure to Azure.
|
||||
* Azure Site Recovery Support to write to managed disk for vMWare to Azure.
|
||||
* Azure Site Recovery Support to NIC reduction for vMWare to Azure.
|
||||
* Azure Site Recovery Support to accelerated networking for Azure to Azure.
|
||||
* Azure Site Recovery Support to agent auto update for Azure to Azure.
|
||||
* Azure Site Recovery Support to Standard SSD for Azure to Azure.
|
||||
* Azure Site Recovery Support to Azure Disk Encryption two pass for Azure to Azure.
|
||||
* Azure Site Recovery Support to protect newly added disk for Azure to Azure.
|
||||
* Added SoftDelete feature for VM and added tests for softdelete'
|
||||
ReleaseNotes = '* Azure Site Recovery support to select disk type at enabling protection.
|
||||
* Azure Site Recovery bug fix for recovery plan action edit.
|
||||
* Azure Backup SQL Restore support to accept filestream DBs.'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 2.1.0
|
||||
|
||||
* Azure Site Recovery support to select disk type at enabling protection.
|
||||
* Azure Site Recovery bug fix for recovery plan action edit.
|
||||
* Azure Backup SQL Restore support to accept filestream DBs.
|
||||
|
|
|
@ -42,5 +42,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("2.0.1")]
|
||||
[assembly: AssemblyFileVersion("2.0.1")]
|
||||
[assembly: AssemblyVersion("2.1.0")]
|
||||
[assembly: AssemblyFileVersion("2.1.0")]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Microsoft Corporation
|
||||
#
|
||||
# Generated on: 10/11/2019
|
||||
# Generated on: 11/19/2019
|
||||
#
|
||||
|
||||
@{
|
||||
|
@ -12,7 +12,7 @@
|
|||
# RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.1.1'
|
||||
ModuleVersion = '1.2.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = 'Core', 'Desktop'
|
||||
|
@ -118,7 +118,8 @@ PrivateData = @{
|
|||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
ReleaseNotes = '* Updated ''Set-AzRedisCache'' reference documentation to include missing values for ''-Size'' parameter'
|
||||
ReleaseNotes = '* Added ''MinimumTlsVersion'' parameter in ''New-AzRedisCache'' and ''Set-AzRedisCache'' cmdlets. Also, added ''MinimumTlsVersion'' in the output of ''Get-AzRedisCache'' cmdlet.
|
||||
* Added validation on ''-Size'' parameter for ''Set-AzRedisCache'' and ''New-AzRedisCache'' cmdlets'
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
- Additional information about change #1
|
||||
-->
|
||||
## Upcoming Release
|
||||
|
||||
## Version 1.2.0
|
||||
* Added `MinimumTlsVersion` parameter in `New-AzRedisCache` and `Set-AzRedisCache` cmdlets. Also, added `MinimumTlsVersion` in the output of `Get-AzRedisCache` cmdlet.
|
||||
* Added validation on `-Size` parameter for `Set-AzRedisCache` and `New-AzRedisCache` cmdlets
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
[assembly: CLSCompliant(false)]
|
||||
[assembly: Guid("6D663ED9-C1A5-438F-B88A-D709562538C6")]
|
||||
[assembly: AssemblyVersion("1.1.1")]
|
||||
[assembly: AssemblyFileVersion("1.1.1")]
|
||||
[assembly: AssemblyVersion("1.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.0")]
|
||||
#if !SIGN
|
||||
[assembly: InternalsVisibleTo("Microsoft.Azure.PowerShell.Cmdlets.RedisCache.Test")]
|
||||
#endif
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче