Skip to content

Commit 2c45093

Browse files
committed
Initial DataCollection Change
1 parent 1d15258 commit 2c45093

File tree

5 files changed

+21566
-22447
lines changed

5 files changed

+21566
-22447
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet
207207
[ValidateSetAttribute(new[] { "4.0", "latest", "5.0PP" })]
208208
public string WmfVersion { get; set; }
209209

210+
/// <summary>
211+
/// The Extension Data Collection state
212+
/// </summary>
213+
[Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Enables or Disables Data Collection in the extension. It is enabled if it is not specified. The value is persisted in the extension between calls.")]
214+
[ValidateSet("Enable", "Disable")]
215+
[AllowNull]
216+
public string DataCollection { get; set; }
217+
210218
//Private Variables
211219
private const string VersionRegexExpr = @"^(([0-9])\.)\d+$";
212220

@@ -309,6 +317,7 @@ private void CreateConfiguration()
309317

310318
publicSettings.SasToken = configurationUris.SasToken;
311319
publicSettings.ModulesUrl = configurationUris.ModulesUrl;
320+
publicSettings.DataCollection = this.DataCollection;
312321
publicSettings.ConfigurationFunction = string.Format(
313322
CultureInfo.InvariantCulture,
314323
"{0}\\{1}",

src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.dll-Help.xml

Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11782,6 +11782,298 @@ PS C:\&gt; Save-AzureRmVMImage -ResourceGroupName &quot;ResourceGroup11&quot; -V
1178211782
</command:parameter>
1178311783
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
1178411784
<maml:name>VMName</maml:name>
11785+
<<<<<<< HEAD
11786+
=======
11787+
<maml:description>
11788+
<maml:para>The virtual machine name</maml:para>
11789+
</maml:description>
11790+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11791+
<dev:type>
11792+
<maml:name>string</maml:name>
11793+
<maml:uri />
11794+
</dev:type>
11795+
<dev:defaultValue>
11796+
</dev:defaultValue>
11797+
</command:parameter>
11798+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
11799+
<maml:name>Name</maml:name>
11800+
<maml:description>
11801+
<maml:para>Name of the ARM resource that represents the extension. The Set-AzureRmVMDscExtension cmdlet sets this name to 'Microsoft.Powershell.DSC', which is the same value used by Get-AzureRmVMDscExtension. Specify this parameter only if you changed the default name in the Set cmdlet or used a different resource name in an ARM template.</maml:para>
11802+
</maml:description>
11803+
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
11804+
<dev:type>
11805+
<maml:name>String</maml:name>
11806+
<maml:uri />
11807+
</dev:type>
11808+
<dev:defaultValue>
11809+
</dev:defaultValue>
11810+
</command:parameter>
11811+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
11812+
<maml:name>Status</maml:name>
11813+
<maml:description>
11814+
<maml:para>Output shows status when the switch is present</maml:para>
11815+
</maml:description>
11816+
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
11817+
<dev:type>
11818+
<maml:name>SwitchParameter</maml:name>
11819+
<maml:uri />
11820+
</dev:type>
11821+
<dev:defaultValue>
11822+
</dev:defaultValue>
11823+
</command:parameter>
11824+
</command:parameters>
11825+
<!-- Input - Output section-->
11826+
<command:inputTypes>
11827+
<command:inputType>
11828+
<dev:type>
11829+
<maml:name>
11830+
</maml:name>
11831+
<maml:uri />
11832+
<maml:description />
11833+
</dev:type>
11834+
<maml:description>
11835+
<maml:para>
11836+
<!-- description -->
11837+
</maml:para>
11838+
</maml:description>
11839+
</command:inputType>
11840+
</command:inputTypes>
11841+
<command:returnValues>
11842+
<command:returnValue>
11843+
<dev:type>
11844+
<maml:name>Microsoft.Azure.Commands.Compute.Extension.DSC.VirtualMachineDscExtensionContext</maml:name>
11845+
<maml:uri />
11846+
<maml:description />
11847+
</dev:type>
11848+
<maml:description>
11849+
<maml:para>
11850+
<!-- description -->
11851+
</maml:para>
11852+
</maml:description>
11853+
</command:returnValue>
11854+
</command:returnValues>
11855+
<!-- Error section-->
11856+
<command:terminatingErrors />
11857+
<command:nonTerminatingErrors />
11858+
<!-- Notes section -->
11859+
<maml:alertSet>
11860+
<maml:title>
11861+
</maml:title>
11862+
<maml:alert>
11863+
<maml:para>
11864+
</maml:para>
11865+
<maml:para>Keywords: azure, azurerm, arm, resource, management, manager, compute, vm, iaas</maml:para>
11866+
</maml:alert>
11867+
<maml:alert>
11868+
<maml:para>
11869+
</maml:para>
11870+
</maml:alert>
11871+
</maml:alertSet>
11872+
<!-- Example section -->
11873+
<command:examples>
11874+
<command:example>
11875+
<maml:title>
11876+
-------------------------- EXAMPLE 1 --------------------------
11877+
</maml:title>
11878+
<maml:introduction>
11879+
<maml:para>C:\PS&gt;</maml:para>
11880+
</maml:introduction>
11881+
<dev:code>
11882+
Get-AzureRmVMDscExtension -ResourceGroupName Name -VMName VM -Name 'DSC' </dev:code>
11883+
<dev:remarks>
11884+
<maml:para>Description</maml:para>
11885+
<maml:para>-----------</maml:para>
11886+
<maml:para>Retrieves the settings of extension (Name - 'DSC') on virtual machine 'VM'. Specify Name parameter only when you changed its default value 'Microsoft.Powershell.DSC' to something else ('DSC' in this case) either through Set-AzureRmVMDscExtension cmdlet or an ARM template.</maml:para>
11887+
<maml:para>
11888+
</maml:para>
11889+
<maml:para>
11890+
</maml:para>
11891+
<maml:para>
11892+
</maml:para>
11893+
<maml:para>
11894+
</maml:para>
11895+
</dev:remarks>
11896+
<command:commandLines>
11897+
<command:commandLine>
11898+
<command:commandText>
11899+
</command:commandText>
11900+
</command:commandLine>
11901+
</command:commandLines>
11902+
</command:example>
11903+
</command:examples>
11904+
<!-- Link section -->
11905+
<maml:relatedLinks>
11906+
<maml:navigationLink>
11907+
<maml:linkText>
11908+
</maml:linkText>
11909+
<maml:uri />
11910+
</maml:navigationLink>
11911+
</maml:relatedLinks>
11912+
</command:command>
11913+
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
11914+
<command:details>
11915+
<command:name>
11916+
Set-AzureRmVMDSCExtension
11917+
</command:name>
11918+
<maml:description>
11919+
<maml:para>Configure the Windows PowerShell Desired State Configuration extension on a VM.</maml:para>
11920+
</maml:description>
11921+
<maml:copyright>
11922+
<maml:para>
11923+
</maml:para>
11924+
</maml:copyright>
11925+
<command:verb>Set</command:verb>
11926+
<command:noun>AzureVMDscExtension</command:noun>
11927+
<dev:version>
11928+
</dev:version>
11929+
</command:details>
11930+
<maml:description>
11931+
<maml:para>Configure the Windows PowerShell Desired State Configuration extension on a VM in a resource group</maml:para>
11932+
</maml:description>
11933+
<!-- Cmdlet syntax section-->
11934+
<command:syntax>
11935+
<command:syntaxItem>
11936+
<maml:name>Set-AzureRmVMDSCExtension</maml:name>
11937+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
11938+
<maml:name>ArchiveBlobName</maml:name>
11939+
<maml:description>
11940+
<maml:para>The name of the configuration file that was previously uploaded by Publish-AzureRmVMDSCConfiguration</maml:para>
11941+
</maml:description>
11942+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11943+
</command:parameter>
11944+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
11945+
<maml:name>ResourceGroupName</maml:name>
11946+
<maml:description>
11947+
<maml:para>The name of the resource group that contains the virtual machine</maml:para>
11948+
</maml:description>
11949+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11950+
</command:parameter>
11951+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
11952+
<maml:name>VMName</maml:name>
11953+
<maml:description>
11954+
<maml:para>Name of the virtual machine where dsc extension handler would be installed</maml:para>
11955+
</maml:description>
11956+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11957+
</command:parameter>
11958+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="4">
11959+
<maml:name>ArchiveStorageAccountName</maml:name>
11960+
<maml:description>
11961+
<maml:para>The Azure Storage Account name used to download the ArchiveBlobName</maml:para>
11962+
</maml:description>
11963+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11964+
</command:parameter>
11965+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
11966+
<maml:name>Version</maml:name>
11967+
<maml:description>
11968+
<maml:para>The version of the DSC extension that Set-AzureRmVMDSCExtension will apply the settings to. Allowed format N.N</maml:para>
11969+
</maml:description>
11970+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11971+
</command:parameter>
11972+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
11973+
<maml:name>ConfigurationArgument</maml:name>
11974+
<maml:description>
11975+
<maml:para>A hashtable specifying the arguments to the ConfigurationFunction</maml:para>
11976+
</maml:description>
11977+
<command:parameterValue required="true" variableLength="false">hashtable</command:parameterValue>
11978+
</command:parameter>
11979+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
11980+
<maml:name>ConfigurationData</maml:name>
11981+
<maml:description>
11982+
<maml:para>Path to a .psd1 file that specifies the data for the Configuration</maml:para>
11983+
</maml:description>
11984+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11985+
</command:parameter>
11986+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
11987+
<maml:name>ConfigurationName</maml:name>
11988+
<maml:description>
11989+
<maml:para>Name of the configuration that will be invoked by the DSC Extension</maml:para>
11990+
</maml:description>
11991+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11992+
</command:parameter>
11993+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
11994+
<maml:name>ArchiveResourceGroupName</maml:name>
11995+
<maml:description>
11996+
<maml:para>The name of the resource group that contains the storage account containing the configuration archive.This param is optional if storage account and virtual machine both exists in the same resource group name, specified by ResourceGroupName param</maml:para>
11997+
</maml:description>
11998+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
11999+
</command:parameter>
12000+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
12001+
<maml:name>ArchiveContainerName</maml:name>
12002+
<maml:description>
12003+
<maml:para>Name of the Azure Storage Container where the configuration archive is located</maml:para>
12004+
</maml:description>
12005+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
12006+
</command:parameter>
12007+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
12008+
<maml:name>DataCollection</maml:name>
12009+
<maml:description>
12010+
<maml:para>Enables or Disables Data Collection in the extension. It is enabled if it is not specified. The value is persisted in the extension between calls. Allowed Values are: Enable and Disable</maml:para>
12011+
</maml:description>
12012+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
12013+
</command:parameter>
12014+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
12015+
<maml:name>Force</maml:name>
12016+
<maml:description>
12017+
<maml:para>By default Set-AzureRmVMDscExtension will not overwrite any existing blobs. Use -Force to overwrite them</maml:para>
12018+
</maml:description>
12019+
</command:parameter>
12020+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
12021+
<maml:name>Location</maml:name>
12022+
<maml:description>
12023+
<maml:para>Location of the resource</maml:para>
12024+
</maml:description>
12025+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
12026+
</command:parameter>
12027+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
12028+
<maml:name>Name</maml:name>
12029+
<maml:description>
12030+
<maml:para>Name of the ARM resource that represents the extension. This is defaulted to 'Microsoft.Powershell.DSC'</maml:para>
12031+
</maml:description>
12032+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
12033+
</command:parameter>
12034+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
12035+
<maml:name>ArchiveStorageEndpointSuffix</maml:name>
12036+
<maml:description>
12037+
<maml:para>The Storage Endpoint Suffix</maml:para>
12038+
</maml:description>
12039+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
12040+
</command:parameter>
12041+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
12042+
<maml:name>AutoUpdate</maml:name>
12043+
<maml:description>
12044+
<maml:para>We install the extension handler version specified by the -version param. By default extension handler is not autoupdated. Use -AutoUpdate to enable auto update of extension handler to the latest version as and when it is available.</maml:para>
12045+
</maml:description>
12046+
</command:parameter>
12047+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
12048+
<maml:name>Confirm</maml:name>
12049+
<maml:description>
12050+
<maml:para>Prompts you for confirmation before executing the command.</maml:para>
12051+
</maml:description>
12052+
</command:parameter>
12053+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
12054+
<maml:name>WhatIf</maml:name>
12055+
<maml:description>
12056+
<maml:para>Describes what would happen if you executed the command without actually executing the command.</maml:para>
12057+
</maml:description>
12058+
</command:parameter>
12059+
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="named">
12060+
<maml:name>WmfVersion</maml:name>
12061+
<maml:description>
12062+
<maml:para>
12063+
Specifies the version of the Windows Management Framework (WMF) to install on the VM. The DSC Azure Extension depends on DSC features that are only available in the WMF updates. This parameter specifies which version of the update to install on the VM. The possible values are "4.0","latest" and "5.0PP".
12064+
A value of "4.0" will install KB3000850 (http://support.microsoft.com/kb/3000850) on Windows 8.1 or Windows Server 2012 R2, or WMF 4.0 (http://www.microsoft.com/en-us/download/details.aspx?id=40855) on other versions of Windows if a newer version isnt already installed.
12065+
A value of "5.0PP" will install the latest release of WMF 5.0PP (http://go.microsoft.com/fwlink/?LinkId=398175). A value of "latest" will install the latest WMF, currently WMF 5.0PP. The default value is "latest"
12066+
</maml:para>
12067+
</maml:description>
12068+
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
12069+
</command:parameter>
12070+
</command:syntaxItem>
12071+
</command:syntax>
12072+
<!-- Cmdlet parameter section -->
12073+
<command:parameters>
12074+
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
12075+
<maml:name>ArchiveBlobName</maml:name>
12076+
>>>>>>> Initial DataCollection Change
1178512077
<maml:description>
1178612078
<maml:para>Specifies the name of a virtual machine.</maml:para>
1178712079
</maml:description>

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/DscExtensionPublicSettings.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,14 @@ public class Property
102102
/// on the VM.
103103
/// </summary>
104104
public string WmfVersion { get; set; }
105+
106+
/// <summary>
107+
/// String to set the state of the the extension data collection.
108+
/// Enable will enable
109+
/// Disable will disable
110+
/// Null or empty will leave it in the last state.
111+
/// The default is Enabled.
112+
/// </summary>
113+
public string DataCollection { get; set; }
105114
}
106115
}

src/ServiceManagement/Compute/Commands.ServiceManagement/IaaS/Extensions/DSC/SetAzureVMDscExtension.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ public class SetAzureVMDscExtension : VirtualMachineExtensionCmdletBase
156156
[ValidateSetAttribute(new[] { "4.0", "latest", "5.0PP" })]
157157
public string WmfVersion { get; set; }
158158

159+
/// <summary>
160+
/// The Extension Data Collection state
161+
/// </summary>
162+
[Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Enables or Disables Data Collection in the extension. It is enabled if it is not specified. The value is persisted in the extension between calls.")]
163+
[ValidateSet("Enable", "Disable")]
164+
[AllowNull]
165+
public string DataCollection { get; set; }
166+
159167
/// <summary>
160168
/// Credentials used to access Azure Storage
161169
/// </summary>
@@ -389,6 +397,7 @@ private void CreateConfiguration()
389397

390398
publicSettings.SasToken = configurationUris.SasToken;
391399
publicSettings.ModulesUrl = configurationUris.ModulesUrl;
400+
publicSettings.DataCollection = this.DataCollection;
392401
publicSettings.ConfigurationFunction = string.Format(
393402
CultureInfo.InvariantCulture,
394403
"{0}\\{1}",

0 commit comments

Comments
 (0)