예제 #1
0
        public async Task <DatasetCreateOrUpdateResponse> CreateOrUpdateAsync(
            string resourceGroupName,
            string dataFactoryName,
            DatasetCreateOrUpdateParameters parameters,
            CancellationToken cancellationToken)
        {
            Core.Models.DatasetCreateOrUpdateParameters internalParameters = this.ValidateAndConvert(parameters);

            Core.Models.DatasetCreateOrUpdateResponse response =
                await this.Client.InternalClient.Datasets.CreateOrUpdateAsync(
                    resourceGroupName,
                    dataFactoryName,
                    internalParameters,
                    cancellationToken);

            return(new DatasetCreateOrUpdateResponse(response, this.Client));
        }
예제 #2
0
        public async Task <DatasetCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(
            string resourceGroupName,
            string dataFactoryName,
            string datasetName,
            DatasetCreateOrUpdateWithRawJsonContentParameters parameters,
            CancellationToken cancellationToken)
        {
            var internalParameters = new Core.Models.DatasetCreateOrUpdateWithRawJsonContentParameters(parameters.Content);

            Core.Models.DatasetCreateOrUpdateResponse response =
                await this.Client.InternalClient.Datasets.CreateOrUpdateWithRawJsonContentAsync(
                    resourceGroupName,
                    dataFactoryName,
                    datasetName,
                    internalParameters,
                    cancellationToken);

            return(new DatasetCreateOrUpdateResponse(response, this.Client));
        }
예제 #3
0
        public async Task <DatasetCreateOrUpdateResponse> GetCreateOrUpdateStatusAsync(
            string operationStatusLink,
            CancellationToken cancellationToken)
        {
            Ensure.IsNotNull(operationStatusLink, "operationStatusLink");

            Core.Models.DatasetCreateOrUpdateResponse internalResponse =
                await this.Client.InternalClient.Datasets.GetCreateOrUpdateStatusAsync(
                    operationStatusLink,
                    cancellationToken);

            var response = new DatasetCreateOrUpdateResponse(internalResponse, this.Client);

            if (internalResponse.Dataset != null && internalResponse.Dataset.Properties != null &&
                internalResponse.Dataset.Properties.ProvisioningState != null)
            {
                response.Status = internalResponse.Dataset.Properties.ProvisioningState.ToOperationStatus();
            }

            return(response);
        }