Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions management/azure_mgmt_sql/lib/generated/azure_mgmt_sql/databases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2026,8 +2026,8 @@ def create_or_update_threat_detection_policy_async(resource_group_name, server_n
# contains the resource. You can obtain this value from the Azure Resource
# Manager API or the portal.
# @param server_name [String] The name of the server.
# @param database_name [String] The name of the database for which database
# blob audit policy is defined.
# @param database_name [String] The name of the database for which the blob
# audit policy is defined.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
Expand All @@ -2045,8 +2045,8 @@ def get_blob_auditing_policy(resource_group_name, server_name, database_name, cu
# contains the resource. You can obtain this value from the Azure Resource
# Manager API or the portal.
# @param server_name [String] The name of the server.
# @param database_name [String] The name of the database for which database
# blob audit policy is defined.
# @param database_name [String] The name of the database for which the blob
# audit policy is defined.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
# will be added to the HTTP request.
#
Expand All @@ -2063,18 +2063,19 @@ def get_blob_auditing_policy_with_http_info(resource_group_name, server_name, da
# contains the resource. You can obtain this value from the Azure Resource
# Manager API or the portal.
# @param server_name [String] The name of the server.
# @param database_name [String] The name of the database for which database
# blob audit policy is defined.
# @param database_name [String] The name of the database for which the blob
# audit policy is defined.
# @param [Hash{String => String}] A hash of custom headers that will be added
# to the HTTP request.
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_blob_auditing_policy_async(resource_group_name, server_name, database_name, custom_headers = nil)
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'server_name is nil' if server_name.nil?
fail ArgumentError, 'database_name is nil' if database_name.nil?
blob_auditing_policy_name = 'default'
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
api_version = '2015-05-01-preview'


Expand All @@ -2083,13 +2084,13 @@ def get_blob_auditing_policy_async(resource_group_name, server_name, database_na
# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/default'
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}'

request_url = @base_url || @client.base_url

options = {
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name},
path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id},
query_params: {'api-version' => api_version},
headers: request_headers.merge(custom_headers || {}),
base_url: request_url
Expand Down Expand Up @@ -2130,8 +2131,8 @@ def get_blob_auditing_policy_async(resource_group_name, server_name, database_na
# contains the resource. You can obtain this value from the Azure Resource
# Manager API or the portal.
# @param server_name [String] The name of the server.
# @param database_name [String] The name of the database for which database
# blob audit policy will be defined.
# @param database_name [String] The name of the database for which the blob
# auditing policy will be defined.
# @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing
# policy.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
Expand All @@ -2151,8 +2152,8 @@ def create_or_update_blob_auditing_policy(resource_group_name, server_name, data
# contains the resource. You can obtain this value from the Azure Resource
# Manager API or the portal.
# @param server_name [String] The name of the server.
# @param database_name [String] The name of the database for which database
# blob audit policy will be defined.
# @param database_name [String] The name of the database for which the blob
# auditing policy will be defined.
# @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing
# policy.
# @param custom_headers [Hash{String => String}] A hash of custom headers that
Expand All @@ -2171,8 +2172,8 @@ def create_or_update_blob_auditing_policy_with_http_info(resource_group_name, se
# contains the resource. You can obtain this value from the Azure Resource
# Manager API or the portal.
# @param server_name [String] The name of the server.
# @param database_name [String] The name of the database for which database
# blob audit policy will be defined.
# @param database_name [String] The name of the database for which the blob
# auditing policy will be defined.
# @param parameters [DatabaseBlobAuditingPolicy] The database blob auditing
# policy.
# @param [Hash{String => String}] A hash of custom headers that will be added
Expand All @@ -2181,11 +2182,12 @@ def create_or_update_blob_auditing_policy_with_http_info(resource_group_name, se
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def create_or_update_blob_auditing_policy_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil)
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'server_name is nil' if server_name.nil?
fail ArgumentError, 'database_name is nil' if database_name.nil?
blob_auditing_policy_name = 'default'
fail ArgumentError, 'parameters is nil' if parameters.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
api_version = '2015-05-01-preview'


Expand All @@ -2202,13 +2204,13 @@ def create_or_update_blob_auditing_policy_async(resource_group_name, server_name
request_content = @client.serialize(request_mapper, parameters, 'parameters')
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil

path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/default'
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}'

request_url = @base_url || @client.base_url

options = {
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name},
path_params: {'resourceGroupName' => resource_group_name,'serverName' => server_name,'databaseName' => database_name,'blobAuditingPolicyName' => blob_auditing_policy_name,'subscriptionId' => @client.subscription_id},
query_params: {'api-version' => api_version},
body: request_content,
headers: request_headers.merge(custom_headers || {}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
module Azure::ARM::SQL
module Models
#
# Contains information about a database Blob Auditing policy.
# A database blob auditing policy.
#
class DatabaseBlobAuditingPolicy < ProxyResource

include MsRestAzure

# @return [String] The geo-location where the resource lives
attr_accessor :location

# @return [String] Resource kind.
attr_accessor :kind

Expand All @@ -40,7 +37,7 @@ class DatabaseBlobAuditingPolicy < ProxyResource
# audit.
attr_accessor :audit_actions_and_groups

# @return [String] Specifies the blob storage subscription Id.
# @return Specifies the blob storage subscription Id.
attr_accessor :storage_account_subscription_id

# @return [Boolean] Specifies whether storageAccountAccessKey value is
Expand Down Expand Up @@ -84,13 +81,6 @@ def self.mapper()
name: 'String'
}
},
location: {
required: false,
serialized_name: 'location',
type: {
name: 'String'
}
},
kind: {
required: false,
read_only: true,
Expand All @@ -100,7 +90,7 @@ def self.mapper()
}
},
state: {
required: true,
required: false,
serialized_name: 'properties.state',
type: {
name: 'Enum',
Expand Down