Exemplo n.º 1
0
 /// <summary>
 /// Get Service Configuration.
 /// </summary>
 /// <remarks>
 /// Get the Personalizer service configuration.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServiceConfiguration> GetAsync(this IServiceConfigurationOperations operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the StorSimpleManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public StorSimpleManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._backup                             = new BackupOperations(this);
     this._backupPolicy                       = new BackupPolicyOperations(this);
     this._dataContainer                      = new DataContainerOperations(this);
     this._deviceDetails                      = new DeviceDetailsOperations(this);
     this._devices                            = new DeviceOperations(this);
     this._iscsiConnection                    = new IscsiConnectionDetailsOperations(this);
     this._resourceEncryptionKeys             = new ResourceEncryptionKeyOperations(this);
     this._serviceConfig                      = new ServiceConfigurationOperations(this);
     this._virtualDisk                        = new VirtualDiskOperations(this);
     this._apiVersion                         = "2014-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the StorSimpleManagementClient class.
 /// </summary>
 public StorSimpleManagementClient()
     : base()
 {
     this._backup                             = new BackupOperations(this);
     this._backupPolicy                       = new BackupPolicyOperations(this);
     this._cloneVolume                        = new CloneVolumeOperations(this);
     this._dataContainer                      = new DataContainerOperations(this);
     this._deviceDetails                      = new DeviceDetailsOperations(this);
     this._deviceFailover                     = new DeviceFailoverOperations(this);
     this._deviceJob                          = new DeviceJobOperations(this);
     this._devices                            = new DeviceOperations(this);
     this._devicePublicKey                    = new DevicePublicKeyOperations(this);
     this._iscsiConnection                    = new IscsiConnectionDetailsOperations(this);
     this._migrateLegacyAppliance             = new MigrationOperations(this);
     this._resourceEncryptionKeys             = new ResourceEncryptionKeyOperations(this);
     this._serviceConfig                      = new ServiceConfigurationOperations(this);
     this._virtualDevice                      = new VirtualDeviceOperations(this);
     this._virtualDisk                        = new VirtualDiskOperations(this);
     this._apiVersion                         = "2014-01-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout                  = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// The Begin Creating Storage Account operation creates a new storage
 /// account in Azure.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IServiceConfigurationOperations.
 /// </param>
 /// <param name='serviceConfiguration'>
 /// Required. Parameters supplied to the Begin Creating Storage Account
 /// operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Task Response for all Async Calls
 /// </returns>
 public static Task <TaskResponse> BeginCreatingAsync(this IServiceConfigurationOperations operations, ServiceConfiguration serviceConfiguration, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.BeginCreatingAsync(serviceConfiguration, customRequestHeaders, CancellationToken.None));
 }
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IServiceConfigurationOperations.
 /// </param>
 /// <param name='customeRequestHeaders'>
 /// Optional.
 /// </param>
 /// <returns>
 /// Info about the service configuration regarding the resource
 /// </returns>
 public static Task <ServiceConfigurationResponse> GetAsync(this IServiceConfigurationOperations operations, CustomRequestHeaders customeRequestHeaders)
 {
     return(operations.GetAsync(customeRequestHeaders, CancellationToken.None));
 }
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IServiceConfigurationOperations.
 /// </param>
 /// <param name='serviceConfiguration'>
 /// Required. Parameters supplied to the Create Storage Account
 /// operation.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static Task <TaskStatusInfo> CreateAsync(this IServiceConfigurationOperations operations, ServiceConfiguration serviceConfiguration, CustomRequestHeaders customRequestHeaders)
 {
     return(operations.CreateAsync(serviceConfiguration, customRequestHeaders, CancellationToken.None));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Update Service Configuration.
 /// </summary>
 /// <remarks>
 /// Update the Personalizer service configuration.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='config'>
 /// The personalizer service configuration.
 /// </param>
 public static ServiceConfiguration Update(this IServiceConfigurationOperations operations, ServiceConfiguration config)
 {
     return(operations.UpdateAsync(config).GetAwaiter().GetResult());
 }
Exemplo n.º 8
0
 /// <summary>
 /// Get Service Configuration.
 /// </summary>
 /// <remarks>
 /// Get the Personalizer service configuration.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <ServiceConfiguration> GetWithHttpMessages(this IServiceConfigurationOperations operations, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetWithHttpMessagesAsync(customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
Exemplo n.º 9
0
 /// <summary>
 /// Get Service Configuration.
 /// </summary>
 /// <remarks>
 /// Get the Personalizer service configuration.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static ServiceConfiguration Get(this IServiceConfigurationOperations operations)
 {
     return(operations.GetAsync().GetAwaiter().GetResult());
 }