コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the ImportRequestInner class.
 /// </summary>
 /// <param name="storageKeyType">The type of the storage key to use.
 /// Possible values include: 'StorageAccessKey',
 /// 'SharedAccessKey'</param>
 /// <param name="storageKey">The storage key to use.  If storage key
 /// type is SharedAccessKey, it must be preceded with a "?."</param>
 /// <param name="storageUri">The storage uri to use.</param>
 /// <param name="administratorLogin">The name of the SQL
 /// administrator.</param>
 /// <param name="administratorLoginPassword">The password of the SQL
 /// administrator.</param>
 /// <param name="databaseName">The name of the database to
 /// import.</param>
 /// <param name="edition">The edition for the database being created.
 /// Possible values include: 'Web', 'Business', 'Basic', 'Standard',
 /// 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse',
 /// 'System', 'System2'</param>
 /// <param name="serviceObjectiveName">The name of the service
 /// objective to assign to the database. Possible values include:
 /// 'System', 'System0', 'System1', 'System2', 'System3', 'System4',
 /// 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1',
 /// 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4',
 /// 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100',
 /// 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200',
 /// 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000',
 /// 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c',
 /// 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300',
 /// 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000',
 /// 'ElasticPool'</param>
 /// <param name="maxSizeBytes">The maximum size for the newly imported
 /// database.</param>
 /// <param name="authenticationType">The authentication type. Possible
 /// values include: 'SQL', 'ADPassword'</param>
 public ImportRequestInner(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, string databaseName, string edition, string serviceObjectiveName, string maxSizeBytes, AuthenticationType?authenticationType = default(AuthenticationType?))
     : base(storageKeyType, storageKey, storageUri, administratorLogin, administratorLoginPassword, authenticationType)
 {
     DatabaseName         = databaseName;
     Edition              = edition;
     ServiceObjectiveName = serviceObjectiveName;
     MaxSizeBytes         = maxSizeBytes;
     CustomInit();
 }
コード例 #2
0
        /// <summary>
        ///     Regenerate storage service keys
        /// </summary>
        /// <param name="storageServiceName"></param>
        /// <param name="keyType"></param>
        public void RegenerateStorageServiceKeys(string storageServiceName, StorageKeyType keyType)
        {
            TestEasyLog.Instance.Info(string.Format("Regenerating storage keys for '{0}'", storageServiceName));

            StorageManagementClient.StorageAccounts.RegenerateKeysAsync(new StorageAccountRegenerateKeysParameters {
                KeyType = keyType,
                Name    = storageServiceName,
            }, new CancellationToken()).Wait();
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the ExportRequestInner class.
 /// </summary>
 /// <param name="storageKeyType">The type of the storage key to use.
 /// Possible values include: 'StorageAccessKey',
 /// 'SharedAccessKey'</param>
 /// <param name="storageKey">The storage key to use.  If storage key
 /// type is SharedAccessKey, it must be preceded with a "?."</param>
 /// <param name="storageUri">The storage uri to use.</param>
 /// <param name="administratorLogin">The name of the SQL
 /// administrator.</param>
 /// <param name="administratorLoginPassword">The password of the SQL
 /// administrator.</param>
 /// <param name="authenticationType">The authentication type. Possible
 /// values include: 'SQL', 'ADPassword'</param>
 public ExportRequestInner(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, AuthenticationType?authenticationType = default(AuthenticationType?))
 {
     StorageKeyType             = storageKeyType;
     StorageKey                 = storageKey;
     StorageUri                 = storageUri;
     AdministratorLogin         = administratorLogin;
     AdministratorLoginPassword = administratorLoginPassword;
     AuthenticationType         = authenticationType;
     CustomInit();
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the
 /// StorageAccountRegenerateKeysParameters class with required
 /// arguments.
 /// </summary>
 public StorageAccountRegenerateKeysParameters(string name, StorageKeyType keyType)
     : this()
 {
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     this.Name    = name;
     this.KeyType = keyType;
 }
 /// <summary>
 /// Initializes a new instance of the
 /// StorageAccountRegenerateKeysParameters class with required
 /// arguments.
 /// </summary>
 public StorageAccountRegenerateKeysParameters(string name, StorageKeyType keyType)
     : this()
 {
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     this.Name = name;
     this.KeyType = keyType;
 }
コード例 #6
0
        internal static string ToSerializedValue(this StorageKeyType value)
        {
            switch (value)
            {
            case StorageKeyType.StorageAccessKey:
                return("StorageAccessKey");

            case StorageKeyType.SharedAccessKey:
                return("SharedAccessKey");
            }
            return(null);
        }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the ImportExtensionRequest class.
 /// </summary>
 /// <param name="storageKeyType">The type of the storage key to use.
 /// Possible values include: 'StorageAccessKey',
 /// 'SharedAccessKey'</param>
 /// <param name="storageKey">The storage key to use.  If storage key
 /// type is SharedAccessKey, it must be preceded with a "?."</param>
 /// <param name="storageUri">The storage uri to use.</param>
 /// <param name="administratorLogin">The name of the SQL
 /// administrator.</param>
 /// <param name="administratorLoginPassword">The password of the SQL
 /// administrator.</param>
 /// <param name="name">The name of the extension.</param>
 /// <param name="type">The type of the extension.</param>
 /// <param name="authenticationType">The authentication type. Possible
 /// values include: 'SQL', 'ADPassword'</param>
 public ImportExtensionRequest(StorageKeyType storageKeyType, string storageKey, string storageUri, string administratorLogin, string administratorLoginPassword, string name = default(string), string type = default(string), AuthenticationType?authenticationType = default(AuthenticationType?))
 {
     Name                       = name;
     Type                       = type;
     StorageKeyType             = storageKeyType;
     StorageKey                 = storageKey;
     StorageUri                 = storageUri;
     AdministratorLogin         = administratorLogin;
     AdministratorLoginPassword = administratorLoginPassword;
     AuthenticationType         = authenticationType;
     CustomInit();
 }
コード例 #8
0
 ///GENMHASH:9B05554B05BC3D952D622EA7FB153F86:BADF5BF7BFF2AF37591D54901015DFBB
 internal SqlDatabaseExportRequestImpl WithStorageKeyType(StorageKeyType storageKeyType)
 {
     this.Inner.StorageKeyType = storageKeyType;
     return(this);
 }
コード例 #9
0
        /// <summary>
        ///     Regenerate storage service keys
        /// </summary>
        /// <param name="storageServiceName"></param>
        /// <param name="keyType"></param>
        public void RegenerateStorageServiceKeys(string storageServiceName, StorageKeyType keyType)
        {
            TestEasyLog.Instance.Info(string.Format("Regenerating storage keys for '{0}'", storageServiceName));

            StorageManagementClient.StorageAccounts.RegenerateKeysAsync(new StorageAccountRegenerateKeysParameters {
                KeyType = keyType,
                Name = storageServiceName,
            }, new CancellationToken()).Wait();
        }