public override void ExecuteCmdlet()
        {
            if (this.IsParameterBound(c => c.WorkspaceObject))
            {
                var resourceIdentifier = new ResourceIdentifier(this.WorkspaceObject.Id);
                this.ResourceGroupName = resourceIdentifier.ResourceGroupName;
                this.WorkspaceName     = this.WorkspaceObject.Name;
            }

            if (this.IsParameterBound(c => c.ResourceId))
            {
                var resourceIdentifier = new ResourceIdentifier(this.ResourceId);
                this.ResourceGroupName = resourceIdentifier.ResourceGroupName;
                this.WorkspaceName     = resourceIdentifier.ResourceName;
            }

            ConfirmAction(
                string.Format(Resources.UpdatingManagedIdentity, this.WorkspaceName),
                this.WorkspaceName,
                () =>
            {
                var desiredState = Enabled ? ManagedIdentitySqlControlSettingsState.Enabled : ManagedIdentitySqlControlSettingsState.Disabled;
                var result       = new PSManagedIdentitySqlControlSettingsModel(SynapseAnalyticsClient.UpdateManagedIdentitySqlControlSetting(this.ResourceGroupName, this.WorkspaceName, desiredState));
                WriteObject(result);
            });
        }
        public override void ExecuteCmdlet()
        {
            if (this.IsParameterBound(c => c.WorkspaceObject))
            {
                var resourceIdentifier = new ResourceIdentifier(this.WorkspaceObject.Id);
                this.ResourceGroupName = resourceIdentifier.ResourceGroupName;
                this.WorkspaceName     = this.WorkspaceObject.Name;
            }

            if (this.IsParameterBound(c => c.ResourceId))
            {
                var resourceIdentifier = new ResourceIdentifier(this.ResourceId);
                this.ResourceGroupName = resourceIdentifier.ResourceGroupName;
                this.WorkspaceName     = resourceIdentifier.ResourceName;
            }

            var result = new PSManagedIdentitySqlControlSettingsModel(SynapseAnalyticsClient.GetManagedIdentitySqlControlSetting(this.ResourceGroupName, this.WorkspaceName));

            WriteObject(result);
        }