azure_mgmt_privatedns 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns.rb +51 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/aaaa_record.rb +46 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/arecord.rb +46 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/cname_record.rb +46 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/mx_record.rb +57 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/private_zone.rb +196 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/private_zone_list_result.rb +99 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/provisioning_state.rb +20 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/proxy_resource.rb +62 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/ptr_record.rb +46 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/record_set.rb +275 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/record_set_list_result.rb +100 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/record_type.rb +22 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/resource.rb +83 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/soa_record.rb +114 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/srv_record.rb +79 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/sub_resource.rb +46 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/tracked_resource.rb +92 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/txt_record.rb +54 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/virtual_network_link.rb +151 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/virtual_network_link_list_result.rb +101 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/virtual_network_link_state.rb +16 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/module_definition.rb +9 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/private_dns_management_client.rb +141 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/private_zones.rb +1051 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/record_sets.rb +1023 -0
- data/lib/2018-09-01/generated/azure_mgmt_privatedns/virtual_network_links.rb +908 -0
- data/lib/azure_mgmt_privatedns.rb +6 -0
- data/lib/module_definition.rb +8 -0
- data/lib/profiles/latest/modules/privatedns_profile_module.rb +149 -0
- data/lib/profiles/latest/privatedns_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/privatedns_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +153 -0
@@ -0,0 +1,92 @@
|
|
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::PrivateDns::Mgmt::V2018_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The resource model definition for a ARM tracked top level resource
|
10
|
+
#
|
11
|
+
class TrackedResource < Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Hash{String => String}] Resource tags.
|
16
|
+
attr_accessor :tags
|
17
|
+
|
18
|
+
# @return [String] The Azure Region where the resource lives
|
19
|
+
attr_accessor :location
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for TrackedResource class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'TrackedResource',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'TrackedResource',
|
34
|
+
model_properties: {
|
35
|
+
id: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
read_only: true,
|
39
|
+
serialized_name: 'id',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
name: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
read_only: true,
|
48
|
+
serialized_name: 'name',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
type: {
|
54
|
+
client_side_validation: true,
|
55
|
+
required: false,
|
56
|
+
read_only: true,
|
57
|
+
serialized_name: 'type',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
tags: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'tags',
|
66
|
+
type: {
|
67
|
+
name: 'Dictionary',
|
68
|
+
value: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'StringElementType',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
78
|
+
location: {
|
79
|
+
client_side_validation: true,
|
80
|
+
required: false,
|
81
|
+
serialized_name: 'location',
|
82
|
+
type: {
|
83
|
+
name: 'String'
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,54 @@
|
|
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::PrivateDns::Mgmt::V2018_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# A TXT record.
|
10
|
+
#
|
11
|
+
class TxtRecord
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<String>] The text value of this TXT record.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for TxtRecord class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
client_side_validation: true,
|
26
|
+
required: false,
|
27
|
+
serialized_name: 'TxtRecord',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'TxtRecord',
|
31
|
+
model_properties: {
|
32
|
+
value: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'value',
|
36
|
+
type: {
|
37
|
+
name: 'Sequence',
|
38
|
+
element: {
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'StringElementType',
|
42
|
+
type: {
|
43
|
+
name: 'String'
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,151 @@
|
|
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::PrivateDns::Mgmt::V2018_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes a link to virtual network for a Private DNS zone.
|
10
|
+
#
|
11
|
+
class VirtualNetworkLink < TrackedResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The ETag of the virtual network link.
|
16
|
+
attr_accessor :etag
|
17
|
+
|
18
|
+
# @return [SubResource] The reference of the virtual network.
|
19
|
+
attr_accessor :virtual_network
|
20
|
+
|
21
|
+
# @return [Boolean] Is auto-registration of virtual machine records in
|
22
|
+
# the virtual network in the Private DNS zone enabled?
|
23
|
+
attr_accessor :registration_enabled
|
24
|
+
|
25
|
+
# @return [VirtualNetworkLinkState] The status of the virtual network
|
26
|
+
# link to the Private DNS zone. Possible values are 'InProgress' and
|
27
|
+
# 'Done'. This is a read-only property and any attempt to set this value
|
28
|
+
# will be ignored. Possible values include: 'InProgress', 'Completed'
|
29
|
+
attr_accessor :virtual_network_link_state
|
30
|
+
|
31
|
+
# @return [ProvisioningState] The provisioning state of the resource.
|
32
|
+
# This is a read-only property and any attempt to set this value will be
|
33
|
+
# ignored. Possible values include: 'Creating', 'Updating', 'Deleting',
|
34
|
+
# 'Succeeded', 'Failed', 'Canceled'
|
35
|
+
attr_accessor :provisioning_state
|
36
|
+
|
37
|
+
|
38
|
+
#
|
39
|
+
# Mapper for VirtualNetworkLink class as Ruby Hash.
|
40
|
+
# This will be used for serialization/deserialization.
|
41
|
+
#
|
42
|
+
def self.mapper()
|
43
|
+
{
|
44
|
+
client_side_validation: true,
|
45
|
+
required: false,
|
46
|
+
serialized_name: 'VirtualNetworkLink',
|
47
|
+
type: {
|
48
|
+
name: 'Composite',
|
49
|
+
class_name: 'VirtualNetworkLink',
|
50
|
+
model_properties: {
|
51
|
+
id: {
|
52
|
+
client_side_validation: true,
|
53
|
+
required: false,
|
54
|
+
read_only: true,
|
55
|
+
serialized_name: 'id',
|
56
|
+
type: {
|
57
|
+
name: 'String'
|
58
|
+
}
|
59
|
+
},
|
60
|
+
name: {
|
61
|
+
client_side_validation: true,
|
62
|
+
required: false,
|
63
|
+
read_only: true,
|
64
|
+
serialized_name: 'name',
|
65
|
+
type: {
|
66
|
+
name: 'String'
|
67
|
+
}
|
68
|
+
},
|
69
|
+
type: {
|
70
|
+
client_side_validation: true,
|
71
|
+
required: false,
|
72
|
+
read_only: true,
|
73
|
+
serialized_name: 'type',
|
74
|
+
type: {
|
75
|
+
name: 'String'
|
76
|
+
}
|
77
|
+
},
|
78
|
+
tags: {
|
79
|
+
client_side_validation: true,
|
80
|
+
required: false,
|
81
|
+
serialized_name: 'tags',
|
82
|
+
type: {
|
83
|
+
name: 'Dictionary',
|
84
|
+
value: {
|
85
|
+
client_side_validation: true,
|
86
|
+
required: false,
|
87
|
+
serialized_name: 'StringElementType',
|
88
|
+
type: {
|
89
|
+
name: 'String'
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
},
|
94
|
+
location: {
|
95
|
+
client_side_validation: true,
|
96
|
+
required: false,
|
97
|
+
serialized_name: 'location',
|
98
|
+
type: {
|
99
|
+
name: 'String'
|
100
|
+
}
|
101
|
+
},
|
102
|
+
etag: {
|
103
|
+
client_side_validation: true,
|
104
|
+
required: false,
|
105
|
+
serialized_name: 'etag',
|
106
|
+
type: {
|
107
|
+
name: 'String'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
virtual_network: {
|
111
|
+
client_side_validation: true,
|
112
|
+
required: false,
|
113
|
+
serialized_name: 'properties.virtualNetwork',
|
114
|
+
type: {
|
115
|
+
name: 'Composite',
|
116
|
+
class_name: 'SubResource'
|
117
|
+
}
|
118
|
+
},
|
119
|
+
registration_enabled: {
|
120
|
+
client_side_validation: true,
|
121
|
+
required: false,
|
122
|
+
serialized_name: 'properties.registrationEnabled',
|
123
|
+
type: {
|
124
|
+
name: 'Boolean'
|
125
|
+
}
|
126
|
+
},
|
127
|
+
virtual_network_link_state: {
|
128
|
+
client_side_validation: true,
|
129
|
+
required: false,
|
130
|
+
read_only: true,
|
131
|
+
serialized_name: 'properties.virtualNetworkLinkState',
|
132
|
+
type: {
|
133
|
+
name: 'String'
|
134
|
+
}
|
135
|
+
},
|
136
|
+
provisioning_state: {
|
137
|
+
client_side_validation: true,
|
138
|
+
required: false,
|
139
|
+
read_only: true,
|
140
|
+
serialized_name: 'properties.provisioningState',
|
141
|
+
type: {
|
142
|
+
name: 'String'
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
data/lib/2018-09-01/generated/azure_mgmt_privatedns/models/virtual_network_link_list_result.rb
ADDED
@@ -0,0 +1,101 @@
|
|
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::PrivateDns::Mgmt::V2018_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The response to a list virtual network link to Private DNS zone
|
10
|
+
# operation.
|
11
|
+
#
|
12
|
+
class VirtualNetworkLinkListResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [Array<VirtualNetworkLink>] Information about the virtual
|
18
|
+
# network links to the Private DNS zones.
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
# @return [String] The continuation token for the next page of results.
|
22
|
+
attr_accessor :next_link
|
23
|
+
|
24
|
+
# return [Proc] with next page method call.
|
25
|
+
attr_accessor :next_method
|
26
|
+
|
27
|
+
#
|
28
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
29
|
+
#
|
30
|
+
# @return [Array<VirtualNetworkLink>] operation results.
|
31
|
+
#
|
32
|
+
def get_all_items
|
33
|
+
items = @value
|
34
|
+
page = self
|
35
|
+
while page.next_link != nil do
|
36
|
+
page = page.get_next_page
|
37
|
+
items.concat(page.value)
|
38
|
+
end
|
39
|
+
items
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Gets the next page of results.
|
44
|
+
#
|
45
|
+
# @return [VirtualNetworkLinkListResult] with next page content.
|
46
|
+
#
|
47
|
+
def get_next_page
|
48
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
49
|
+
unless response.nil?
|
50
|
+
@next_link = response.body.next_link
|
51
|
+
@value = response.body.value
|
52
|
+
self
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# Mapper for VirtualNetworkLinkListResult class as Ruby Hash.
|
58
|
+
# This will be used for serialization/deserialization.
|
59
|
+
#
|
60
|
+
def self.mapper()
|
61
|
+
{
|
62
|
+
client_side_validation: true,
|
63
|
+
required: false,
|
64
|
+
serialized_name: 'VirtualNetworkLinkListResult',
|
65
|
+
type: {
|
66
|
+
name: 'Composite',
|
67
|
+
class_name: 'VirtualNetworkLinkListResult',
|
68
|
+
model_properties: {
|
69
|
+
value: {
|
70
|
+
client_side_validation: true,
|
71
|
+
required: false,
|
72
|
+
serialized_name: 'value',
|
73
|
+
type: {
|
74
|
+
name: 'Sequence',
|
75
|
+
element: {
|
76
|
+
client_side_validation: true,
|
77
|
+
required: false,
|
78
|
+
serialized_name: 'VirtualNetworkLinkElementType',
|
79
|
+
type: {
|
80
|
+
name: 'Composite',
|
81
|
+
class_name: 'VirtualNetworkLink'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
},
|
86
|
+
next_link: {
|
87
|
+
client_side_validation: true,
|
88
|
+
required: false,
|
89
|
+
read_only: true,
|
90
|
+
serialized_name: 'nextLink',
|
91
|
+
type: {
|
92
|
+
name: 'String'
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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::PrivateDns::Mgmt::V2018_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for VirtualNetworkLinkState
|
10
|
+
#
|
11
|
+
module VirtualNetworkLinkState
|
12
|
+
InProgress = "InProgress"
|
13
|
+
Completed = "Completed"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,9 @@
|
|
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 end
|
7
|
+
module Azure::PrivateDns end
|
8
|
+
module Azure::PrivateDns::Mgmt end
|
9
|
+
module Azure::PrivateDns::Mgmt::V2018_09_01 end
|
@@ -0,0 +1,141 @@
|
|
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::PrivateDns::Mgmt::V2018_09_01
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class PrivateDnsManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Gets subscription credentials which uniquely identify
|
21
|
+
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
|
+
# for every service call.
|
23
|
+
attr_accessor :subscription_id
|
24
|
+
|
25
|
+
# @return [String] Client Api Version.
|
26
|
+
attr_reader :api_version
|
27
|
+
|
28
|
+
# @return [String] The preferred language for the response.
|
29
|
+
attr_accessor :accept_language
|
30
|
+
|
31
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
32
|
+
# Operations. Default value is 30.
|
33
|
+
attr_accessor :long_running_operation_retry_timeout
|
34
|
+
|
35
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
36
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
37
|
+
# generated and included in each request. Default is true.
|
38
|
+
attr_accessor :generate_client_request_id
|
39
|
+
|
40
|
+
# @return [PrivateZones] private_zones
|
41
|
+
attr_reader :private_zones
|
42
|
+
|
43
|
+
# @return [VirtualNetworkLinks] virtual_network_links
|
44
|
+
attr_reader :virtual_network_links
|
45
|
+
|
46
|
+
# @return [RecordSets] record_sets
|
47
|
+
attr_reader :record_sets
|
48
|
+
|
49
|
+
#
|
50
|
+
# Creates initializes a new instance of the PrivateDnsManagementClient class.
|
51
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
52
|
+
# @param base_url [String] the base URI of the service.
|
53
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
54
|
+
#
|
55
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
56
|
+
super(credentials, options)
|
57
|
+
@base_url = base_url || 'https://management.azure.com'
|
58
|
+
|
59
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
60
|
+
@credentials = credentials
|
61
|
+
|
62
|
+
@private_zones = PrivateZones.new(self)
|
63
|
+
@virtual_network_links = VirtualNetworkLinks.new(self)
|
64
|
+
@record_sets = RecordSets.new(self)
|
65
|
+
@api_version = '2018-09-01'
|
66
|
+
@accept_language = 'en-US'
|
67
|
+
@long_running_operation_retry_timeout = 30
|
68
|
+
@generate_client_request_id = true
|
69
|
+
add_telemetry
|
70
|
+
end
|
71
|
+
|
72
|
+
#
|
73
|
+
# Makes a request and returns the body of the response.
|
74
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
75
|
+
# @param path [String] the path, relative to {base_url}.
|
76
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
77
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
78
|
+
# Example:
|
79
|
+
#
|
80
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
81
|
+
# path = "/path"
|
82
|
+
# options = {
|
83
|
+
# body: request_content,
|
84
|
+
# query_params: {'api-version' => '2016-02-01'}
|
85
|
+
# }
|
86
|
+
# result = @client.make_request(:put, path, options)
|
87
|
+
#
|
88
|
+
def make_request(method, path, options = {})
|
89
|
+
result = make_request_with_http_info(method, path, options)
|
90
|
+
result.body unless result.nil?
|
91
|
+
end
|
92
|
+
|
93
|
+
#
|
94
|
+
# Makes a request and returns the operation response.
|
95
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
96
|
+
# @param path [String] the path, relative to {base_url}.
|
97
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
98
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
99
|
+
#
|
100
|
+
def make_request_with_http_info(method, path, options = {})
|
101
|
+
result = make_request_async(method, path, options).value!
|
102
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
103
|
+
result
|
104
|
+
end
|
105
|
+
|
106
|
+
#
|
107
|
+
# Makes a request asynchronously.
|
108
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
109
|
+
# @param path [String] the path, relative to {base_url}.
|
110
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
111
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
112
|
+
#
|
113
|
+
def make_request_async(method, path, options = {})
|
114
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
115
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
116
|
+
|
117
|
+
request_url = options[:base_url] || @base_url
|
118
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
119
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
120
|
+
end
|
121
|
+
|
122
|
+
request_headers = @request_headers
|
123
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
124
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
125
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
126
|
+
|
127
|
+
super(request_url, method, path, options)
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
private
|
132
|
+
#
|
133
|
+
# Adds telemetry information.
|
134
|
+
#
|
135
|
+
def add_telemetry
|
136
|
+
sdk_information = 'azure_mgmt_privatedns'
|
137
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
138
|
+
add_user_agent_information(sdk_information)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|