class Azure::SQL::Mgmt::V2017_03_01_preview::SqlManagementClient
A service client - single point of access to the REST API.
Attributes
@return [String] The preferred language for the response.
@return [String] The API version to use for the request.
@return [BackupLongTermRetentionPolicies] backup_long_term_retention_policies
@return [String] the base URI of the service.
@return Credentials needed for the client to connect to Azure
.
@return [DataWarehouseUserActivitiesOperations] data_warehouse_user_activities_operations
@return [DatabaseBlobAuditingPolicies] database_blob_auditing_policies
@return [DatabaseOperations] database_operations
@return [DatabaseVulnerabilityAssessmentRuleBaselines] database_vulnerability_assessment_rule_baselines
@return [DatabaseVulnerabilityAssessments] database_vulnerability_assessments
@return [Databases] databases
@return [ExtendedDatabaseBlobAuditingPolicies] extended_database_blob_auditing_policies
@return [ExtendedServerBlobAuditingPolicies] extended_server_blob_auditing_policies
@return [Boolean] Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
@return [JobAgents] job_agents
@return [JobCredentials] job_credentials
@return [JobExecutions] job_executions
@return [JobStepExecutions] job_step_executions
@return [JobSteps] job_steps
@return [JobTargetExecutions] job_target_executions
@return [JobTargetGroups] job_target_groups
@return [JobVersions] job_versions
@return [Jobs] jobs
@return [Integer] The retry timeout in seconds for Long Running Operations. Default value is 30.
@return [LongTermRetentionBackups] long_term_retention_backups
@return [ManagedBackupShortTermRetentionPolicies] managed_backup_short_term_retention_policies
@return [ManagedDatabaseSecurityAlertPolicies] managed_database_security_alert_policies
@return [ManagedDatabases] managed_databases
@return [ManagedInstanceAdministrators] managed_instance_administrators
@return [ManagedServerSecurityAlertPolicies] managed_server_security_alert_policies
@return [RestorableDroppedManagedDatabases] restorable_dropped_managed_databases
@return [RestorePoints] restore_points
@return [SensitivityLabels] sensitivity_labels
@return [ServerAutomaticTuningOperations] server_automatic_tuning_operations
@return [ServerBlobAuditingPolicies] server_blob_auditing_policies
@return [ServerDnsAliases] server_dns_aliases
@return [ServerSecurityAlertPolicies] server_security_alert_policies
@return [String] The subscription ID that identifies an Azure
subscription.
Public Class Methods
Creates initializes a new instance of the SqlManagementClient
class. @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client. @param base_url
[String] the base URI of the service. @param options [Array] filters to be applied to the HTTP requests.
# File lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb, line 154 def initialize(credentials = nil, base_url = nil, options = nil) super(credentials, options) @base_url = base_url || 'https://management.azure.com' fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil? @credentials = credentials @extended_database_blob_auditing_policies = ExtendedDatabaseBlobAuditingPolicies.new(self) @extended_server_blob_auditing_policies = ExtendedServerBlobAuditingPolicies.new(self) @server_blob_auditing_policies = ServerBlobAuditingPolicies.new(self) @database_blob_auditing_policies = DatabaseBlobAuditingPolicies.new(self) @database_operations = DatabaseOperations.new(self) @databases = Databases.new(self) @database_vulnerability_assessment_rule_baselines = DatabaseVulnerabilityAssessmentRuleBaselines.new(self) @database_vulnerability_assessments = DatabaseVulnerabilityAssessments.new(self) @data_warehouse_user_activities_operations = DataWarehouseUserActivitiesOperations.new(self) @job_agents = JobAgents.new(self) @job_credentials = JobCredentials.new(self) @job_executions = JobExecutions.new(self) @jobs = Jobs.new(self) @job_step_executions = JobStepExecutions.new(self) @job_steps = JobSteps.new(self) @job_target_executions = JobTargetExecutions.new(self) @job_target_groups = JobTargetGroups.new(self) @job_versions = JobVersions.new(self) @long_term_retention_backups = LongTermRetentionBackups.new(self) @backup_long_term_retention_policies = BackupLongTermRetentionPolicies.new(self) @managed_backup_short_term_retention_policies = ManagedBackupShortTermRetentionPolicies.new(self) @managed_databases = ManagedDatabases.new(self) @managed_restorable_dropped_database_backup_short_term_retention_policies = ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.new(self) @restorable_dropped_managed_databases = RestorableDroppedManagedDatabases.new(self) @restore_points = RestorePoints.new(self) @server_automatic_tuning_operations = ServerAutomaticTuningOperations.new(self) @server_dns_aliases = ServerDnsAliases.new(self) @server_security_alert_policies = ServerSecurityAlertPolicies.new(self) @managed_database_security_alert_policies = ManagedDatabaseSecurityAlertPolicies.new(self) @managed_server_security_alert_policies = ManagedServerSecurityAlertPolicies.new(self) @sensitivity_labels = SensitivityLabels.new(self) @managed_instance_administrators = ManagedInstanceAdministrators.new(self) @api_version = '2017-03-01-preview' @accept_language = 'en-US' @long_running_operation_retry_timeout = 30 @generate_client_request_id = true add_telemetry end
Public Instance Methods
Makes a request and returns the body of the response. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [Hash{String=>String}] containing the body of the response. Example:
request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}" path = "/path" options = { body: request_content, query_params: {'api-version' => '2016-02-01'} } result = @client.make_request(:put, path, options)
# File lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb, line 216 def make_request(method, path, options = {}) result = make_request_with_http_info(method, path, options) result.body unless result.nil? end
Makes a request asynchronously. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [Concurrent::Promise] Promise object which holds the HTTP response.
# File lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb, line 241 def make_request_async(method, path, options = {}) fail ArgumentError, 'method is nil' if method.nil? fail ArgumentError, 'path is nil' if path.nil? request_url = options[:base_url] || @base_url if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?) @request_headers['Content-Type'] = options[:headers]['Content-Type'] end request_headers = @request_headers request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil? options.merge!({headers: request_headers.merge(options[:headers] || {})}) options.merge!({credentials: @credentials}) unless @credentials.nil? super(request_url, method, path, options) end
Makes a request and returns the operation response. @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete. @param path [String] the path, relative to {base_url}. @param options [Hash{String=>String}] specifying any request options like :body. @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
# File lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb, line 228 def make_request_with_http_info(method, path, options = {}) result = make_request_async(method, path, options).value! result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body) result end
Private Instance Methods
Adds telemetry information.
# File lib/2017-03-01-preview/generated/azure_mgmt_sql/sql_management_client.rb, line 263 def add_telemetry sdk_information = 'azure_mgmt_sql' sdk_information = "#{sdk_information}/0.19.1" add_user_agent_information(sdk_information) end