public override void ExecuteCmdlet() { PSStorageInsightParameters parameters = null; if (ParameterSetName == ByWorkspaceObject) { ResourceGroupName = Workspace.ResourceGroupName; WorkspaceName = Workspace.Name; } parameters = new PSStorageInsightParameters { ResourceGroupName = ResourceGroupName, WorkspaceName = WorkspaceName, Name = Name, StorageAccountKey = StorageAccountKey, StorageAccountResourceId = StorageAccountResourceId, Containers = Containers?.ToList(), Tables = Tables?.ToList(), Etag = ETag, Tags = Tag }; if (ShouldProcess(Name, $"Update StorageInsight: {Name}, in workspace: {WorkspaceName}, resource group: {ResourceGroupName}")) { WriteObject(OperationalInsightsClient.UpdatePSStorageInsight(parameters)); } }
public override void ExecuteCmdlet() { if (ParameterSetName == ByWorkspaceObject) { ResourceGroupName = Workspace.ResourceGroupName; WorkspaceName = Workspace.Name; } UpdatePSStorageInsightParameters parameters = new UpdatePSStorageInsightParameters { ResourceGroupName = ResourceGroupName, WorkspaceName = WorkspaceName, Name = Name, StorageAccountKey = StorageAccountKey, Containers = Containers != null?Containers.ToList() : null, Tables = Tables != null?Tables.ToList() : null }; WriteObject(OperationalInsightsClient.UpdatePSStorageInsight(parameters)); }