class Azure::EventGrid::Mgmt::V2018_09_15_preview::EventSubscriptions
Attributes
@return [EventGridManagementClient] reference to the EventGridManagementClient
Public Class Methods
Creates and initializes a new instance of the EventSubscriptions
class. @param client service class for accessing basic functionality.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 17 def initialize(client) @client = client end
Public 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1560 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1623 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::V2018_09_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::V2018_09_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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1592 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1706 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1757 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1732 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1826 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1883 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::V2018_09_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::V2018_09_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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1855 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/2018-09-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/2018-09-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::V2018_09_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/2018-09-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/2018-09-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/2018-09-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/2018-09-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::V2018_09_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 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/2018-09-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/2018-09-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::V2018_09_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/2018-09-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/2018-09-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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1438 def list_by_domain_topic(resource_group_name, domain_name, topic_name, custom_headers:nil) response = list_by_domain_topic_async(resource_group_name, domain_name, topic_name, 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 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 [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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1477 def list_by_domain_topic_async(resource_group_name, domain_name, topic_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '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}, 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::V2018_09_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 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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1458 def list_by_domain_topic_with_http_info(resource_group_name, domain_name, topic_name, custom_headers:nil) list_by_domain_topic_async(resource_group_name, domain_name, topic_name, 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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1327 def list_by_resource(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil) response = list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, 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 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 [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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1366 def list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '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}, 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::V2018_09_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 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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1347 def list_by_resource_with_http_info(resource_group_name, provider_namespace, resource_type_name, resource_name, custom_headers:nil) list_by_resource_async(resource_group_name, provider_namespace, resource_type_name, resource_name, 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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 688 def list_global_by_resource_group(resource_group_name, custom_headers:nil) response = list_global_by_resource_group_async(resource_group_name, 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 resource_group_name [String] The name of the resource group within the user's 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 725 def list_global_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '@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}, 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::V2018_09_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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 793 def list_global_by_resource_group_for_topic_type(resource_group_name, topic_type_name, custom_headers:nil) response = list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, 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 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 [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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 830 def list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '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}, 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::V2018_09_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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 812 def list_global_by_resource_group_for_topic_type_with_http_info(resource_group_name, topic_type_name, custom_headers:nil) list_global_by_resource_group_for_topic_type_async(resource_group_name, topic_type_name, 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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 707 def list_global_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) list_global_by_resource_group_async(resource_group_name, 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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 489 def list_global_by_subscription(custom_headers:nil) response = list_global_by_subscription_async(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 [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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 522 def list_global_by_subscription_async(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}, 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::V2018_09_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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 587 def list_global_by_subscription_for_topic_type(topic_type_name, custom_headers:nil) response = list_global_by_subscription_for_topic_type_async(topic_type_name, 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 topic_type_name [String] Name of the topic type @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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 620 def list_global_by_subscription_for_topic_type_async(topic_type_name, 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}, 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::V2018_09_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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 604 def list_global_by_subscription_for_topic_type_with_http_info(topic_type_name, custom_headers:nil) list_global_by_subscription_for_topic_type_async(topic_type_name, 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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 506 def list_global_by_subscription_with_http_info(custom_headers:nil) list_global_by_subscription_async(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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 999 def list_regional_by_resource_group(resource_group_name, location, custom_headers:nil) response = list_regional_by_resource_group_async(resource_group_name, location, 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 resource_group_name [String] The name of the resource group within the user's subscription. @param location [String] Name of the location @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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1038 def list_regional_by_resource_group_async(resource_group_name, location, 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}, 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::V2018_09_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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1215 def list_regional_by_resource_group_for_topic_type(resource_group_name, location, topic_type_name, custom_headers:nil) response = list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, 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 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 [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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1256 def list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, custom_headers:nil) fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, '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}, 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::V2018_09_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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1236 def list_regional_by_resource_group_for_topic_type_with_http_info(resource_group_name, location, topic_type_name, custom_headers:nil) list_regional_by_resource_group_for_topic_type_async(resource_group_name, location, topic_type_name, 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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1019 def list_regional_by_resource_group_with_http_info(resource_group_name, location, custom_headers:nil) list_regional_by_resource_group_async(resource_group_name, location, 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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 897 def list_regional_by_subscription(location, custom_headers:nil) response = list_regional_by_subscription_async(location, 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 location [String] Name of the location @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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 930 def list_regional_by_subscription_async(location, 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}, 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::V2018_09_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 custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
@return [EventSubscriptionsListResult] operation results.
# File lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1107 def list_regional_by_subscription_for_topic_type(location, topic_type_name, custom_headers:nil) response = list_regional_by_subscription_for_topic_type_async(location, topic_type_name, 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 location [String] Name of the location @param topic_type_name [String] Name of the topic type @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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1144 def list_regional_by_subscription_for_topic_type_async(location, topic_type_name, 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}, 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::V2018_09_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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 1126 def list_regional_by_subscription_for_topic_type_with_http_info(location, topic_type_name, custom_headers:nil) list_regional_by_subscription_for_topic_type_async(location, topic_type_name, 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 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/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb, line 914 def list_regional_by_subscription_with_http_info(location, custom_headers:nil) list_regional_by_subscription_async(location, 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/2018-09-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/2018-09-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::V2018_09_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