class Azure::EventGrid::Mgmt::V2020_10_15_preview::EventSubscriptions
Attributes
@return [EventGridManagementClient] reference to the EventGridManagementClient
Private Class Methods
Creates and initializes a new instance of the EventSubscriptions
class. @param client service class for accessing basic functionality.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 17 def initialize(client) @client = client end
Private Instance Methods
Create or update an event subscription.
Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
@param scope [String] The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscription] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2017 def begin_create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
Create or update an event subscription.
Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
@param scope [String] The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2080 def begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? fail ArgumentError, 'event_subscription_info is nil' if event_subscription_info.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper() request_content = @client.serialize(request_mapper, event_subscription_info) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'eventSubscriptionName' => event_subscription_name}, skip_encoding_path_params: {'scope' => scope}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Create or update an event subscription.
Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
@param scope [String] The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2049 def begin_create_or_update_with_http_info(scope, event_subscription_name, event_subscription_info, custom_headers:nil) begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! end
Delete an event subscription.
Delete an existing event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2163 def begin_delete(scope, event_subscription_name, custom_headers:nil) response = begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers).value! nil end
Delete an event subscription.
Delete an existing event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2214 def begin_delete_async(scope, event_subscription_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'eventSubscriptionName' => event_subscription_name}, skip_encoding_path_params: {'scope' => scope}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end
Delete an event subscription.
Delete an existing event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2189 def begin_delete_with_http_info(scope, event_subscription_name, custom_headers:nil) begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers).value! end
Update an event subscription.
Asynchronously updates an existing event subscription.
@param scope [String] The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription to be updated. @param event_subscription_update_parameters
- EventSubscriptionUpdateParameters
-
Updated event subscription information.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscription] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2283 def begin_update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil) response = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
Update an event subscription.
Asynchronously updates an existing event subscription.
@param scope [String] The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription to be updated. @param event_subscription_update_parameters
- EventSubscriptionUpdateParameters
-
Updated event subscription information.
@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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2340 def begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? fail ArgumentError, 'event_subscription_update_parameters is nil' if event_subscription_update_parameters.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionUpdateParameters.mapper() request_content = @client.serialize(request_mapper, event_subscription_update_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'eventSubscriptionName' => event_subscription_name}, skip_encoding_path_params: {'scope' => scope}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Update an event subscription.
Asynchronously updates an existing event subscription.
@param scope [String] The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription to be updated. @param event_subscription_update_parameters
- EventSubscriptionUpdateParameters
-
Updated event subscription information.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2312 def begin_update_with_http_info(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil) begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value! end
Create or update an event subscription.
Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope.
@param scope [String] The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscription] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 178 def create_or_update(scope, event_subscription_name, event_subscription_info, custom_headers:nil) response = create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers).value! response.body unless response.nil? end
@param scope [String] The identifier of the resource to which the event subscription needs to be created or updated. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. Event subscription names must be between 3 and 64 characters in length and should use alphanumeric letters only. @param event_subscription_info [EventSubscription] Event subscription properties containing the destination and filter information. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 206 def create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:nil) # Send request promise = begin_create_or_update_async(scope, event_subscription_name, event_subscription_info, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Delete an event subscription.
Delete an existing event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 243 def delete(scope, event_subscription_name, custom_headers:nil) response = delete_async(scope, event_subscription_name, custom_headers:custom_headers).value! nil end
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 266 def delete_async(scope, event_subscription_name, custom_headers:nil) # Send request promise = begin_delete_async(scope, event_subscription_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end
Get an event subscription.
Get properties of an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscription] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 45 def get(scope, event_subscription_name, custom_headers:nil) response = get_async(scope, event_subscription_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get an event subscription.
Get properties of an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 96 def get_async(scope, event_subscription_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'eventSubscriptionName' => event_subscription_name}, skip_encoding_path_params: {'scope' => scope}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get delivery attributes for an event subscription.
Get all delivery attributes for an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [DeliveryAttributeListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1884 def get_delivery_attributes(scope, event_subscription_name, custom_headers:nil) response = get_delivery_attributes_async(scope, event_subscription_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get delivery attributes for an event subscription.
Get all delivery attributes for an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1935 def get_delivery_attributes_async(scope, event_subscription_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'eventSubscriptionName' => event_subscription_name}, skip_encoding_path_params: {'scope' => scope}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::DeliveryAttributeListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get delivery attributes for an event subscription.
Get all delivery attributes for an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1910 def get_delivery_attributes_with_http_info(scope, event_subscription_name, custom_headers:nil) get_delivery_attributes_async(scope, event_subscription_name, custom_headers:custom_headers).value! end
Get full URL of an event subscription.
Get the full endpoint URL for an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionFullUrl] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 371 def get_full_url(scope, event_subscription_name, custom_headers:nil) response = get_full_url_async(scope, event_subscription_name, custom_headers:custom_headers).value! response.body unless response.nil? end
Get full URL of an event subscription.
Get the full endpoint URL for an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 422 def get_full_url_async(scope, event_subscription_name, custom_headers:nil) fail ArgumentError, 'scope is nil' if scope.nil? fail ArgumentError, 'event_subscription_name is nil' if event_subscription_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getFullUrl' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'eventSubscriptionName' => event_subscription_name}, skip_encoding_path_params: {'scope' => scope}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionFullUrl.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get full URL of an event subscription.
Get the full endpoint URL for an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 397 def get_full_url_with_http_info(scope, event_subscription_name, custom_headers:nil) get_full_url_async(scope, event_subscription_name, custom_headers:custom_headers).value! end
Get an event subscription.
Get properties of an event subscription.
@param scope [String] The scope of the event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 71 def get_with_http_info(scope, event_subscription_name, custom_headers:nil) get_async(scope, event_subscription_name, custom_headers:custom_headers).value! end
List all event subscriptions for a specific domain topic.
List all event subscriptions that have been created for a specific domain topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param domain_name [String] Name of the top level domain. @param topic_name [String] Name of the domain topic. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1746 def list_by_domain_topic(resource_group_name, domain_name, topic_name, filter:nil, top:nil, custom_headers:nil) first_page = list_by_domain_topic_as_lazy(resource_group_name, domain_name, topic_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all event subscriptions for a specific domain topic.
List all event subscriptions that have been created for a specific domain topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param domain_name [String] Name of the top level domain. @param topic_name [String] Name of the domain topic. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3763 def list_by_domain_topic_as_lazy(resource_group_name, domain_name, topic_name, filter:nil, top:nil, custom_headers:nil) response = list_by_domain_topic_async(resource_group_name, domain_name, topic_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_domain_topic_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all event subscriptions for a specific domain topic.
List all event subscriptions that have been created for a specific domain topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param domain_name [String] Name of the top level domain. @param topic_name [String] Name of the domain topic. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1807 def list_by_domain_topic_async(resource_group_name, domain_name, topic_name, filter:nil, top:nil, 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, 'domain_name is nil' if domain_name.nil? fail ArgumentError, 'topic_name is nil' if topic_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions' 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,'domainName' => domain_name,'topicName' => topic_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all event subscriptions for a specific domain topic.
List all event subscriptions that have been created for a specific domain topic.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3319 def list_by_domain_topic_next(next_page_link, custom_headers:nil) response = list_by_domain_topic_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all event subscriptions for a specific domain topic.
List all event subscriptions that have been created for a specific domain topic.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3354 def list_by_domain_topic_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all event subscriptions for a specific domain topic.
List all event subscriptions that have been created for a specific domain topic.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3337 def list_by_domain_topic_next_with_http_info(next_page_link, custom_headers:nil) list_by_domain_topic_next_async(next_page_link, custom_headers:custom_headers).value! end
List all event subscriptions for a specific domain topic.
List all event subscriptions that have been created for a specific domain topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param domain_name [String] Name of the top level domain. @param topic_name [String] Name of the domain topic. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1777 def list_by_domain_topic_with_http_info(resource_group_name, domain_name, topic_name, filter:nil, top:nil, custom_headers:nil) list_by_domain_topic_async(resource_group_name, domain_name, topic_name, filter:filter, top:top, custom_headers:custom_headers).value! end
List all event subscriptions for a specific topic.
List all event subscriptions that have been created for a specific topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param provider_namespace [String] Namespace of the provider of the topic. @param resource_type_name [String] Name of the resource type. @param resource_name [String] Name of the resource. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1602 def list_by_resource(resource_group_name, provider_namespace, resource_type_name, resource_name, filter:nil, top:nil, custom_headers:nil) first_page = list_by_resource_as_lazy(resource_group_name, provider_namespace, resource_type_name, resource_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all event subscriptions for a specific topic.
List all event subscriptions that have been created for a specific topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param provider_namespace [String] Namespace of the provider of the topic. @param resource_type_name [String] Name of the resource type. @param resource_name [String] Name of the resource. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3725 def list_by_resource_as_lazy(resource_group_name, provider_namespace, resource_type_name, resource_name, filter:nil, top:nil, custom_headers:nil) response = list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_resource_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all event subscriptions for a specific topic.
List all event subscriptions that have been created for a specific topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param provider_namespace [String] Namespace of the provider of the topic. @param resource_type_name [String] Name of the resource type. @param resource_name [String] Name of the resource. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1663 def list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, filter:nil, top:nil, 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, 'provider_namespace is nil' if provider_namespace.nil? fail ArgumentError, 'resource_type_name is nil' if resource_type_name.nil? fail ArgumentError, 'resource_name is nil' if resource_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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/{providerNamespace}/{resourceTypeName}/{resourceName}/providers/Microsoft.EventGrid/eventSubscriptions' 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,'providerNamespace' => provider_namespace,'resourceTypeName' => resource_type_name,'resourceName' => resource_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all event subscriptions for a specific topic.
List all event subscriptions that have been created for a specific topic.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3222 def list_by_resource_next(next_page_link, custom_headers:nil) response = list_by_resource_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all event subscriptions for a specific topic.
List all event subscriptions that have been created for a specific topic.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3255 def list_by_resource_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all event subscriptions for a specific topic.
List all event subscriptions that have been created for a specific topic.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3239 def list_by_resource_next_with_http_info(next_page_link, custom_headers:nil) list_by_resource_next_async(next_page_link, custom_headers:custom_headers).value! end
List all event subscriptions for a specific topic.
List all event subscriptions that have been created for a specific topic.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param provider_namespace [String] Namespace of the provider of the topic. @param resource_type_name [String] Name of the resource type. @param resource_name [String] Name of the resource. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1633 def list_by_resource_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, filter:nil, top:nil, custom_headers:nil) list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, filter:filter, top:top, custom_headers:custom_headers).value! end
List all global event subscriptions under an Azure
subscription and resource group.
List all global event subscriptions under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 765 def list_global_by_resource_group(resource_group_name, filter:nil, top:nil, custom_headers:nil) first_page = list_global_by_resource_group_as_lazy(resource_group_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all global event subscriptions under an Azure
subscription and resource group.
List all global event subscriptions under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3501 def list_global_by_resource_group_as_lazy(resource_group_name, filter:nil, top:nil, custom_headers:nil) response = list_global_by_resource_group_async(resource_group_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_global_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all global event subscriptions under an Azure
subscription and resource group.
List all global event subscriptions under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 824 def list_global_by_resource_group_async(resource_group_name, filter:nil, top:nil, 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, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.EventGrid/eventSubscriptions' 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}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all global event subscriptions under a resource group for a topic type.
List all global event subscriptions under a resource group for a specific topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 903 def list_global_by_resource_group_for_topic_type(resource_group_name, topic_type_name, filter:nil, top:nil, custom_headers:nil) first_page = list_global_by_resource_group_for_topic_type_as_lazy(resource_group_name, topic_type_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all global event subscriptions under a resource group for a topic type.
List all global event subscriptions under a resource group for a specific topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3538 def list_global_by_resource_group_for_topic_type_as_lazy(resource_group_name, topic_type_name, filter:nil, top:nil, custom_headers:nil) response = list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_global_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all global event subscriptions under a resource group for a topic type.
List all global event subscriptions under a resource group for a specific topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 962 def list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, filter:nil, top:nil, 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, 'topic_type_name is nil' if topic_type_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions' 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,'topicTypeName' => topic_type_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all global event subscriptions under a resource group for a topic type.
List all global event subscriptions under a resource group for a specific topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2719 def list_global_by_resource_group_for_topic_type_next(next_page_link, custom_headers:nil) response = list_global_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all global event subscriptions under a resource group for a topic type.
List all global event subscriptions under a resource group for a specific topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2754 def list_global_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all global event subscriptions under a resource group for a topic type.
List all global event subscriptions under a resource group for a specific topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2737 def list_global_by_resource_group_for_topic_type_next_with_http_info(next_page_link, custom_headers:nil) list_global_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! end
List all global event subscriptions under a resource group for a topic type.
List all global event subscriptions under a resource group for a specific topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 933 def list_global_by_resource_group_for_topic_type_with_http_info(resource_group_name, topic_type_name, filter:nil, top:nil, custom_headers:nil) list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! end
List all global event subscriptions under an Azure
subscription and resource group.
List all global event subscriptions under a specific Azure
subscription and resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2618 def list_global_by_resource_group_next(next_page_link, custom_headers:nil) response = list_global_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all global event subscriptions under an Azure
subscription and resource group.
List all global event subscriptions under a specific Azure
subscription and resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2655 def list_global_by_resource_group_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all global event subscriptions under an Azure
subscription and resource group.
List all global event subscriptions under a specific Azure
subscription and resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2637 def list_global_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_global_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end
List all global event subscriptions under an Azure
subscription and resource group.
List all global event subscriptions under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 795 def list_global_by_resource_group_with_http_info(resource_group_name, filter:nil, top:nil, custom_headers:nil) list_global_by_resource_group_async(resource_group_name, filter:filter, top:top, custom_headers:custom_headers).value! end
Get an aggregated list of all global event subscriptions under an Azure
subscription.
List all aggregated global event subscriptions under a specific Azure
subscription.
@param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 500 def list_global_by_subscription(filter:nil, top:nil, custom_headers:nil) first_page = list_global_by_subscription_as_lazy(filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
Get an aggregated list of all global event subscriptions under an Azure
subscription.
List all aggregated global event subscriptions under a specific Azure
subscription.
@param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3429 def list_global_by_subscription_as_lazy(filter:nil, top:nil, custom_headers:nil) response = list_global_by_subscription_async(filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_global_by_subscription_next_async(next_page_link, custom_headers:custom_headers) end page end end
Get an aggregated list of all global event subscriptions under an Azure
subscription.
List all aggregated global event subscriptions under a specific Azure
subscription.
@param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 555 def list_global_by_subscription_async(filter:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}/providers/Microsoft.EventGrid/eventSubscriptions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all global event subscriptions for a topic type.
List all global event subscriptions under an Azure
subscription for a topic type.
@param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 631 def list_global_by_subscription_for_topic_type(topic_type_name, filter:nil, top:nil, custom_headers:nil) first_page = list_global_by_subscription_for_topic_type_as_lazy(topic_type_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all global event subscriptions for a topic type.
List all global event subscriptions under an Azure
subscription for a topic type.
@param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3464 def list_global_by_subscription_for_topic_type_as_lazy(topic_type_name, filter:nil, top:nil, custom_headers:nil) response = list_global_by_subscription_for_topic_type_async(topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_global_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all global event subscriptions for a topic type.
List all global event subscriptions under an Azure
subscription for a topic type.
@param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 686 def list_global_by_subscription_for_topic_type_async(topic_type_name, filter:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'topicTypeName' => topic_type_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all global event subscriptions for a topic type.
List all global event subscriptions under an Azure
subscription for a topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2518 def list_global_by_subscription_for_topic_type_next(next_page_link, custom_headers:nil) response = list_global_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all global event subscriptions for a topic type.
List all global event subscriptions under an Azure
subscription for a topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2553 def list_global_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all global event subscriptions for a topic type.
List all global event subscriptions under an Azure
subscription for a topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2536 def list_global_by_subscription_for_topic_type_next_with_http_info(next_page_link, custom_headers:nil) list_global_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! end
List all global event subscriptions for a topic type.
List all global event subscriptions under an Azure
subscription for a topic type.
@param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 659 def list_global_by_subscription_for_topic_type_with_http_info(topic_type_name, filter:nil, top:nil, custom_headers:nil) list_global_by_subscription_for_topic_type_async(topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! end
Get an aggregated list of all global event subscriptions under an Azure
subscription.
List all aggregated global event subscriptions under a specific Azure
subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2417 def list_global_by_subscription_next(next_page_link, custom_headers:nil) response = list_global_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
Get an aggregated list of all global event subscriptions under an Azure
subscription.
List all aggregated global event subscriptions under a specific Azure
subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2454 def list_global_by_subscription_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
Get an aggregated list of all global event subscriptions under an Azure
subscription.
List all aggregated global event subscriptions under a specific Azure
subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2436 def list_global_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) list_global_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! end
Get an aggregated list of all global event subscriptions under an Azure
subscription.
List all aggregated global event subscriptions under a specific Azure
subscription.
@param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 528 def list_global_by_subscription_with_http_info(filter:nil, top:nil, custom_headers:nil) list_global_by_subscription_async(filter:filter, top:top, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription and resource group.
List all event subscriptions from the given location under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1175 def list_regional_by_resource_group(resource_group_name, location, filter:nil, top:nil, custom_headers:nil) first_page = list_regional_by_resource_group_as_lazy(resource_group_name, location, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all regional event subscriptions under an Azure
subscription and resource group.
List all event subscriptions from the given location under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3611 def list_regional_by_resource_group_as_lazy(resource_group_name, location, filter:nil, top:nil, custom_headers:nil) response = list_regional_by_resource_group_async(resource_group_name, location, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_regional_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all regional event subscriptions under an Azure
subscription and resource group.
List all event subscriptions from the given location under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1236 def list_regional_by_resource_group_async(resource_group_name, location, filter:nil, top:nil, 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, 'location is nil' if location.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.EventGrid/locations/{location}/eventSubscriptions' 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,'location' => location}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription and resource group for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1457 def list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, filter:nil, top:nil, custom_headers:nil) first_page = list_regional_by_resource_group_for_topic_type_as_lazy(resource_group_name, location, topic_type_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all regional event subscriptions under an Azure
subscription and resource group for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3687 def list_regional_by_resource_group_for_topic_type_as_lazy(resource_group_name, location, topic_type_name, filter:nil, top:nil, custom_headers:nil) response = list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_regional_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all regional event subscriptions under an Azure
subscription and resource group for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1520 def list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, filter:nil, top:nil, 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, 'location is nil' if location.nil? fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions' 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,'location' => location,'topicTypeName' => topic_type_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription and resource group for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3122 def list_regional_by_resource_group_for_topic_type_next(next_page_link, custom_headers:nil) response = list_regional_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all regional event subscriptions under an Azure
subscription and resource group for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3159 def list_regional_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription and resource group for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3141 def list_regional_by_resource_group_for_topic_type_next_with_http_info(next_page_link, custom_headers:nil) list_regional_by_resource_group_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription and resource group for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and resource group and topic type.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1489 def list_regional_by_resource_group_for_topic_type_with_http_info(resource_group_name, location, topic_type_name, filter:nil, top:nil, custom_headers:nil) list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription and resource group.
List all event subscriptions from the given location under a specific Azure
subscription and resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2918 def list_regional_by_resource_group_next(next_page_link, custom_headers:nil) response = list_regional_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all regional event subscriptions under an Azure
subscription and resource group.
List all event subscriptions from the given location under a specific Azure
subscription and resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2955 def list_regional_by_resource_group_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription and resource group.
List all event subscriptions from the given location under a specific Azure
subscription and resource group.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2937 def list_regional_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_regional_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription and resource group.
List all event subscriptions from the given location under a specific Azure
subscription and resource group.
@param resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1206 def list_regional_by_resource_group_with_http_info(resource_group_name, location, filter:nil, top:nil, custom_headers:nil) list_regional_by_resource_group_async(resource_group_name, location, filter:filter, top:top, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription.
List all event subscriptions from the given location under a specific Azure
subscription.
@param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1040 def list_regional_by_subscription(location, filter:nil, top:nil, custom_headers:nil) first_page = list_regional_by_subscription_as_lazy(location, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all regional event subscriptions under an Azure
subscription.
List all event subscriptions from the given location under a specific Azure
subscription.
@param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3573 def list_regional_by_subscription_as_lazy(location, filter:nil, top:nil, custom_headers:nil) response = list_regional_by_subscription_async(location, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_regional_by_subscription_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all regional event subscriptions under an Azure
subscription.
List all event subscriptions from the given location under a specific Azure
subscription.
@param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1095 def list_regional_by_subscription_async(location, filter:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'location' => location}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and topic type.
@param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Array<EventSubscription>] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1316 def list_regional_by_subscription_for_topic_type(location, topic_type_name, filter:nil, top:nil, custom_headers:nil) first_page = list_regional_by_subscription_for_topic_type_as_lazy(location, topic_type_name, filter:filter, top:top, custom_headers:custom_headers) first_page.get_all_items end
List all regional event subscriptions under an Azure
subscription for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and topic type.
@param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] which provide lazy access to pages of the response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3648 def list_regional_by_subscription_for_topic_type_as_lazy(location, topic_type_name, filter:nil, top:nil, custom_headers:nil) response = list_regional_by_subscription_for_topic_type_async(location, topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_regional_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:custom_headers) end page end end
List all regional event subscriptions under an Azure
subscription for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and topic type.
@param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1375 def list_regional_by_subscription_for_topic_type_async(location, topic_type_name, filter:nil, top:nil, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'location is nil' if location.nil? fail ArgumentError, 'topic_type_name is nil' if topic_type_name.nil? fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'location' => location,'topicTypeName' => topic_type_name}, query_params: {'api-version' => @client.api_version,'$filter' => filter,'$top' => top}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3020 def list_regional_by_subscription_for_topic_type_next(next_page_link, custom_headers:nil) response = list_regional_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all regional event subscriptions under an Azure
subscription for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3057 def list_regional_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and topic type.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 3039 def list_regional_by_subscription_for_topic_type_next_with_http_info(next_page_link, custom_headers:nil) list_regional_by_subscription_for_topic_type_next_async(next_page_link, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription for a topic type.
List all event subscriptions from the given location under a specific Azure
subscription and topic type.
@param location [String] Name of the location. @param topic_type_name [String] Name of the topic type. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1346 def list_regional_by_subscription_for_topic_type_with_http_info(location, topic_type_name, filter:nil, top:nil, custom_headers:nil) list_regional_by_subscription_for_topic_type_async(location, topic_type_name, filter:filter, top:top, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription.
List all event subscriptions from the given location under a specific Azure
subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2818 def list_regional_by_subscription_next(next_page_link, custom_headers:nil) response = list_regional_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end
List all regional event subscriptions under an Azure
subscription.
List all event subscriptions from the given location under a specific Azure
subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @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.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2853 def list_regional_by_subscription_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # 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 = '{nextLink}' request_url = @base_url || @client.base_url options = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, options) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscriptionsListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result) end end result end promise.execute end
List all regional event subscriptions under an Azure
subscription.
List all event subscriptions from the given location under a specific Azure
subscription.
@param next_page_link [String] The NextLink from the previous successful call to List operation. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 2836 def list_regional_by_subscription_next_with_http_info(next_page_link, custom_headers:nil) list_regional_by_subscription_next_async(next_page_link, custom_headers:custom_headers).value! end
List all regional event subscriptions under an Azure
subscription.
List all event subscriptions from the given location under a specific Azure
subscription.
@param location [String] Name of the location. @param filter [String] The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. @param top [Integer] The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [MsRestAzure::AzureOperationResponse] HTTP response information.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1068 def list_regional_by_subscription_with_http_info(location, filter:nil, top:nil, custom_headers:nil) list_regional_by_subscription_async(location, filter:filter, top:top, custom_headers:custom_headers).value! end
Update an event subscription.
Asynchronously updates an existing event subscription.
@param scope [String] The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription to be updated. @param event_subscription_update_parameters
- EventSubscriptionUpdateParameters
-
Updated event subscription information.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscription] operation results.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 306 def update(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil) response = update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end
@param scope [String] The scope of existing event subscription. The scope can be a subscription, or a resource group, or a top level resource belonging to a resource provider namespace, or an EventGrid
topic. For example, use '/subscriptions/{subscriptionId}/' for a subscription, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a resource group, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' for a resource, and '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' for an EventGrid
topic. @param event_subscription_name [String] Name of the event subscription to be updated. @param event_subscription_update_parameters
- EventSubscriptionUpdateParameters
-
Updated event subscription information.
@param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [Concurrent::Promise] promise which provides async access to http response.
# File lib/2020-10-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 332 def update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil) # Send request promise = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::EventGrid::Mgmt::V2020_10_15_preview::Models::EventSubscription.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end