示例#1
0
        public async Task <LinkedServiceCreateOrUpdateResponse> BeginCreateOrUpdateAsync(
            string resourceGroupName,
            string dataFactoryName,
            LinkedServiceCreateOrUpdateParameters parameters,
            CancellationToken cancellationToken)
        {
            Core.Models.LinkedServiceCreateOrUpdateParameters internalParameters = this.ValidateAndConvert(parameters);

            Core.Models.LinkedServiceCreateOrUpdateResponse response =
                await this.Client.InternalClient.LinkedServices.BeginCreateOrUpdateAsync(
                    resourceGroupName,
                    dataFactoryName,
                    internalParameters,
                    cancellationToken);

            return(new LinkedServiceCreateOrUpdateResponse(response, this.Client));
        }
示例#2
0
        public async Task <LinkedServiceCreateOrUpdateResponse> CreateOrUpdateWithRawJsonContentAsync(
            string resourceGroupName,
            string dataFactoryName,
            string linkedServiceName,
            LinkedServiceCreateOrUpdateWithRawJsonContentParameters parameters,
            CancellationToken cancellationToken)
        {
            var internalParameters =
                new Core.Models.LinkedServiceCreateOrUpdateWithRawJsonContentParameters(parameters.Content);

            Core.Models.LinkedServiceCreateOrUpdateResponse response =
                await this.Client.InternalClient.LinkedServices.CreateOrUpdateWithRawJsonContentAsync(
                    resourceGroupName,
                    dataFactoryName,
                    linkedServiceName,
                    internalParameters,
                    cancellationToken);

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

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

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

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

            return(response);
        }