GetDataSliceRunLogsSharedAccessSignature() 공개 메소드

public GetDataSliceRunLogsSharedAccessSignature ( string resourceGroupName, string dataFactoryName, string dataSliceRunId ) : Uri
resourceGroupName string
dataFactoryName string
dataSliceRunId string
리턴 System.Uri
        public override void ExecuteCmdlet()
        {
            if (ParameterSetName == ByFactoryObject)
            {
                if (DataFactory == null)
                {
                    throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid));
                }

                DataFactoryName   = DataFactory.DataFactoryName;
                ResourceGroupName = DataFactory.ResourceGroupName;
            }

            PSRunLogInfo runLog =
                DataFactoryClient.GetDataSliceRunLogsSharedAccessSignature(
                    ResourceGroupName, DataFactoryName, Id);

            if (DownloadLogs.IsPresent)
            {
                string directory = string.IsNullOrWhiteSpace(Output)
                    ? Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
                    : Output;

                if (!HaveWriteAccess(directory))
                {
                    throw new IOException(string.Format(CultureInfo.InvariantCulture, Resources.NoWriteAccessToDirectory, directory));
                }

                try
                {
                    DataFactoryClient.DownloadFileToBlob(new BlobDownloadParameters()
                    {
                        Directory   = directory,
                        SasUri      = new Uri(runLog.SasUri),
                        Credentials = new StorageCredentials(runLog.SasToken)
                    });
                }
                catch
                {
                    throw new Exception(string.Format(CultureInfo.InvariantCulture, Resources.DownloadFailed, directory));
                }

                WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.DownloadLogCompleted, directory));
            }

            WriteObject(runLog);
        }