Exemplo n.º 1
0
        public override void ExecuteCmdlet()
        {
            if (!OperationalInsightsClient.DeletedWorkspace(ResourceGroupName, Name))
            {
                throw new ArgumentException("workspace: " + Name + " under resource group: " + ResourceGroupName + " is not available to restore");
            }

            CreatePSWorkspaceParameters parameters = new CreatePSWorkspaceParameters()
            {
                ResourceGroupName = ResourceGroupName,
                WorkspaceName     = Name,
                Location          = Location,
                ConfirmAction     = ConfirmAction
            };

            WriteObject(OperationalInsightsClient.CreatePSWorkspace(parameters));
        }