示例#1
0
 /// <summary>
 /// The operation to get the restore point.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the restore point collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 /// <param name='expand'>
 /// The expand expression to apply on the operation. 'InstanceView' retrieves
 /// information about the run-time state of a restore point. Possible values
 /// include: 'instanceView'
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RestorePoint> GetAsync(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, restorePointName, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of database restore points.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <RestorePoint> > ListByDatabaseAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Creates a restore point for a data warehouse.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='restorePointLabel'>
 /// The restore point label to apply
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RestorePointInner> CreateAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointLabel, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, restorePointLabel, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets a list of database restore points.
 /// </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 <RestorePoint> > ListByDatabaseNextAsync(this IRestorePointsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#5
0
 /// <summary>
 /// The operation to create the restore point. Updating properties of an
 /// existing restore point is not allowed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the restore point collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create restore point operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RestorePoint> CreateAsync(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName, RestorePoint parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, restorePointName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#6
0
 /// <summary>
 /// The operation to create the restore point. Updating properties of an
 /// existing restore point is not allowed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the restore point collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 /// <param name='excludeDisks'>
 /// List of disk resource ids that the customer wishes to exclude from the
 /// restore point. If no disks are specified, all disks will be included.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RestorePoint> CreateAsync(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName, IList <ApiEntityReference> excludeDisks = default(IList <ApiEntityReference>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, restorePointName, excludeDisks, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates a restore point for a data warehouse.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='parameters'>
 /// The definition for creating the restore point of this database.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <RestorePoint> BeginCreateAsync(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#8
0
 /// <summary>
 /// The operation to create the restore point. Updating properties of an
 /// existing restore point is not allowed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the restore point collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 /// <param name='excludeDisks'>
 /// List of disk resource ids that the customer wishes to exclude from the
 /// restore point. If no disks are specified, all disks will be included.
 /// </param>
 public static RestorePoint Create(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName, IList <ApiEntityReference> excludeDisks = default(IList <ApiEntityReference>))
 {
     return(operations.CreateAsync(resourceGroupName, restorePointCollectionName, restorePointName, excludeDisks).GetAwaiter().GetResult());
 }
示例#9
0
 /// <summary>
 /// The operation to delete the restore point.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the Restore Point Collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 public static void Delete(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName)
 {
     operations.DeleteAsync(resourceGroupName, restorePointCollectionName, restorePointName).GetAwaiter().GetResult();
 }
示例#10
0
 /// <summary>
 /// The operation to create the restore point. Updating properties of an
 /// existing restore point is not allowed
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the restore point collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create restore point operation.
 /// </param>
 public static RestorePoint Create(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName, RestorePoint parameters)
 {
     return(operations.CreateAsync(resourceGroupName, restorePointCollectionName, restorePointName, parameters).GetAwaiter().GetResult());
 }
示例#11
0
 /// <summary>
 /// The operation to delete the restore point.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the Restore Point Collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, restorePointCollectionName, restorePointName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#12
0
 /// <summary>
 /// The operation to get the restore point.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='restorePointCollectionName'>
 /// The name of the restore point collection.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 public static RestorePoint Get(this IRestorePointsOperations operations, string resourceGroupName, string restorePointCollectionName, string restorePointName)
 {
     return(operations.GetAsync(resourceGroupName, restorePointCollectionName, restorePointName).GetAwaiter().GetResult());
 }
示例#13
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     BackupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesOperations(this);
     BackupLongTermRetentionVaults   = new BackupLongTermRetentionVaultsOperations(this);
     RecoverableDatabases            = new RecoverableDatabasesOperations(this);
     RestorableDroppedDatabases      = new RestorableDroppedDatabasesOperations(this);
     Capabilities                        = new CapabilitiesOperations(this);
     Servers                             = new ServersOperations(this);
     ServerConnectionPolicies            = new ServerConnectionPoliciesOperations(this);
     Databases                           = new DatabasesOperations(this);
     DatabaseThreatDetectionPolicies     = new DatabaseThreatDetectionPoliciesOperations(this);
     DataMaskingPolicies                 = new DataMaskingPoliciesOperations(this);
     DataMaskingRules                    = new DataMaskingRulesOperations(this);
     ElasticPools                        = new ElasticPoolsOperations(this);
     FirewallRules                       = new FirewallRulesOperations(this);
     GeoBackupPolicies                   = new GeoBackupPoliciesOperations(this);
     ReplicationLinks                    = new ReplicationLinksOperations(this);
     ServerAzureADAdministrators         = new ServerAzureADAdministratorsOperations(this);
     ServerCommunicationLinks            = new ServerCommunicationLinksOperations(this);
     ServiceObjectives                   = new ServiceObjectivesOperations(this);
     ElasticPoolActivities               = new ElasticPoolActivitiesOperations(this);
     ElasticPoolDatabaseActivities       = new ElasticPoolDatabaseActivitiesOperations(this);
     RecommendedElasticPools             = new RecommendedElasticPoolsOperations(this);
     ServiceTierAdvisors                 = new ServiceTierAdvisorsOperations(this);
     TransparentDataEncryptions          = new TransparentDataEncryptionsOperations(this);
     TransparentDataEncryptionActivities = new TransparentDataEncryptionActivitiesOperations(this);
     ServerUsages                        = new ServerUsagesOperations(this);
     DatabaseUsages                      = new DatabaseUsagesOperations(this);
     DatabaseBlobAuditingPolicies        = new DatabaseBlobAuditingPoliciesOperations(this);
     DatabaseAutomaticTuning             = new DatabaseAutomaticTuningOperations(this);
     EncryptionProtectors                = new EncryptionProtectorsOperations(this);
     FailoverGroups                      = new FailoverGroupsOperations(this);
     Operations                          = new Operations(this);
     ServerKeys                          = new ServerKeysOperations(this);
     SyncAgents                          = new SyncAgentsOperations(this);
     SyncGroups                          = new SyncGroupsOperations(this);
     SyncMembers                         = new SyncMembersOperations(this);
     SubscriptionUsages                  = new SubscriptionUsagesOperations(this);
     VirtualNetworkRules                 = new VirtualNetworkRulesOperations(this);
     DatabaseOperations                  = new DatabaseOperations(this);
     ServerAutomaticTuning               = new ServerAutomaticTuningOperations(this);
     ServerDnsAliases                    = new ServerDnsAliasesOperations(this);
     RestorePoints                       = new RestorePointsOperations(this);
     BaseUri                             = new System.Uri("https://management.azure.com");
     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());
 }
 /// <summary>
 /// Creates a restore point for a data warehouse.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='parameters'>
 /// The definition for creating the restore point of this database.
 /// </param>
 public static RestorePoint Create(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, CreateDatabaseRestorePointDefinition parameters)
 {
     return(operations.CreateAsync(resourceGroupName, serverName, databaseName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a list of database restore points.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 public static IPage <RestorePoint> ListByDatabase(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName)
 {
     return(operations.ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets a list of database restore points.
 /// </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 <RestorePoint> ListByDatabaseNext(this IRestorePointsOperations operations, string nextPageLink)
 {
     return(operations.ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Deletes a restore point.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 public static void Delete(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointName)
 {
     operations.DeleteAsync(resourceGroupName, serverName, databaseName, restorePointName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Gets a restore point.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='serverName'>
 /// The name of the server.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='restorePointName'>
 /// The name of the restore point.
 /// </param>
 public static RestorePoint Get(this IRestorePointsOperations operations, string resourceGroupName, string serverName, string databaseName, string restorePointName)
 {
     return(operations.GetAsync(resourceGroupName, serverName, databaseName, restorePointName).GetAwaiter().GetResult());
 }