Inheritance: Microsoft.Azure.Commands.OperationalInsights.OperationalInsightsParametersBase
        public override void ExecuteCmdlet()
        {
            CreatePSStorageInsightParameters parameters = new CreatePSStorageInsightParameters()
            {
                Name = Name,
                StorageAccountResourceId = StorageAccountResourceId,
                StorageAccountKey = StorageAccountKey,
                Tables = Tables != null ? Tables.ToList() : null,
                Containers = Containers != null ? Containers.ToList() : null,
                Force = Force.IsPresent,
                ConfirmAction = ConfirmAction
            };

            if (ParameterSetName == ByWorkspaceObject)
            {
                parameters.ResourceGroupName = Workspace.ResourceGroupName;
                parameters.WorkspaceName = Workspace.Name;
            }
            else
            {
                parameters.ResourceGroupName = ResourceGroupName;
                parameters.WorkspaceName = WorkspaceName;
            }

            WriteObject(OperationalInsightsClient.CreatePSStorageInsight(parameters));
        }
Exemplo n.º 2
0
        public override void ExecuteCmdlet()
        {
            CreatePSStorageInsightParameters parameters = new CreatePSStorageInsightParameters()
            {
                Name = Name,
                StorageAccountResourceId = StorageAccountResourceId,
                StorageAccountKey        = StorageAccountKey,
                Tables = Tables != null?Tables.ToList() : null,
                             Containers                                         = Containers != null?Containers.ToList() : null,
                                                                  Force         = Force.IsPresent,
                                                                  ConfirmAction = ConfirmAction
            };

            if (ParameterSetName == ByWorkspaceObject)
            {
                parameters.ResourceGroupName = Workspace.ResourceGroupName;
                parameters.WorkspaceName     = Workspace.Name;
            }
            else
            {
                parameters.ResourceGroupName = ResourceGroupName;
                parameters.WorkspaceName     = WorkspaceName;
            }

            WriteObject(OperationalInsightsClient.CreatePSStorageInsight(parameters));
        }