Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Microsoft.WindowsAzure.Storage.Blob;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Management.Automation;
Expand Down Expand Up @@ -206,6 +207,17 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet
[ValidateSetAttribute(new[] { "4.0", "latest", "5.0PP" })]
public string WmfVersion { get; set; }

/// <summary>
/// The Extension Data Collection state
/// </summary>
[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.")
]
[ValidateSet("Enable", "Disable")]
[AllowNull]
public string DataCollection { get; set; }

//Private Variables
private const string VersionRegexExpr = @"^(([0-9])\.)\d+$";

Expand Down Expand Up @@ -310,6 +322,11 @@ private void CreateConfiguration()

publicSettings.SasToken = configurationUris.SasToken;
publicSettings.ModulesUrl = configurationUris.ModulesUrl;

Hashtable privacySetting = new Hashtable();
privacySetting.Add("DataCollection", DataCollection);
publicSettings.Privacy = privacySetting;

publicSettings.ConfigurationFunction = string.Format(
CultureInfo.InvariantCulture,
"{0}\\{1}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9932,6 +9932,13 @@ Get-AzureRmVMDscExtension -ResourceGroupName Name -VMName VM -Name 'DSC' </dev:c
</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>DataCollection</maml:name>
<maml:description>
<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>
</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
Expand Down Expand Up @@ -10227,6 +10234,18 @@ Get-AzureRmVMDscExtension -ResourceGroupName Name -VMName VM -Name 'DSC' </dev:c
</dev:type>
<dev:defaultValue>latest</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>DataCollection</maml:name>
<maml:description>
<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>
</maml:description>
<command:parameterValue required="false" variableLength="false">string</command:parameterValue>
<dev:type>
<maml:name>string</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue />
</command:parameter>
</command:parameters>
<!-- Input - Output section-->
<command:inputTypes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public class Property
/// </summary>
public Property[] Properties { get; set; }

/// <summary>
/// Privacy parameters
/// </summary>
public Hashtable Privacy { get; set; }

/// <summary>
/// Version of the protocol (DscExtensionPublicSettings and DscExtensionPrivateSettings mostly).
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Microsoft.WindowsAzure.Storage.Blob;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Management.Automation;
Expand Down Expand Up @@ -156,6 +157,17 @@ public class SetAzureVMDscExtension : VirtualMachineExtensionCmdletBase
[ValidateSetAttribute(new[] { "4.0", "latest", "5.0PP" })]
public string WmfVersion { get; set; }

/// <summary>
/// The Extension Data Collection state
/// </summary>
[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.")
]
[ValidateSet("Enable", "Disable")]
[AllowNull]
public string DataCollection { get; set; }

/// <summary>
/// Credentials used to access Azure Storage
/// </summary>
Expand Down Expand Up @@ -389,6 +401,11 @@ private void CreateConfiguration()

publicSettings.SasToken = configurationUris.SasToken;
publicSettings.ModulesUrl = configurationUris.ModulesUrl;

Hashtable privacySetting = new Hashtable();
privacySetting.Add("DataCollection",DataCollection);
publicSettings.Privacy = privacySetting;

publicSettings.ConfigurationFunction = string.Format(
CultureInfo.InvariantCulture,
"{0}\\{1}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33144,6 +33144,13 @@ If omitted, this parameter will default to the name of the file given by the Con
</maml:description>
<command:parameterValue required="true" variableLength="false">IPersistentVM</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>DataCollection</maml:name>
<maml:description>
<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>
</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>WhatIf</maml:name>
<maml:description>
Expand Down Expand Up @@ -33356,6 +33363,18 @@ A value of "5.0PP" will install the latest release of WMF 5.0PP (http://go.micro
</dev:type>
<dev:defaultValue>latest</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named">
<maml:name>DataCollection</maml:name>
<maml:description>
<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>
</maml:description>
<command:parameterValue required="false" variableLength="false">string</command:parameterValue>
<dev:type>
<maml:name>string</maml:name>
<maml:uri />
</dev:type>
<dev:defaultValue />
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
Expand Down