public DeleteGateway(IGatewayOperations gatewayClient, string virtualNetworkSiteName)
        {
            this.gatewayClient = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;

            oldGetGatewayResponse = gatewayClient.Get(virtualNetworkSiteName);
        }
        public SetIPsecParameters(IGatewayOperations gatewayClient, string virtualNetworkSiteName, string localNetworkSiteName, GatewaySetIPsecParametersParameters parameters)
        {
            this.gatewayClient = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;
            this.localNetworkSiteName = localNetworkSiteName;
            this.parameters = parameters;

            oldIPsecParameters = gatewayClient.GetIPsecParameters(virtualNetworkSiteName, localNetworkSiteName);
        }
        public SetSharedKey(IGatewayOperations gatewayClient, string virtualNetworkSiteName, string localNetworkSiteName, GatewaySetSharedKeyParameters parameters)
        {
            this.gatewayClient = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;
            this.localNetworkSiteName = localNetworkSiteName;
            this.parameters = parameters;

            oldSharedKey = gatewayClient.GetSharedKey(virtualNetworkSiteName, localNetworkSiteName).SharedKey;
        }
        public ResizeGateway(IGatewayOperations gatewayClient, string virtualNetworkSiteName, ResizeGatewayParameters parameters)
        {
            this.gatewayClient = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;
            this.parameters = parameters;

            if (string.IsNullOrWhiteSpace(virtualNetworkSiteName) == false)
            {
                oldGetResponse = gatewayClient.Get(virtualNetworkSiteName);
            }
        }
 /// <summary>
 /// Initializes a new instance of the DataPipelineManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public DataPipelineManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._dataFactories         = new DataFactoryOperations(this);
     this._dataSlices            = new DataSliceOperations(this);
     this._dataSliceRuns         = new DataSliceRunOperations(this);
     this._encryptionCertificate = new EncryptionCertificateOperations(this);
     this._gateways          = new GatewayOperations(this);
     this._hubs              = new HubOperations(this);
     this._linkedServices    = new LinkedServiceOperations(this);
     this._pipelines         = new PipelineOperations(this);
     this._pipelineRuns      = new PipelineRunOperations(this);
     this._tables            = new TableOperations(this);
     this.HttpClient.Timeout = TimeSpan.FromSeconds(60);
 }
        public RemoveDefaultSites(IGatewayOperations gatewayClient, string virtualNetworkSiteName)
        {
            this.gatewayClient = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;

            GatewayGetResponse getGatewayResponse = gatewayClient.Get(virtualNetworkSiteName);
            if (getGatewayResponse.DefaultSite == null || string.IsNullOrEmpty(getGatewayResponse.DefaultSite.Name))
            {
                oldDefaultSite = "";
            }
            else
            {
                oldDefaultSite = getGatewayResponse.DefaultSite.Name;
            }
        }
 /// <summary>
 /// Initializes a new instance of the NetworkManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 private NetworkManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._clientRootCertificates = new ClientRootCertificateOperations(this);
     this._gateways = new GatewayOperations(this);
     this._networks = new NetworkOperations(this);
     this._networkSecurityGroups = new NetworkSecurityGroupOperations(this);
     this._reservedIPs = new ReservedIPOperations(this);
     this._routes = new RouteOperations(this);
     this._staticIPs = new StaticIPOperations(this);
     this._apiVersion = "2014-10-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
示例#8
0
 /// <summary>
 /// Initializes a new instance of the DataPipelineManagementClient
 /// class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public DataPipelineManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._dataFactories  = new DataFactoryOperations(this);
     this._dataSlices     = new DataSliceOperations(this);
     this._dataSliceRuns  = new DataSliceRunOperations(this);
     this._gateways       = new GatewayOperations(this);
     this._hubs           = new HubOperations(this);
     this._linkedServices = new LinkedServiceOperations(this);
     this._pipelines      = new PipelineOperations(this);
     this._pipelineRuns   = new PipelineRunOperations(this);
     this._tables         = new TableOperations(this);
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(60);
 }
示例#9
0
        public RemoveDefaultSites(IGatewayOperations gatewayClient, string virtualNetworkSiteName)
        {
            this.gatewayClient          = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;

            GatewayGetResponse getGatewayResponse = gatewayClient.Get(virtualNetworkSiteName);

            if (getGatewayResponse.DefaultSite == null || string.IsNullOrEmpty(getGatewayResponse.DefaultSite.Name))
            {
                oldDefaultSite = "";
            }
            else
            {
                oldDefaultSite = getGatewayResponse.DefaultSite.Name;
            }
        }
 /// <summary>
 /// Retrieve gateway connection information.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.Core.IGatewayOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='gatewayName'>
 /// Required. Name of the gateway.
 /// </param>
 /// <returns>
 /// The retrieve gateway connection information operation response.
 /// </returns>
 public static GatewayConnectionInfoRetrieveResponse RetrieveConnectionInfo(
     this IGatewayOperations operations,
     string resourceGroupName,
     string dataFactoryName,
     string gatewayName)
 {
     return(Task.Factory.StartNew(
                s => ((IGatewayOperations)s).RetrieveConnectionInfoAsync(
                    resourceGroupName,
                    dataFactoryName,
                    gatewayName),
                operations,
                CancellationToken.None,
                TaskCreationOptions.None,
                TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create or update a data factory gateway.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.Core.IGatewayOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a data
 /// factory gateway.
 /// </param>
 /// <returns>
 /// The create or update data factory gateway operation response.
 /// </returns>
 public static GatewayCreateOrUpdateResponse BeginCreateOrUpdate(
     this IGatewayOperations operations,
     string resourceGroupName,
     string dataFactoryName,
     GatewayCreateOrUpdateParameters parameters)
 {
     return(Task.Factory.StartNew(
                s => ((IGatewayOperations)s).BeginCreateOrUpdateAsync(
                    resourceGroupName,
                    dataFactoryName,
                    parameters),
                operations,
                CancellationToken.None,
                TaskCreationOptions.None,
                TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
        public SetDefaultSites(IGatewayOperations gatewayClient, string virtualNetworkSiteName, GatewaySetDefaultSiteListParameters parameters)
        {
            this.gatewayClient = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;
            this.parameters = parameters;

            GatewayGetResponse getGatewayResponse = gatewayClient.Get(virtualNetworkSiteName);
            if (getGatewayResponse.DefaultSite == null || string.IsNullOrEmpty(getGatewayResponse.DefaultSite.Name))
            {
                oldDefaultSite = "";
            }
            else
            {
                oldDefaultSite = getGatewayResponse.DefaultSite.Name;    
            }
        }
        public SetDefaultSites(IGatewayOperations gatewayClient, string virtualNetworkSiteName, GatewaySetDefaultSiteListParameters parameters)
        {
            this.gatewayClient          = gatewayClient;
            this.virtualNetworkSiteName = virtualNetworkSiteName;
            this.parameters             = parameters;

            GatewayGetResponse getGatewayResponse = gatewayClient.Get(virtualNetworkSiteName);

            if (getGatewayResponse.DefaultSite == null || string.IsNullOrEmpty(getGatewayResponse.DefaultSite.Name))
            {
                oldDefaultSite = "";
            }
            else
            {
                oldDefaultSite = getGatewayResponse.DefaultSite.Name;
            }
        }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the DataFactoryManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public DataFactoryManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._activityTypes  = new ActivityTypeOperations(this);
     this._computeTypes   = new ComputeTypeOperations(this);
     this._dataFactories  = new DataFactoryOperations(this);
     this._datasets       = new DatasetOperations(this);
     this._dataSlices     = new DataSliceOperations(this);
     this._dataSliceRuns  = new DataSliceRunOperations(this);
     this._gateways       = new GatewayOperations(this);
     this._hubs           = new HubOperations(this);
     this._linkedServices = new LinkedServiceOperations(this);
     this._oAuth          = new OAuthOperations(this);
     this._pipelines      = new PipelineOperations(this);
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(60);
 }
示例#15
0
 /// <summary>
 /// Initializes a new instance of the NetworkManagementClient class.
 /// </summary>
 public NetworkManagementClient()
     : base()
 {
     this._applicationGateways    = new ApplicationGatewayOperations(this);
     this._clientRootCertificates = new ClientRootCertificateOperations(this);
     this._gateways              = new GatewayOperations(this);
     this._iPForwarding          = new IPForwardingOperations(this);
     this._networks              = new NetworkOperations(this);
     this._networkSecurityGroups = new NetworkSecurityGroupOperations(this);
     this._reservedIPs           = new ReservedIPOperations(this);
     this._routes     = new RouteOperations(this);
     this._staticIPs  = new StaticIPOperations(this);
     this._virtualIPs = new VirtualIPOperations(this);
     this._apiVersion = "2015-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
示例#16
0
 public CreateGateway(IGatewayOperations gatewayClient, string virtualNetworkSiteName, GatewayCreateParameters parameters)
 {
     this.gatewayClient = gatewayClient;
     this.virtualNetworkSiteName = virtualNetworkSiteName;
     this.parameters = parameters;
 }
 public GatewayTestClient(NetworkTestClient testClient, IGatewayOperations gatewayClient)
 {
     this.testClient = testClient;
     this.gatewayClient = gatewayClient;
 }
 /// <summary>
 /// Gets all the gateway resources in a given subscription.
 /// </summary>
 /// <remarks>
 /// Gets the information about all gateway resources in a given resource group.
 /// The information include the description and other properties of the
 /// gateway.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <GatewayResourceDescription> ListBySubscriptionNext(this IGatewayOperations operations, string nextPageLink)
 {
     return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets the gateway resource with the given name.
 /// </summary>
 /// <remarks>
 /// Gets the information about the gateway resource with the given name. The
 /// information include the description and other properties of the gateway.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 /// <param name='gatewayResourceName'>
 /// The identity of the gateway.
 /// </param>
 public static GatewayResourceDescription Get(this IGatewayOperations operations, string resourceGroupName, string gatewayResourceName)
 {
     return(operations.GetAsync(resourceGroupName, gatewayResourceName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the gateway resources in a given subscription.
 /// </summary>
 /// <remarks>
 /// Gets the information about all gateway resources in a given resource group.
 /// The information include the description and other properties of the
 /// gateway.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <GatewayResourceDescription> ListBySubscription(this IGatewayOperations operations)
 {
     return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the gateway resources in a given subscription.
 /// </summary>
 /// <remarks>
 /// Gets the information about all gateway resources in a given resource group.
 /// The information include the description and other properties of the
 /// gateway.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <GatewayResourceDescription> > ListBySubscriptionAsync(this IGatewayOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Returns gateways in a resource group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <GatewayResource> > ListForResourceGroupNextAsync(this IGatewayOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListForResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#23
0
 /// <summary>
 /// Delete a data factory gateway.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IGatewayOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='gatewayName'>
 /// Required. Name of the gateway to delete.
 /// </param>
 /// <returns>
 /// A standard service response for long running operations.
 /// </returns>
 public static Task <LongRunningOperationResponse> BeginDeleteAsync(this IGatewayOperations operations, string resourceGroupName, string dataFactoryName, string gatewayName)
 {
     return(operations.BeginDeleteAsync(resourceGroupName, dataFactoryName, gatewayName, CancellationToken.None));
 }
 /// <summary>
 /// Creates or updates a ManagementService gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name uniquely identifies the resource group within the
 /// user subscriptionId.
 /// </param>
 /// <param name='gatewayName'>
 /// The gateway name (256 characters maximum).
 /// </param>
 /// <param name='location'>
 /// location of the resource
 /// </param>
 /// <param name='tags'>
 /// resource tags
 /// </param>
 /// <param name='autoUpgrade'>
 /// The autoUpgrade property gives the flexibility to gateway to auto upgrade
 /// itself. If properties value not specified, then we assume autoUpgrade =
 /// Off. Possible values include: 'On', 'Off'
 /// </param>
 public static GatewayResource Create(this IGatewayOperations operations, string resourceGroupName, string gatewayName, string location = default(string), object tags = default(object), AutoUpgrade?autoUpgrade = default(AutoUpgrade?))
 {
     return(Task.Factory.StartNew(s => ((IGatewayOperations)s).CreateAsync(resourceGroupName, gatewayName, location, tags, autoUpgrade), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a gateway profile
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name uniquely identifies the resource group within the
 /// user subscriptionId.
 /// </param>
 /// <param name='gatewayName'>
 /// The gateway name (256 characters maximum).
 /// </param>
 public static GatewayProfile BeginGetProfile(this IGatewayOperations operations, string resourceGroupName, string gatewayName)
 {
     return(Task.Factory.StartNew(s => ((IGatewayOperations)s).BeginGetProfileAsync(resourceGroupName, gatewayName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Returns a gateway
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name uniquely identifies the resource group within the
 /// user subscriptionId.
 /// </param>
 /// <param name='gatewayName'>
 /// The gateway name (256 characters maximum)
 /// </param>
 /// <param name='expand'>
 /// Gets subscription credentials which uniquely identify Microsoft Azure
 /// subscription. The subscription ID forms part of the URI for every service
 /// call. Possible values include: 'status'
 /// </param>
 public static GatewayResource Get(this IGatewayOperations operations, string resourceGroupName, string gatewayName, GatewayExpandOption?expand = default(GatewayExpandOption?))
 {
     return(Task.Factory.StartNew(s => ((IGatewayOperations)s).GetAsync(resourceGroupName, gatewayName, expand), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
示例#27
0
 /// <summary>
 /// Retrieve gateway connection information.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IGatewayOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='gatewayName'>
 /// Required. Name of the gateway.
 /// </param>
 /// <returns>
 /// The retrieve gateway connection information operation response.
 /// </returns>
 public static Task <GatewayConnectionInfoRetrieveResponse> RetrieveConnectionInfoAsync(this IGatewayOperations operations, string resourceGroupName, string dataFactoryName, string gatewayName)
 {
     return(operations.RetrieveConnectionInfoAsync(resourceGroupName, dataFactoryName, gatewayName, CancellationToken.None));
 }
示例#28
0
 /// <summary>
 /// Regenerate gateway key.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IGatewayOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='gatewayName'>
 /// Required. The name of the gateway to regenerate key.
 /// </param>
 /// <returns>
 /// The regenerate gateway key operation response.
 /// </returns>
 public static Task <GatewayRegenerateKeyResponse> RegenerateKeyAsync(this IGatewayOperations operations, string resourceGroupName, string dataFactoryName, string gatewayName)
 {
     return(operations.RegenerateKeyAsync(resourceGroupName, dataFactoryName, gatewayName, CancellationToken.None));
 }
示例#29
0
 /// <summary>
 /// List all gateways under a data factory.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IGatewayOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <returns>
 /// The List data factory gateways operation response.
 /// </returns>
 public static Task <GatewayListResponse> ListAsync(this IGatewayOperations operations, string resourceGroupName, string dataFactoryName)
 {
     return(operations.ListAsync(resourceGroupName, dataFactoryName, CancellationToken.None));
 }
示例#30
0
 /// <summary>
 /// The Get Operation Status operation returns the status of the
 /// specified operation. After calling an asynchronous operation, you
 /// can call Get Operation Status to determine whether the operation
 /// has succeeded, failed, or is still in progress.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IGatewayOperations.
 /// </param>
 /// <param name='operationStatusLink'>
 /// Required. Location value returned by the Begin operation.
 /// </param>
 /// <returns>
 /// The create or update data factory gateway operation response.
 /// </returns>
 public static Task <GatewayCreateOrUpdateResponse> GetCreateOrUpdateStatusAsync(this IGatewayOperations operations, string operationStatusLink)
 {
     return(operations.GetCreateOrUpdateStatusAsync(operationStatusLink, CancellationToken.None));
 }
 /// <summary>
 /// Upgrade a gateway
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name uniquely identifies the resource group within the
 /// user subscriptionId.
 /// </param>
 /// <param name='gatewayName'>
 /// The gateway name (256 characters maximum).
 /// </param>
 public static void Upgrade(this IGatewayOperations operations, string resourceGroupName, string gatewayName)
 {
     Task.Factory.StartNew(s => ((IGatewayOperations)s).UpgradeAsync(resourceGroupName, gatewayName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
 /// <summary>
 /// Deletes the gateway resource.
 /// </summary>
 /// <remarks>
 /// Deletes the gateway resource identified by the name.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 /// <param name='gatewayResourceName'>
 /// The identity of the gateway.
 /// </param>
 public static void Delete(this IGatewayOperations operations, string resourceGroupName, string gatewayResourceName)
 {
     operations.DeleteAsync(resourceGroupName, gatewayResourceName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Regenerate a gateway's profile
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name uniquely identifies the resource group within the
 /// user subscriptionId.
 /// </param>
 /// <param name='gatewayName'>
 /// The gateway name (256 characters maximum).
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginRegenerateProfileAsync(this IGatewayOperations operations, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.BeginRegenerateProfileWithHttpMessagesAsync(resourceGroupName, gatewayName, null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Deletes the gateway resource.
 /// </summary>
 /// <remarks>
 /// Deletes the gateway resource identified by the name.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 /// <param name='gatewayResourceName'>
 /// The identity of the gateway.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IGatewayOperations operations, string resourceGroupName, string gatewayResourceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, gatewayResourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Returns gateways in a resource group
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <GatewayResource> ListForResourceGroupNext(this IGatewayOperations operations, string nextPageLink)
 {
     return(Task.Factory.StartNew(s => ((IGatewayOperations)s).ListForResourceGroupNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets all the gateway resources in a given resource group.
 /// </summary>
 /// <remarks>
 /// Gets the information about all gateway resources in a given resource group.
 /// The information include the description and other properties of the
 /// Gateway.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Azure resource group name
 /// </param>
 public static IPage <GatewayResourceDescription> ListByResourceGroup(this IGatewayOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
示例#37
0
 /// <summary>
 /// Create or update a data factory gateway.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IGatewayOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. A unique data factory instance name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update a data
 /// factory gateway.
 /// </param>
 /// <returns>
 /// The create or update data factory gateway operation response.
 /// </returns>
 public static Task <GatewayCreateOrUpdateResponse> BeginCreateOrUpdateAsync(this IGatewayOperations operations, string resourceGroupName, string dataFactoryName, GatewayCreateOrUpdateParameters parameters)
 {
     return(operations.BeginCreateOrUpdateAsync(resourceGroupName, dataFactoryName, parameters, CancellationToken.None));
 }
 /// <summary>
 /// Creates or updates a ManagementService gateway.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name uniquely identifies the resource group within the
 /// user subscriptionId.
 /// </param>
 /// <param name='gatewayName'>
 /// The gateway name (256 characters maximum).
 /// </param>
 /// <param name='location'>
 /// location of the resource
 /// </param>
 /// <param name='tags'>
 /// resource tags
 /// </param>
 /// <param name='upgradeMode'>
 /// The upgradeMode property gives the flexibility to gateway to auto upgrade
 /// itself. If properties value not specified, then we assume upgradeMode =
 /// Automatic. Possible values include: 'Manual', 'Automatic'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <GatewayResource> CreateAsync(this IGatewayOperations operations, string resourceGroupName, string gatewayName, string location = default(string), object tags = default(object), UpgradeMode?upgradeMode = default(UpgradeMode?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, gatewayName, location, tags, upgradeMode, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }