/// <summary>
 /// Returns the properties of the specified storage account credential name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='credentialName'>
 /// The name of storage account credential to be fetched.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StorageAccountCredential> GetAsync(this IStorageAccountCredentialsOperations operations, string credentialName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(credentialName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Creates or updates the storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The storage account credential name.
 /// </param>
 /// <param name='storageAccountCredential'>
 /// The storage account credential.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StorageAccountCredential> BeginCreateOrUpdateAsync(this IStorageAccountCredentialsOperations operations, string deviceName, string name, StorageAccountCredential storageAccountCredential, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, name, storageAccountCredential, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates or updates the storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='storageAccountCredentialName'>
 /// The storage account credential name.
 /// </param>
 /// <param name='parameters'>
 /// The storage account credential to be added or updated.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <StorageAccountCredentialInner> CreateOrUpdateAsync(this IStorageAccountCredentialsOperations operations, string storageAccountCredentialName, StorageAccountCredentialInner parameters, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(storageAccountCredentialName, parameters, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Operations           = new Operations(this);
     Managers             = new ManagersOperations(this);
     AccessControlRecords = new AccessControlRecordsOperations(this);
     Alerts                  = new AlertsOperations(this);
     BandwidthSettings       = new BandwidthSettingsOperations(this);
     CloudAppliances         = new CloudAppliancesOperations(this);
     Devices                 = new DevicesOperations(this);
     DeviceSettings          = new DeviceSettingsOperations(this);
     BackupPolicies          = new BackupPoliciesOperations(this);
     BackupSchedules         = new BackupSchedulesOperations(this);
     Backups                 = new BackupsOperations(this);
     HardwareComponentGroups = new HardwareComponentGroupsOperations(this);
     Jobs                             = new JobsOperations(this);
     VolumeContainers                 = new VolumeContainersOperations(this);
     Volumes                          = new VolumesOperations(this);
     StorageAccountCredentials        = new StorageAccountCredentialsOperations(this);
     BaseUri                          = new System.Uri("https://management.azure.com");
     ApiVersion                       = "2017-06-01";
     AcceptLanguage                   = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
コード例 #5
0
 /// <summary>
 /// Gets all the storage account credentials in a Data Box Edge/Data Box
 /// Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static IPage <StorageAccountCredential> ListByDataBoxEdgeDevice(this IStorageAccountCredentialsOperations operations, string deviceName, string resourceGroupName)
 {
     return(operations.ListByDataBoxEdgeDeviceAsync(deviceName, resourceGroupName).GetAwaiter().GetResult());
 }
コード例 #6
0
 /// <summary>
 /// Gets all the storage account credentials in a Data Box Edge/Data Box
 /// Gateway device.
 /// </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 <StorageAccountCredential> ListByDataBoxEdgeDeviceNext(this IStorageAccountCredentialsOperations operations, string nextPageLink)
 {
     return(operations.ListByDataBoxEdgeDeviceNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #7
0
 /// <summary>
 /// Deletes the storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The storage account credential name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IStorageAccountCredentialsOperations operations, string deviceName, string name, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, name, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #8
0
 /// <summary>
 /// Deletes the storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The storage account credential name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static void BeginDelete(this IStorageAccountCredentialsOperations operations, string deviceName, string name, string resourceGroupName)
 {
     operations.BeginDeleteAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult();
 }
コード例 #9
0
 /// <summary>
 /// Creates or updates the storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The storage account credential name.
 /// </param>
 /// <param name='storageAccountCredential'>
 /// The storage account credential.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static StorageAccountCredential BeginCreateOrUpdate(this IStorageAccountCredentialsOperations operations, string deviceName, string name, StorageAccountCredential storageAccountCredential, string resourceGroupName)
 {
     return(operations.BeginCreateOrUpdateAsync(deviceName, name, storageAccountCredential, resourceGroupName).GetAwaiter().GetResult());
 }
コード例 #10
0
 /// <summary>
 /// Deletes the storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='storageAccountCredentialName'>
 /// The name of the storage account credential.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IStorageAccountCredentialsOperations operations, string storageAccountCredentialName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     await operations.BeginDeleteWithHttpMessagesAsync(storageAccountCredentialName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false);
 }
 /// <summary>
 /// Creates or updates the storage account credential
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='credentialName'>
 /// The credential name.
 /// </param>
 /// <param name='storageAccount'>
 /// The storage account credential to be added or updated.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static StorageAccountCredential BeginCreateOrUpdate(this IStorageAccountCredentialsOperations operations, string credentialName, StorageAccountCredential storageAccount, string resourceGroupName, string managerName)
 {
     return(operations.BeginCreateOrUpdateAsync(credentialName, storageAccount, resourceGroupName, managerName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes the storage account credential
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='credentialName'>
 /// The name of the storage account credential.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static void Delete(this IStorageAccountCredentialsOperations operations, string credentialName, string resourceGroupName, string managerName)
 {
     operations.DeleteAsync(credentialName, resourceGroupName, managerName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets all the storage account credentials in a manager.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <StorageAccountCredentialInner> > ListByManagerAsync(this IStorageAccountCredentialsOperations operations, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByManagerWithHttpMessagesAsync(resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #14
0
 /// <summary>
 /// Gets all the storage account credentials in a Data Box Edge/Data Box
 /// Gateway device.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <StorageAccountCredential> > ListByDataBoxEdgeDeviceAsync(this IStorageAccountCredentialsOperations operations, string deviceName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDataBoxEdgeDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Retrieves all the storage account credentials in a manager.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static IEnumerable <StorageAccountCredential> ListByManager(this IStorageAccountCredentialsOperations operations, string resourceGroupName, string managerName)
 {
     return(operations.ListByManagerAsync(resourceGroupName, managerName).GetAwaiter().GetResult());
 }
コード例 #16
0
 /// <summary>
 /// Gets the properties of the specified storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='deviceName'>
 /// The device name.
 /// </param>
 /// <param name='name'>
 /// The storage account credential name.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name.
 /// </param>
 public static StorageAccountCredential Get(this IStorageAccountCredentialsOperations operations, string deviceName, string name, string resourceGroupName)
 {
     return(operations.GetAsync(deviceName, name, resourceGroupName).GetAwaiter().GetResult());
 }
コード例 #17
0
 /// <summary>
 /// Creates or updates the storage account credential.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='storageAccountCredentialName'>
 /// The storage account credential name.
 /// </param>
 /// <param name='parameters'>
 /// The storage account credential to be added or updated.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resource group name
 /// </param>
 /// <param name='managerName'>
 /// The manager name
 /// </param>
 public static StorageAccountCredential CreateOrUpdate(this IStorageAccountCredentialsOperations operations, string storageAccountCredentialName, StorageAccountCredential parameters, string resourceGroupName, string managerName)
 {
     return(operations.CreateOrUpdateAsync(storageAccountCredentialName, parameters, resourceGroupName, managerName).GetAwaiter().GetResult());
 }