azure_mgmt_event_grid 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2017-06-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
- data/lib/2017-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
- data/lib/2018-01-01/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
- data/lib/2018-05-01-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +1 -1
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid.rb +91 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/domain_topics.rb +231 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/domains.rb +986 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb +153 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb +1917 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb +70 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb +69 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb +50 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain.rb +140 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb +20 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb +46 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb +57 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb +62 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb +55 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb +54 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb +55 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb +17 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb +62 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb +189 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb +49 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb +120 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb +47 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb +21 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb +137 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb +55 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb +95 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb +55 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb +64 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/input_schema.rb +17 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb +49 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_field.rb +50 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb +65 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb +130 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb +69 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb +69 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb +77 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb +69 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb +69 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb +77 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/operation.rb +80 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb +79 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb +55 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/resource.rb +80 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb +16 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb +57 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb +74 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb +75 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb +77 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb +77 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb +77 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb +77 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb +77 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic.rb +144 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb +20 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb +46 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb +57 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb +139 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb +20 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb +55 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb +54 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb +55 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb +92 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb +75 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/module_definition.rb +9 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/operations.rb +116 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/topic_types.rb +299 -0
- data/lib/2018-09-15-preview/generated/azure_mgmt_event_grid/topics.rb +1095 -0
- data/lib/azure_mgmt_event_grid.rb +1 -0
- data/lib/profiles/latest/modules/eventgrid_profile_module.rb +187 -99
- data/lib/version.rb +1 -1
- metadata +69 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c55d48439be0e16ecaa7f79e8af49705bfc26a
|
4
|
+
data.tar.gz: 81f7f1767dfc41f3bf1a3fe57066b58739b222d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 267129740fff41af2278b8bcb2121cd676b09eeabe0bd56d32b490e136e7115a9cda0bcc332b3070a474d6ac329848a6caa34a5ff79299debd002154a024386d
|
7
|
+
data.tar.gz: 88065de53bf309490c8638cf0b7abea59d990aa0d681677b0bf831c98865145c03fc6b2d34095b440022690bd02cc06b42cecebae04f1f23acb1b6719b704a14
|
@@ -138,7 +138,7 @@ module Azure::EventGrid::Mgmt::V2017_06_15_preview
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_event_grid'
|
141
|
-
sdk_information = "#{sdk_information}/0.17.
|
141
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -138,7 +138,7 @@ module Azure::EventGrid::Mgmt::V2017_09_15_preview
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_event_grid'
|
141
|
-
sdk_information = "#{sdk_information}/0.17.
|
141
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -138,7 +138,7 @@ module Azure::EventGrid::Mgmt::V2018_01_01
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_event_grid'
|
141
|
-
sdk_information = "#{sdk_information}/0.17.
|
141
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -138,7 +138,7 @@ module Azure::EventGrid::Mgmt::V2018_05_01_preview
|
|
138
138
|
#
|
139
139
|
def add_telemetry
|
140
140
|
sdk_information = 'azure_mgmt_event_grid'
|
141
|
-
sdk_information = "#{sdk_information}/0.17.
|
141
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
142
142
|
add_user_agent_information(sdk_information)
|
143
143
|
end
|
144
144
|
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2018-09-15-preview/generated/azure_mgmt_event_grid/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::EventGrid::Mgmt::V2018_09_15_preview
|
23
|
+
autoload :Domains, '2018-09-15-preview/generated/azure_mgmt_event_grid/domains.rb'
|
24
|
+
autoload :DomainTopics, '2018-09-15-preview/generated/azure_mgmt_event_grid/domain_topics.rb'
|
25
|
+
autoload :EventSubscriptions, '2018-09-15-preview/generated/azure_mgmt_event_grid/event_subscriptions.rb'
|
26
|
+
autoload :Operations, '2018-09-15-preview/generated/azure_mgmt_event_grid/operations.rb'
|
27
|
+
autoload :Topics, '2018-09-15-preview/generated/azure_mgmt_event_grid/topics.rb'
|
28
|
+
autoload :TopicTypes, '2018-09-15-preview/generated/azure_mgmt_event_grid/topic_types.rb'
|
29
|
+
autoload :EventGridManagementClient, '2018-09-15-preview/generated/azure_mgmt_event_grid/event_grid_management_client.rb'
|
30
|
+
|
31
|
+
module Models
|
32
|
+
autoload :TopicSharedAccessKeys, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_shared_access_keys.rb'
|
33
|
+
autoload :InputSchemaMapping, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/input_schema_mapping.rb'
|
34
|
+
autoload :TopicsListResult, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topics_list_result.rb'
|
35
|
+
autoload :DomainUpdateParameters, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_update_parameters.rb'
|
36
|
+
autoload :EventSubscriptionFullUrl, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_full_url.rb'
|
37
|
+
autoload :DomainSharedAccessKeys, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_shared_access_keys.rb'
|
38
|
+
autoload :EventSubscriptionUpdateParameters, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_update_parameters.rb'
|
39
|
+
autoload :TopicRegenerateKeyRequest, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_regenerate_key_request.rb'
|
40
|
+
autoload :DomainTopicsListResult, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_topics_list_result.rb'
|
41
|
+
autoload :TopicUpdateParameters, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_update_parameters.rb'
|
42
|
+
autoload :AdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/advanced_filter.rb'
|
43
|
+
autoload :JsonFieldWithDefault, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_field_with_default.rb'
|
44
|
+
autoload :RetryPolicy, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/retry_policy.rb'
|
45
|
+
autoload :JsonField, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_field.rb'
|
46
|
+
autoload :Resource, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/resource.rb'
|
47
|
+
autoload :OperationsListResult, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/operations_list_result.rb'
|
48
|
+
autoload :DomainsListResult, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domains_list_result.rb'
|
49
|
+
autoload :Operation, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/operation.rb'
|
50
|
+
autoload :EventSubscriptionDestination, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_destination.rb'
|
51
|
+
autoload :OperationInfo, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/operation_info.rb'
|
52
|
+
autoload :DeadLetterDestination, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/dead_letter_destination.rb'
|
53
|
+
autoload :EventSubscriptionsListResult, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscriptions_list_result.rb'
|
54
|
+
autoload :DomainRegenerateKeyRequest, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_regenerate_key_request.rb'
|
55
|
+
autoload :EventTypesListResult, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_types_list_result.rb'
|
56
|
+
autoload :EventSubscriptionFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_filter.rb'
|
57
|
+
autoload :TopicTypesListResult, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_types_list_result.rb'
|
58
|
+
autoload :Domain, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain.rb'
|
59
|
+
autoload :DomainTopic, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_topic.rb'
|
60
|
+
autoload :NumberInAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_in_advanced_filter.rb'
|
61
|
+
autoload :StorageBlobDeadLetterDestination, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/storage_blob_dead_letter_destination.rb'
|
62
|
+
autoload :NumberNotInAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_not_in_advanced_filter.rb'
|
63
|
+
autoload :NumberLessThanAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_advanced_filter.rb'
|
64
|
+
autoload :NumberGreaterThanAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_advanced_filter.rb'
|
65
|
+
autoload :NumberLessThanOrEqualsAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_less_than_or_equals_advanced_filter.rb'
|
66
|
+
autoload :NumberGreaterThanOrEqualsAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/number_greater_than_or_equals_advanced_filter.rb'
|
67
|
+
autoload :BoolEqualsAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/bool_equals_advanced_filter.rb'
|
68
|
+
autoload :StringInAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_in_advanced_filter.rb'
|
69
|
+
autoload :StringNotInAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_not_in_advanced_filter.rb'
|
70
|
+
autoload :StringBeginsWithAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_begins_with_advanced_filter.rb'
|
71
|
+
autoload :StringEndsWithAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_ends_with_advanced_filter.rb'
|
72
|
+
autoload :StringContainsAdvancedFilter, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/string_contains_advanced_filter.rb'
|
73
|
+
autoload :WebHookEventSubscriptionDestination, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/web_hook_event_subscription_destination.rb'
|
74
|
+
autoload :EventHubEventSubscriptionDestination, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_hub_event_subscription_destination.rb'
|
75
|
+
autoload :StorageQueueEventSubscriptionDestination, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/storage_queue_event_subscription_destination.rb'
|
76
|
+
autoload :HybridConnectionEventSubscriptionDestination, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/hybrid_connection_event_subscription_destination.rb'
|
77
|
+
autoload :EventSubscription, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription.rb'
|
78
|
+
autoload :JsonInputSchemaMapping, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/json_input_schema_mapping.rb'
|
79
|
+
autoload :TrackedResource, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/tracked_resource.rb'
|
80
|
+
autoload :Topic, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic.rb'
|
81
|
+
autoload :EventType, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_type.rb'
|
82
|
+
autoload :TopicTypeInfo, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_info.rb'
|
83
|
+
autoload :DomainProvisioningState, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/domain_provisioning_state.rb'
|
84
|
+
autoload :InputSchema, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/input_schema.rb'
|
85
|
+
autoload :EventSubscriptionProvisioningState, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_subscription_provisioning_state.rb'
|
86
|
+
autoload :EventDeliverySchema, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/event_delivery_schema.rb'
|
87
|
+
autoload :TopicProvisioningState, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_provisioning_state.rb'
|
88
|
+
autoload :ResourceRegionType, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/resource_region_type.rb'
|
89
|
+
autoload :TopicTypeProvisioningState, '2018-09-15-preview/generated/azure_mgmt_event_grid/models/topic_type_provisioning_state.rb'
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,231 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::EventGrid::Mgmt::V2018_09_15_preview
|
7
|
+
#
|
8
|
+
# Azure EventGrid Management Client
|
9
|
+
#
|
10
|
+
class DomainTopics
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the DomainTopics class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [EventGridManagementClient] reference to the EventGridManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get a domain topic
|
26
|
+
#
|
27
|
+
# Get properties of a domain topic
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the resource group within the
|
30
|
+
# user's subscription.
|
31
|
+
# @param domain_name [String] Name of the domain
|
32
|
+
# @param topic_name [String] Name of the topic
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [DomainTopic] operation results.
|
37
|
+
#
|
38
|
+
def get(resource_group_name, domain_name, topic_name, custom_headers:nil)
|
39
|
+
response = get_async(resource_group_name, domain_name, topic_name, custom_headers:custom_headers).value!
|
40
|
+
response.body unless response.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Get a domain topic
|
45
|
+
#
|
46
|
+
# Get properties of a domain topic
|
47
|
+
#
|
48
|
+
# @param resource_group_name [String] The name of the resource group within the
|
49
|
+
# user's subscription.
|
50
|
+
# @param domain_name [String] Name of the domain
|
51
|
+
# @param topic_name [String] Name of the topic
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def get_with_http_info(resource_group_name, domain_name, topic_name, custom_headers:nil)
|
58
|
+
get_async(resource_group_name, domain_name, topic_name, custom_headers:custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Get a domain topic
|
63
|
+
#
|
64
|
+
# Get properties of a domain topic
|
65
|
+
#
|
66
|
+
# @param resource_group_name [String] The name of the resource group within the
|
67
|
+
# user's subscription.
|
68
|
+
# @param domain_name [String] Name of the domain
|
69
|
+
# @param topic_name [String] Name of the topic
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def get_async(resource_group_name, domain_name, topic_name, custom_headers:nil)
|
76
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
77
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
78
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
79
|
+
fail ArgumentError, 'topic_name is nil' if topic_name.nil?
|
80
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
81
|
+
|
82
|
+
|
83
|
+
request_headers = {}
|
84
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
85
|
+
|
86
|
+
# Set Headers
|
87
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
88
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
89
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}'
|
90
|
+
|
91
|
+
request_url = @base_url || @client.base_url
|
92
|
+
|
93
|
+
options = {
|
94
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
95
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name,'topicName' => topic_name},
|
96
|
+
query_params: {'api-version' => @client.api_version},
|
97
|
+
headers: request_headers.merge(custom_headers || {}),
|
98
|
+
base_url: request_url
|
99
|
+
}
|
100
|
+
promise = @client.make_request_async(:get, path_template, options)
|
101
|
+
|
102
|
+
promise = promise.then do |result|
|
103
|
+
http_response = result.response
|
104
|
+
status_code = http_response.status
|
105
|
+
response_content = http_response.body
|
106
|
+
unless status_code == 200
|
107
|
+
error_model = JSON.load(response_content)
|
108
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
109
|
+
end
|
110
|
+
|
111
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
112
|
+
# Deserialize Response
|
113
|
+
if status_code == 200
|
114
|
+
begin
|
115
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
116
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainTopic.mapper()
|
117
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
118
|
+
rescue Exception => e
|
119
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
result
|
124
|
+
end
|
125
|
+
|
126
|
+
promise.execute
|
127
|
+
end
|
128
|
+
|
129
|
+
#
|
130
|
+
# List domain topics.
|
131
|
+
#
|
132
|
+
# List all the topics in a domain.
|
133
|
+
#
|
134
|
+
# @param resource_group_name [String] The name of the resource group within the
|
135
|
+
# user's subscription.
|
136
|
+
# @param domain_name [String] Domain name.
|
137
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
138
|
+
# will be added to the HTTP request.
|
139
|
+
#
|
140
|
+
# @return [DomainTopicsListResult] operation results.
|
141
|
+
#
|
142
|
+
def list_by_domain(resource_group_name, domain_name, custom_headers:nil)
|
143
|
+
response = list_by_domain_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
144
|
+
response.body unless response.nil?
|
145
|
+
end
|
146
|
+
|
147
|
+
#
|
148
|
+
# List domain topics.
|
149
|
+
#
|
150
|
+
# List all the topics in a domain.
|
151
|
+
#
|
152
|
+
# @param resource_group_name [String] The name of the resource group within the
|
153
|
+
# user's subscription.
|
154
|
+
# @param domain_name [String] Domain name.
|
155
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
156
|
+
# will be added to the HTTP request.
|
157
|
+
#
|
158
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
159
|
+
#
|
160
|
+
def list_by_domain_with_http_info(resource_group_name, domain_name, custom_headers:nil)
|
161
|
+
list_by_domain_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
162
|
+
end
|
163
|
+
|
164
|
+
#
|
165
|
+
# List domain topics.
|
166
|
+
#
|
167
|
+
# List all the topics in a domain.
|
168
|
+
#
|
169
|
+
# @param resource_group_name [String] The name of the resource group within the
|
170
|
+
# user's subscription.
|
171
|
+
# @param domain_name [String] Domain name.
|
172
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
173
|
+
# to the HTTP request.
|
174
|
+
#
|
175
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
176
|
+
#
|
177
|
+
def list_by_domain_async(resource_group_name, domain_name, custom_headers:nil)
|
178
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
179
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
180
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
181
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
182
|
+
|
183
|
+
|
184
|
+
request_headers = {}
|
185
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
186
|
+
|
187
|
+
# Set Headers
|
188
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
189
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
190
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics'
|
191
|
+
|
192
|
+
request_url = @base_url || @client.base_url
|
193
|
+
|
194
|
+
options = {
|
195
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
196
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name},
|
197
|
+
query_params: {'api-version' => @client.api_version},
|
198
|
+
headers: request_headers.merge(custom_headers || {}),
|
199
|
+
base_url: request_url
|
200
|
+
}
|
201
|
+
promise = @client.make_request_async(:get, path_template, options)
|
202
|
+
|
203
|
+
promise = promise.then do |result|
|
204
|
+
http_response = result.response
|
205
|
+
status_code = http_response.status
|
206
|
+
response_content = http_response.body
|
207
|
+
unless status_code == 200
|
208
|
+
error_model = JSON.load(response_content)
|
209
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
210
|
+
end
|
211
|
+
|
212
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
213
|
+
# Deserialize Response
|
214
|
+
if status_code == 200
|
215
|
+
begin
|
216
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
217
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainTopicsListResult.mapper()
|
218
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
219
|
+
rescue Exception => e
|
220
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
result
|
225
|
+
end
|
226
|
+
|
227
|
+
promise.execute
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
231
|
+
end
|
@@ -0,0 +1,986 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::EventGrid::Mgmt::V2018_09_15_preview
|
7
|
+
#
|
8
|
+
# Azure EventGrid Management Client
|
9
|
+
#
|
10
|
+
class Domains
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Domains class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [EventGridManagementClient] reference to the EventGridManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get a domain
|
26
|
+
#
|
27
|
+
# Get properties of a domain
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the resource group within the
|
30
|
+
# user's subscription.
|
31
|
+
# @param domain_name [String] Name of the domain
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [Domain] operation results.
|
36
|
+
#
|
37
|
+
def get(resource_group_name, domain_name, custom_headers:nil)
|
38
|
+
response = get_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Get a domain
|
44
|
+
#
|
45
|
+
# Get properties of a domain
|
46
|
+
#
|
47
|
+
# @param resource_group_name [String] The name of the resource group within the
|
48
|
+
# user's subscription.
|
49
|
+
# @param domain_name [String] Name of the domain
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
|
+
#
|
55
|
+
def get_with_http_info(resource_group_name, domain_name, custom_headers:nil)
|
56
|
+
get_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Get a domain
|
61
|
+
#
|
62
|
+
# Get properties of a domain
|
63
|
+
#
|
64
|
+
# @param resource_group_name [String] The name of the resource group within the
|
65
|
+
# user's subscription.
|
66
|
+
# @param domain_name [String] Name of the domain
|
67
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
68
|
+
# to the HTTP request.
|
69
|
+
#
|
70
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
#
|
72
|
+
def get_async(resource_group_name, domain_name, custom_headers:nil)
|
73
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
74
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
75
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
76
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
77
|
+
|
78
|
+
|
79
|
+
request_headers = {}
|
80
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
81
|
+
|
82
|
+
# Set Headers
|
83
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
84
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
85
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'
|
86
|
+
|
87
|
+
request_url = @base_url || @client.base_url
|
88
|
+
|
89
|
+
options = {
|
90
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
91
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name},
|
92
|
+
query_params: {'api-version' => @client.api_version},
|
93
|
+
headers: request_headers.merge(custom_headers || {}),
|
94
|
+
base_url: request_url
|
95
|
+
}
|
96
|
+
promise = @client.make_request_async(:get, path_template, options)
|
97
|
+
|
98
|
+
promise = promise.then do |result|
|
99
|
+
http_response = result.response
|
100
|
+
status_code = http_response.status
|
101
|
+
response_content = http_response.body
|
102
|
+
unless status_code == 200
|
103
|
+
error_model = JSON.load(response_content)
|
104
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
105
|
+
end
|
106
|
+
|
107
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
108
|
+
# Deserialize Response
|
109
|
+
if status_code == 200
|
110
|
+
begin
|
111
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
112
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::Domain.mapper()
|
113
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
114
|
+
rescue Exception => e
|
115
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
result
|
120
|
+
end
|
121
|
+
|
122
|
+
promise.execute
|
123
|
+
end
|
124
|
+
|
125
|
+
#
|
126
|
+
# Create a domain
|
127
|
+
#
|
128
|
+
# Asynchronously creates a new domain with the specified parameters.
|
129
|
+
#
|
130
|
+
# @param resource_group_name [String] The name of the resource group within the
|
131
|
+
# user's subscription.
|
132
|
+
# @param domain_name [String] Name of the domain
|
133
|
+
# @param domain_info [Domain] Domain information
|
134
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
135
|
+
# will be added to the HTTP request.
|
136
|
+
#
|
137
|
+
# @return [Domain] operation results.
|
138
|
+
#
|
139
|
+
def create_or_update(resource_group_name, domain_name, domain_info, custom_headers:nil)
|
140
|
+
response = create_or_update_async(resource_group_name, domain_name, domain_info, custom_headers:custom_headers).value!
|
141
|
+
response.body unless response.nil?
|
142
|
+
end
|
143
|
+
|
144
|
+
#
|
145
|
+
# @param resource_group_name [String] The name of the resource group within the
|
146
|
+
# user's subscription.
|
147
|
+
# @param domain_name [String] Name of the domain
|
148
|
+
# @param domain_info [Domain] Domain information
|
149
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
150
|
+
# will be added to the HTTP request.
|
151
|
+
#
|
152
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
153
|
+
# response.
|
154
|
+
#
|
155
|
+
def create_or_update_async(resource_group_name, domain_name, domain_info, custom_headers:nil)
|
156
|
+
# Send request
|
157
|
+
promise = begin_create_or_update_async(resource_group_name, domain_name, domain_info, custom_headers:custom_headers)
|
158
|
+
|
159
|
+
promise = promise.then do |response|
|
160
|
+
# Defining deserialization method.
|
161
|
+
deserialize_method = lambda do |parsed_response|
|
162
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::Domain.mapper()
|
163
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Waiting for response.
|
167
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
168
|
+
end
|
169
|
+
|
170
|
+
promise
|
171
|
+
end
|
172
|
+
|
173
|
+
#
|
174
|
+
# Delete a domain
|
175
|
+
#
|
176
|
+
# Delete existing domain
|
177
|
+
#
|
178
|
+
# @param resource_group_name [String] The name of the resource group within the
|
179
|
+
# user's subscription.
|
180
|
+
# @param domain_name [String] Name of the domain
|
181
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
182
|
+
# will be added to the HTTP request.
|
183
|
+
#
|
184
|
+
def delete(resource_group_name, domain_name, custom_headers:nil)
|
185
|
+
response = delete_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
186
|
+
nil
|
187
|
+
end
|
188
|
+
|
189
|
+
#
|
190
|
+
# @param resource_group_name [String] The name of the resource group within the
|
191
|
+
# user's subscription.
|
192
|
+
# @param domain_name [String] Name of the domain
|
193
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
194
|
+
# will be added to the HTTP request.
|
195
|
+
#
|
196
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
197
|
+
# response.
|
198
|
+
#
|
199
|
+
def delete_async(resource_group_name, domain_name, custom_headers:nil)
|
200
|
+
# Send request
|
201
|
+
promise = begin_delete_async(resource_group_name, domain_name, custom_headers:custom_headers)
|
202
|
+
|
203
|
+
promise = promise.then do |response|
|
204
|
+
# Defining deserialization method.
|
205
|
+
deserialize_method = lambda do |parsed_response|
|
206
|
+
end
|
207
|
+
|
208
|
+
# Waiting for response.
|
209
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
210
|
+
end
|
211
|
+
|
212
|
+
promise
|
213
|
+
end
|
214
|
+
|
215
|
+
#
|
216
|
+
# Update a domain
|
217
|
+
#
|
218
|
+
# Asynchronously updates a domain with the specified parameters.
|
219
|
+
#
|
220
|
+
# @param resource_group_name [String] The name of the resource group within the
|
221
|
+
# user's subscription.
|
222
|
+
# @param domain_name [String] Name of the domain
|
223
|
+
# @param domain_update_parameters [DomainUpdateParameters] Domain update
|
224
|
+
# information
|
225
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
226
|
+
# will be added to the HTTP request.
|
227
|
+
#
|
228
|
+
# @return [Domain] operation results.
|
229
|
+
#
|
230
|
+
def update(resource_group_name, domain_name, domain_update_parameters, custom_headers:nil)
|
231
|
+
response = update_async(resource_group_name, domain_name, domain_update_parameters, custom_headers:custom_headers).value!
|
232
|
+
response.body unless response.nil?
|
233
|
+
end
|
234
|
+
|
235
|
+
#
|
236
|
+
# @param resource_group_name [String] The name of the resource group within the
|
237
|
+
# user's subscription.
|
238
|
+
# @param domain_name [String] Name of the domain
|
239
|
+
# @param domain_update_parameters [DomainUpdateParameters] Domain update
|
240
|
+
# information
|
241
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
242
|
+
# will be added to the HTTP request.
|
243
|
+
#
|
244
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
245
|
+
# response.
|
246
|
+
#
|
247
|
+
def update_async(resource_group_name, domain_name, domain_update_parameters, custom_headers:nil)
|
248
|
+
# Send request
|
249
|
+
promise = begin_update_async(resource_group_name, domain_name, domain_update_parameters, custom_headers:custom_headers)
|
250
|
+
|
251
|
+
promise = promise.then do |response|
|
252
|
+
# Defining deserialization method.
|
253
|
+
deserialize_method = lambda do |parsed_response|
|
254
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::Domain.mapper()
|
255
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
256
|
+
end
|
257
|
+
|
258
|
+
# Waiting for response.
|
259
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
260
|
+
end
|
261
|
+
|
262
|
+
promise
|
263
|
+
end
|
264
|
+
|
265
|
+
#
|
266
|
+
# List domains under an Azure subscription
|
267
|
+
#
|
268
|
+
# List all the domains under an Azure subscription
|
269
|
+
#
|
270
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
271
|
+
# will be added to the HTTP request.
|
272
|
+
#
|
273
|
+
# @return [DomainsListResult] operation results.
|
274
|
+
#
|
275
|
+
def list_by_subscription(custom_headers:nil)
|
276
|
+
response = list_by_subscription_async(custom_headers:custom_headers).value!
|
277
|
+
response.body unless response.nil?
|
278
|
+
end
|
279
|
+
|
280
|
+
#
|
281
|
+
# List domains under an Azure subscription
|
282
|
+
#
|
283
|
+
# List all the domains under an Azure subscription
|
284
|
+
#
|
285
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
286
|
+
# will be added to the HTTP request.
|
287
|
+
#
|
288
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
289
|
+
#
|
290
|
+
def list_by_subscription_with_http_info(custom_headers:nil)
|
291
|
+
list_by_subscription_async(custom_headers:custom_headers).value!
|
292
|
+
end
|
293
|
+
|
294
|
+
#
|
295
|
+
# List domains under an Azure subscription
|
296
|
+
#
|
297
|
+
# List all the domains under an Azure subscription
|
298
|
+
#
|
299
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
300
|
+
# to the HTTP request.
|
301
|
+
#
|
302
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
303
|
+
#
|
304
|
+
def list_by_subscription_async(custom_headers:nil)
|
305
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
306
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
307
|
+
|
308
|
+
|
309
|
+
request_headers = {}
|
310
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
311
|
+
|
312
|
+
# Set Headers
|
313
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
314
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
315
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/domains'
|
316
|
+
|
317
|
+
request_url = @base_url || @client.base_url
|
318
|
+
|
319
|
+
options = {
|
320
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
321
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
322
|
+
query_params: {'api-version' => @client.api_version},
|
323
|
+
headers: request_headers.merge(custom_headers || {}),
|
324
|
+
base_url: request_url
|
325
|
+
}
|
326
|
+
promise = @client.make_request_async(:get, path_template, options)
|
327
|
+
|
328
|
+
promise = promise.then do |result|
|
329
|
+
http_response = result.response
|
330
|
+
status_code = http_response.status
|
331
|
+
response_content = http_response.body
|
332
|
+
unless status_code == 200
|
333
|
+
error_model = JSON.load(response_content)
|
334
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
335
|
+
end
|
336
|
+
|
337
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
338
|
+
# Deserialize Response
|
339
|
+
if status_code == 200
|
340
|
+
begin
|
341
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
342
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainsListResult.mapper()
|
343
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
344
|
+
rescue Exception => e
|
345
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
result
|
350
|
+
end
|
351
|
+
|
352
|
+
promise.execute
|
353
|
+
end
|
354
|
+
|
355
|
+
#
|
356
|
+
# List domains under a resource group
|
357
|
+
#
|
358
|
+
# List all the domains under a resource group
|
359
|
+
#
|
360
|
+
# @param resource_group_name [String] The name of the resource group within the
|
361
|
+
# user's subscription.
|
362
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
363
|
+
# will be added to the HTTP request.
|
364
|
+
#
|
365
|
+
# @return [DomainsListResult] operation results.
|
366
|
+
#
|
367
|
+
def list_by_resource_group(resource_group_name, custom_headers:nil)
|
368
|
+
response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
369
|
+
response.body unless response.nil?
|
370
|
+
end
|
371
|
+
|
372
|
+
#
|
373
|
+
# List domains under a resource group
|
374
|
+
#
|
375
|
+
# List all the domains under a resource group
|
376
|
+
#
|
377
|
+
# @param resource_group_name [String] The name of the resource group within the
|
378
|
+
# user's subscription.
|
379
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
380
|
+
# will be added to the HTTP request.
|
381
|
+
#
|
382
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
383
|
+
#
|
384
|
+
def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
|
385
|
+
list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
|
386
|
+
end
|
387
|
+
|
388
|
+
#
|
389
|
+
# List domains under a resource group
|
390
|
+
#
|
391
|
+
# List all the domains under a resource group
|
392
|
+
#
|
393
|
+
# @param resource_group_name [String] The name of the resource group within the
|
394
|
+
# user's subscription.
|
395
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
396
|
+
# to the HTTP request.
|
397
|
+
#
|
398
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
399
|
+
#
|
400
|
+
def list_by_resource_group_async(resource_group_name, custom_headers:nil)
|
401
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
402
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
403
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
404
|
+
|
405
|
+
|
406
|
+
request_headers = {}
|
407
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
408
|
+
|
409
|
+
# Set Headers
|
410
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
411
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
412
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains'
|
413
|
+
|
414
|
+
request_url = @base_url || @client.base_url
|
415
|
+
|
416
|
+
options = {
|
417
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
418
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
|
419
|
+
query_params: {'api-version' => @client.api_version},
|
420
|
+
headers: request_headers.merge(custom_headers || {}),
|
421
|
+
base_url: request_url
|
422
|
+
}
|
423
|
+
promise = @client.make_request_async(:get, path_template, options)
|
424
|
+
|
425
|
+
promise = promise.then do |result|
|
426
|
+
http_response = result.response
|
427
|
+
status_code = http_response.status
|
428
|
+
response_content = http_response.body
|
429
|
+
unless status_code == 200
|
430
|
+
error_model = JSON.load(response_content)
|
431
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
432
|
+
end
|
433
|
+
|
434
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
435
|
+
# Deserialize Response
|
436
|
+
if status_code == 200
|
437
|
+
begin
|
438
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
439
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainsListResult.mapper()
|
440
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
441
|
+
rescue Exception => e
|
442
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
446
|
+
result
|
447
|
+
end
|
448
|
+
|
449
|
+
promise.execute
|
450
|
+
end
|
451
|
+
|
452
|
+
#
|
453
|
+
# List keys for a domain
|
454
|
+
#
|
455
|
+
# List the two keys used to publish to a domain
|
456
|
+
#
|
457
|
+
# @param resource_group_name [String] The name of the resource group within the
|
458
|
+
# user's subscription.
|
459
|
+
# @param domain_name [String] Name of the domain
|
460
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
461
|
+
# will be added to the HTTP request.
|
462
|
+
#
|
463
|
+
# @return [DomainSharedAccessKeys] operation results.
|
464
|
+
#
|
465
|
+
def list_shared_access_keys(resource_group_name, domain_name, custom_headers:nil)
|
466
|
+
response = list_shared_access_keys_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
467
|
+
response.body unless response.nil?
|
468
|
+
end
|
469
|
+
|
470
|
+
#
|
471
|
+
# List keys for a domain
|
472
|
+
#
|
473
|
+
# List the two keys used to publish to a domain
|
474
|
+
#
|
475
|
+
# @param resource_group_name [String] The name of the resource group within the
|
476
|
+
# user's subscription.
|
477
|
+
# @param domain_name [String] Name of the domain
|
478
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
479
|
+
# will be added to the HTTP request.
|
480
|
+
#
|
481
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
482
|
+
#
|
483
|
+
def list_shared_access_keys_with_http_info(resource_group_name, domain_name, custom_headers:nil)
|
484
|
+
list_shared_access_keys_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
485
|
+
end
|
486
|
+
|
487
|
+
#
|
488
|
+
# List keys for a domain
|
489
|
+
#
|
490
|
+
# List the two keys used to publish to a domain
|
491
|
+
#
|
492
|
+
# @param resource_group_name [String] The name of the resource group within the
|
493
|
+
# user's subscription.
|
494
|
+
# @param domain_name [String] Name of the domain
|
495
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
496
|
+
# to the HTTP request.
|
497
|
+
#
|
498
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
499
|
+
#
|
500
|
+
def list_shared_access_keys_async(resource_group_name, domain_name, custom_headers:nil)
|
501
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
502
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
503
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
504
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
505
|
+
|
506
|
+
|
507
|
+
request_headers = {}
|
508
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
509
|
+
|
510
|
+
# Set Headers
|
511
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
512
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
513
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/listKeys'
|
514
|
+
|
515
|
+
request_url = @base_url || @client.base_url
|
516
|
+
|
517
|
+
options = {
|
518
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
519
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name},
|
520
|
+
query_params: {'api-version' => @client.api_version},
|
521
|
+
headers: request_headers.merge(custom_headers || {}),
|
522
|
+
base_url: request_url
|
523
|
+
}
|
524
|
+
promise = @client.make_request_async(:post, path_template, options)
|
525
|
+
|
526
|
+
promise = promise.then do |result|
|
527
|
+
http_response = result.response
|
528
|
+
status_code = http_response.status
|
529
|
+
response_content = http_response.body
|
530
|
+
unless status_code == 200
|
531
|
+
error_model = JSON.load(response_content)
|
532
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
533
|
+
end
|
534
|
+
|
535
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
536
|
+
# Deserialize Response
|
537
|
+
if status_code == 200
|
538
|
+
begin
|
539
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
540
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainSharedAccessKeys.mapper()
|
541
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
542
|
+
rescue Exception => e
|
543
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
result
|
548
|
+
end
|
549
|
+
|
550
|
+
promise.execute
|
551
|
+
end
|
552
|
+
|
553
|
+
#
|
554
|
+
# Regenerate key for a domain
|
555
|
+
#
|
556
|
+
# Regenerate a shared access key for a domain
|
557
|
+
#
|
558
|
+
# @param resource_group_name [String] The name of the resource group within the
|
559
|
+
# user's subscription.
|
560
|
+
# @param domain_name [String] Name of the domain
|
561
|
+
# @param regenerate_key_request [DomainRegenerateKeyRequest] Request body to
|
562
|
+
# regenerate key
|
563
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
564
|
+
# will be added to the HTTP request.
|
565
|
+
#
|
566
|
+
# @return [DomainSharedAccessKeys] operation results.
|
567
|
+
#
|
568
|
+
def regenerate_key(resource_group_name, domain_name, regenerate_key_request, custom_headers:nil)
|
569
|
+
response = regenerate_key_async(resource_group_name, domain_name, regenerate_key_request, custom_headers:custom_headers).value!
|
570
|
+
response.body unless response.nil?
|
571
|
+
end
|
572
|
+
|
573
|
+
#
|
574
|
+
# Regenerate key for a domain
|
575
|
+
#
|
576
|
+
# Regenerate a shared access key for a domain
|
577
|
+
#
|
578
|
+
# @param resource_group_name [String] The name of the resource group within the
|
579
|
+
# user's subscription.
|
580
|
+
# @param domain_name [String] Name of the domain
|
581
|
+
# @param regenerate_key_request [DomainRegenerateKeyRequest] Request body to
|
582
|
+
# regenerate key
|
583
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
584
|
+
# will be added to the HTTP request.
|
585
|
+
#
|
586
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
587
|
+
#
|
588
|
+
def regenerate_key_with_http_info(resource_group_name, domain_name, regenerate_key_request, custom_headers:nil)
|
589
|
+
regenerate_key_async(resource_group_name, domain_name, regenerate_key_request, custom_headers:custom_headers).value!
|
590
|
+
end
|
591
|
+
|
592
|
+
#
|
593
|
+
# Regenerate key for a domain
|
594
|
+
#
|
595
|
+
# Regenerate a shared access key for a domain
|
596
|
+
#
|
597
|
+
# @param resource_group_name [String] The name of the resource group within the
|
598
|
+
# user's subscription.
|
599
|
+
# @param domain_name [String] Name of the domain
|
600
|
+
# @param regenerate_key_request [DomainRegenerateKeyRequest] Request body to
|
601
|
+
# regenerate key
|
602
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
603
|
+
# to the HTTP request.
|
604
|
+
#
|
605
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
606
|
+
#
|
607
|
+
def regenerate_key_async(resource_group_name, domain_name, regenerate_key_request, custom_headers:nil)
|
608
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
609
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
610
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
611
|
+
fail ArgumentError, 'regenerate_key_request is nil' if regenerate_key_request.nil?
|
612
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
613
|
+
|
614
|
+
|
615
|
+
request_headers = {}
|
616
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
617
|
+
|
618
|
+
# Set Headers
|
619
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
620
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
621
|
+
|
622
|
+
# Serialize Request
|
623
|
+
request_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainRegenerateKeyRequest.mapper()
|
624
|
+
request_content = @client.serialize(request_mapper, regenerate_key_request)
|
625
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
626
|
+
|
627
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/regenerateKey'
|
628
|
+
|
629
|
+
request_url = @base_url || @client.base_url
|
630
|
+
|
631
|
+
options = {
|
632
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
633
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name},
|
634
|
+
query_params: {'api-version' => @client.api_version},
|
635
|
+
body: request_content,
|
636
|
+
headers: request_headers.merge(custom_headers || {}),
|
637
|
+
base_url: request_url
|
638
|
+
}
|
639
|
+
promise = @client.make_request_async(:post, path_template, options)
|
640
|
+
|
641
|
+
promise = promise.then do |result|
|
642
|
+
http_response = result.response
|
643
|
+
status_code = http_response.status
|
644
|
+
response_content = http_response.body
|
645
|
+
unless status_code == 200
|
646
|
+
error_model = JSON.load(response_content)
|
647
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
648
|
+
end
|
649
|
+
|
650
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
651
|
+
# Deserialize Response
|
652
|
+
if status_code == 200
|
653
|
+
begin
|
654
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
655
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainSharedAccessKeys.mapper()
|
656
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
657
|
+
rescue Exception => e
|
658
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
659
|
+
end
|
660
|
+
end
|
661
|
+
|
662
|
+
result
|
663
|
+
end
|
664
|
+
|
665
|
+
promise.execute
|
666
|
+
end
|
667
|
+
|
668
|
+
#
|
669
|
+
# Create a domain
|
670
|
+
#
|
671
|
+
# Asynchronously creates a new domain with the specified parameters.
|
672
|
+
#
|
673
|
+
# @param resource_group_name [String] The name of the resource group within the
|
674
|
+
# user's subscription.
|
675
|
+
# @param domain_name [String] Name of the domain
|
676
|
+
# @param domain_info [Domain] Domain information
|
677
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
678
|
+
# will be added to the HTTP request.
|
679
|
+
#
|
680
|
+
# @return [Domain] operation results.
|
681
|
+
#
|
682
|
+
def begin_create_or_update(resource_group_name, domain_name, domain_info, custom_headers:nil)
|
683
|
+
response = begin_create_or_update_async(resource_group_name, domain_name, domain_info, custom_headers:custom_headers).value!
|
684
|
+
response.body unless response.nil?
|
685
|
+
end
|
686
|
+
|
687
|
+
#
|
688
|
+
# Create a domain
|
689
|
+
#
|
690
|
+
# Asynchronously creates a new domain with the specified parameters.
|
691
|
+
#
|
692
|
+
# @param resource_group_name [String] The name of the resource group within the
|
693
|
+
# user's subscription.
|
694
|
+
# @param domain_name [String] Name of the domain
|
695
|
+
# @param domain_info [Domain] Domain information
|
696
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
697
|
+
# will be added to the HTTP request.
|
698
|
+
#
|
699
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
700
|
+
#
|
701
|
+
def begin_create_or_update_with_http_info(resource_group_name, domain_name, domain_info, custom_headers:nil)
|
702
|
+
begin_create_or_update_async(resource_group_name, domain_name, domain_info, custom_headers:custom_headers).value!
|
703
|
+
end
|
704
|
+
|
705
|
+
#
|
706
|
+
# Create a domain
|
707
|
+
#
|
708
|
+
# Asynchronously creates a new domain with the specified parameters.
|
709
|
+
#
|
710
|
+
# @param resource_group_name [String] The name of the resource group within the
|
711
|
+
# user's subscription.
|
712
|
+
# @param domain_name [String] Name of the domain
|
713
|
+
# @param domain_info [Domain] Domain information
|
714
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
715
|
+
# to the HTTP request.
|
716
|
+
#
|
717
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
718
|
+
#
|
719
|
+
def begin_create_or_update_async(resource_group_name, domain_name, domain_info, custom_headers:nil)
|
720
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
721
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
722
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
723
|
+
fail ArgumentError, 'domain_info is nil' if domain_info.nil?
|
724
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
725
|
+
|
726
|
+
|
727
|
+
request_headers = {}
|
728
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
729
|
+
|
730
|
+
# Set Headers
|
731
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
732
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
733
|
+
|
734
|
+
# Serialize Request
|
735
|
+
request_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::Domain.mapper()
|
736
|
+
request_content = @client.serialize(request_mapper, domain_info)
|
737
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
738
|
+
|
739
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'
|
740
|
+
|
741
|
+
request_url = @base_url || @client.base_url
|
742
|
+
|
743
|
+
options = {
|
744
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
745
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name},
|
746
|
+
query_params: {'api-version' => @client.api_version},
|
747
|
+
body: request_content,
|
748
|
+
headers: request_headers.merge(custom_headers || {}),
|
749
|
+
base_url: request_url
|
750
|
+
}
|
751
|
+
promise = @client.make_request_async(:put, path_template, options)
|
752
|
+
|
753
|
+
promise = promise.then do |result|
|
754
|
+
http_response = result.response
|
755
|
+
status_code = http_response.status
|
756
|
+
response_content = http_response.body
|
757
|
+
unless status_code == 201
|
758
|
+
error_model = JSON.load(response_content)
|
759
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
760
|
+
end
|
761
|
+
|
762
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
763
|
+
# Deserialize Response
|
764
|
+
if status_code == 201
|
765
|
+
begin
|
766
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
767
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::Domain.mapper()
|
768
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
769
|
+
rescue Exception => e
|
770
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
771
|
+
end
|
772
|
+
end
|
773
|
+
|
774
|
+
result
|
775
|
+
end
|
776
|
+
|
777
|
+
promise.execute
|
778
|
+
end
|
779
|
+
|
780
|
+
#
|
781
|
+
# Delete a domain
|
782
|
+
#
|
783
|
+
# Delete existing domain
|
784
|
+
#
|
785
|
+
# @param resource_group_name [String] The name of the resource group within the
|
786
|
+
# user's subscription.
|
787
|
+
# @param domain_name [String] Name of the domain
|
788
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
789
|
+
# will be added to the HTTP request.
|
790
|
+
#
|
791
|
+
#
|
792
|
+
def begin_delete(resource_group_name, domain_name, custom_headers:nil)
|
793
|
+
response = begin_delete_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
794
|
+
nil
|
795
|
+
end
|
796
|
+
|
797
|
+
#
|
798
|
+
# Delete a domain
|
799
|
+
#
|
800
|
+
# Delete existing domain
|
801
|
+
#
|
802
|
+
# @param resource_group_name [String] The name of the resource group within the
|
803
|
+
# user's subscription.
|
804
|
+
# @param domain_name [String] Name of the domain
|
805
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
806
|
+
# will be added to the HTTP request.
|
807
|
+
#
|
808
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
809
|
+
#
|
810
|
+
def begin_delete_with_http_info(resource_group_name, domain_name, custom_headers:nil)
|
811
|
+
begin_delete_async(resource_group_name, domain_name, custom_headers:custom_headers).value!
|
812
|
+
end
|
813
|
+
|
814
|
+
#
|
815
|
+
# Delete a domain
|
816
|
+
#
|
817
|
+
# Delete existing domain
|
818
|
+
#
|
819
|
+
# @param resource_group_name [String] The name of the resource group within the
|
820
|
+
# user's subscription.
|
821
|
+
# @param domain_name [String] Name of the domain
|
822
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
823
|
+
# to the HTTP request.
|
824
|
+
#
|
825
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
826
|
+
#
|
827
|
+
def begin_delete_async(resource_group_name, domain_name, custom_headers:nil)
|
828
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
829
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
830
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
831
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
832
|
+
|
833
|
+
|
834
|
+
request_headers = {}
|
835
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
836
|
+
|
837
|
+
# Set Headers
|
838
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
839
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
840
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'
|
841
|
+
|
842
|
+
request_url = @base_url || @client.base_url
|
843
|
+
|
844
|
+
options = {
|
845
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
846
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name},
|
847
|
+
query_params: {'api-version' => @client.api_version},
|
848
|
+
headers: request_headers.merge(custom_headers || {}),
|
849
|
+
base_url: request_url
|
850
|
+
}
|
851
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
852
|
+
|
853
|
+
promise = promise.then do |result|
|
854
|
+
http_response = result.response
|
855
|
+
status_code = http_response.status
|
856
|
+
response_content = http_response.body
|
857
|
+
unless status_code == 202 || status_code == 204
|
858
|
+
error_model = JSON.load(response_content)
|
859
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
860
|
+
end
|
861
|
+
|
862
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
863
|
+
|
864
|
+
result
|
865
|
+
end
|
866
|
+
|
867
|
+
promise.execute
|
868
|
+
end
|
869
|
+
|
870
|
+
#
|
871
|
+
# Update a domain
|
872
|
+
#
|
873
|
+
# Asynchronously updates a domain with the specified parameters.
|
874
|
+
#
|
875
|
+
# @param resource_group_name [String] The name of the resource group within the
|
876
|
+
# user's subscription.
|
877
|
+
# @param domain_name [String] Name of the domain
|
878
|
+
# @param domain_update_parameters [DomainUpdateParameters] Domain update
|
879
|
+
# information
|
880
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
881
|
+
# will be added to the HTTP request.
|
882
|
+
#
|
883
|
+
# @return [Domain] operation results.
|
884
|
+
#
|
885
|
+
def begin_update(resource_group_name, domain_name, domain_update_parameters, custom_headers:nil)
|
886
|
+
response = begin_update_async(resource_group_name, domain_name, domain_update_parameters, custom_headers:custom_headers).value!
|
887
|
+
response.body unless response.nil?
|
888
|
+
end
|
889
|
+
|
890
|
+
#
|
891
|
+
# Update a domain
|
892
|
+
#
|
893
|
+
# Asynchronously updates a domain with the specified parameters.
|
894
|
+
#
|
895
|
+
# @param resource_group_name [String] The name of the resource group within the
|
896
|
+
# user's subscription.
|
897
|
+
# @param domain_name [String] Name of the domain
|
898
|
+
# @param domain_update_parameters [DomainUpdateParameters] Domain update
|
899
|
+
# information
|
900
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
901
|
+
# will be added to the HTTP request.
|
902
|
+
#
|
903
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
904
|
+
#
|
905
|
+
def begin_update_with_http_info(resource_group_name, domain_name, domain_update_parameters, custom_headers:nil)
|
906
|
+
begin_update_async(resource_group_name, domain_name, domain_update_parameters, custom_headers:custom_headers).value!
|
907
|
+
end
|
908
|
+
|
909
|
+
#
|
910
|
+
# Update a domain
|
911
|
+
#
|
912
|
+
# Asynchronously updates a domain with the specified parameters.
|
913
|
+
#
|
914
|
+
# @param resource_group_name [String] The name of the resource group within the
|
915
|
+
# user's subscription.
|
916
|
+
# @param domain_name [String] Name of the domain
|
917
|
+
# @param domain_update_parameters [DomainUpdateParameters] Domain update
|
918
|
+
# information
|
919
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
920
|
+
# to the HTTP request.
|
921
|
+
#
|
922
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
923
|
+
#
|
924
|
+
def begin_update_async(resource_group_name, domain_name, domain_update_parameters, custom_headers:nil)
|
925
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
926
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
927
|
+
fail ArgumentError, 'domain_name is nil' if domain_name.nil?
|
928
|
+
fail ArgumentError, 'domain_update_parameters is nil' if domain_update_parameters.nil?
|
929
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
930
|
+
|
931
|
+
|
932
|
+
request_headers = {}
|
933
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
934
|
+
|
935
|
+
# Set Headers
|
936
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
937
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
938
|
+
|
939
|
+
# Serialize Request
|
940
|
+
request_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::DomainUpdateParameters.mapper()
|
941
|
+
request_content = @client.serialize(request_mapper, domain_update_parameters)
|
942
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
943
|
+
|
944
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}'
|
945
|
+
|
946
|
+
request_url = @base_url || @client.base_url
|
947
|
+
|
948
|
+
options = {
|
949
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
950
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'domainName' => domain_name},
|
951
|
+
query_params: {'api-version' => @client.api_version},
|
952
|
+
body: request_content,
|
953
|
+
headers: request_headers.merge(custom_headers || {}),
|
954
|
+
base_url: request_url
|
955
|
+
}
|
956
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
957
|
+
|
958
|
+
promise = promise.then do |result|
|
959
|
+
http_response = result.response
|
960
|
+
status_code = http_response.status
|
961
|
+
response_content = http_response.body
|
962
|
+
unless status_code == 201
|
963
|
+
error_model = JSON.load(response_content)
|
964
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
965
|
+
end
|
966
|
+
|
967
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
968
|
+
# Deserialize Response
|
969
|
+
if status_code == 201
|
970
|
+
begin
|
971
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
972
|
+
result_mapper = Azure::EventGrid::Mgmt::V2018_09_15_preview::Models::Domain.mapper()
|
973
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
974
|
+
rescue Exception => e
|
975
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
976
|
+
end
|
977
|
+
end
|
978
|
+
|
979
|
+
result
|
980
|
+
end
|
981
|
+
|
982
|
+
promise.execute
|
983
|
+
end
|
984
|
+
|
985
|
+
end
|
986
|
+
end
|