azure_mgmt_links 0.15.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/2016-09-01/generated/azure_mgmt_links.rb +6 -2
- data/lib/2016-09-01/generated/azure_mgmt_links/management_link_client.rb +14 -6
- data/lib/2016-09-01/generated/azure_mgmt_links/models/operation.rb +58 -0
- data/lib/2016-09-01/generated/azure_mgmt_links/models/operation_display.rb +80 -0
- data/lib/2016-09-01/generated/azure_mgmt_links/models/operation_list_result.rb +100 -0
- data/lib/2016-09-01/generated/azure_mgmt_links/models/resource_link.rb +12 -0
- data/lib/2016-09-01/generated/azure_mgmt_links/models/resource_link_result.rb +1 -1
- data/lib/2016-09-01/generated/azure_mgmt_links/operations.rb +220 -0
- data/lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb +48 -43
- data/lib/azure_mgmt_links.rb +1 -1
- data/lib/profiles/latest/links_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/links_module_definition.rb +0 -1
- data/lib/profiles/latest/modules/links_profile_module.rb +59 -26
- data/lib/profiles/v2017_03_09/links_module_definition.rb +0 -1
- data/lib/profiles/v2017_03_09/links_v2017_03_09_profile_client.rb +28 -9
- data/lib/profiles/v2017_03_09/modules/links_profile_module.rb +59 -26
- data/lib/version.rb +1 -1
- metadata +9 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 78ba2e196d9d2ea460187a91eb27e6d5e0ab706de8055dffa3b419e56ac490ac
|
4
|
+
data.tar.gz: df99428479b55172015418034c054f512d74b756ff52fe955dc26c9845dcd44f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cd600c58dec1591f915f3cf50b1da5546befed3f3a99963662e23799c107f4a28ede51248d7a5215bfc5f80168ff04ebaf8c1b75d317e33082135087d79917b
|
7
|
+
data.tar.gz: a33c39966bfd2ac43b9d553d83bb7143c995845ff535e11179fec9381b885c50d712116a9acae9ecdf6861ca006a44b6ce0adc2d8b112512046dc3f094c7209a
|
@@ -20,14 +20,18 @@ require '2016-09-01/generated/azure_mgmt_links/module_definition'
|
|
20
20
|
require 'ms_rest_azure'
|
21
21
|
|
22
22
|
module Azure::Links::Mgmt::V2016_09_01
|
23
|
+
autoload :Operations, '2016-09-01/generated/azure_mgmt_links/operations.rb'
|
23
24
|
autoload :ResourceLinks, '2016-09-01/generated/azure_mgmt_links/resource_links.rb'
|
24
25
|
autoload :ManagementLinkClient, '2016-09-01/generated/azure_mgmt_links/management_link_client.rb'
|
25
26
|
|
26
27
|
module Models
|
27
|
-
autoload :ResourceLink, '2016-09-01/generated/azure_mgmt_links/models/resource_link.rb'
|
28
|
-
autoload :ResourceLinkFilter, '2016-09-01/generated/azure_mgmt_links/models/resource_link_filter.rb'
|
29
28
|
autoload :ResourceLinkResult, '2016-09-01/generated/azure_mgmt_links/models/resource_link_result.rb'
|
29
|
+
autoload :OperationDisplay, '2016-09-01/generated/azure_mgmt_links/models/operation_display.rb'
|
30
30
|
autoload :ResourceLinkProperties, '2016-09-01/generated/azure_mgmt_links/models/resource_link_properties.rb'
|
31
|
+
autoload :Operation, '2016-09-01/generated/azure_mgmt_links/models/operation.rb'
|
32
|
+
autoload :ResourceLinkFilter, '2016-09-01/generated/azure_mgmt_links/models/resource_link_filter.rb'
|
33
|
+
autoload :OperationListResult, '2016-09-01/generated/azure_mgmt_links/models/operation_list_result.rb'
|
34
|
+
autoload :ResourceLink, '2016-09-01/generated/azure_mgmt_links/models/resource_link.rb'
|
31
35
|
autoload :Filter, '2016-09-01/generated/azure_mgmt_links/models/filter.rb'
|
32
36
|
end
|
33
37
|
end
|
@@ -23,17 +23,21 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
23
23
|
# @return [String] The API version to use for the operation.
|
24
24
|
attr_reader :api_version
|
25
25
|
|
26
|
-
# @return [String]
|
26
|
+
# @return [String] The preferred language for the response.
|
27
27
|
attr_accessor :accept_language
|
28
28
|
|
29
|
-
# @return [Integer]
|
30
|
-
#
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
31
|
attr_accessor :long_running_operation_retry_timeout
|
32
32
|
|
33
|
-
# @return [Boolean]
|
34
|
-
#
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
35
|
+
# generated and included in each request. Default is true.
|
35
36
|
attr_accessor :generate_client_request_id
|
36
37
|
|
38
|
+
# @return [Operations] operations
|
39
|
+
attr_reader :operations
|
40
|
+
|
37
41
|
# @return [ResourceLinks] resource_links
|
38
42
|
attr_reader :resource_links
|
39
43
|
|
@@ -50,6 +54,7 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
50
54
|
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
51
55
|
@credentials = credentials
|
52
56
|
|
57
|
+
@operations = Operations.new(self)
|
53
58
|
@resource_links = ResourceLinks.new(self)
|
54
59
|
@api_version = '2016-09-01'
|
55
60
|
@accept_language = 'en-US'
|
@@ -104,6 +109,9 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
104
109
|
fail ArgumentError, 'path is nil' if path.nil?
|
105
110
|
|
106
111
|
request_url = options[:base_url] || @base_url
|
112
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
113
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
114
|
+
end
|
107
115
|
|
108
116
|
request_headers = @request_headers
|
109
117
|
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
@@ -120,7 +128,7 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
120
128
|
#
|
121
129
|
def add_telemetry
|
122
130
|
sdk_information = 'azure_mgmt_links'
|
123
|
-
sdk_information = "#{sdk_information}/0.
|
131
|
+
sdk_information = "#{sdk_information}/0.17.3"
|
124
132
|
add_user_agent_information(sdk_information)
|
125
133
|
end
|
126
134
|
end
|
@@ -0,0 +1,58 @@
|
|
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::Links::Mgmt::V2016_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Microsoft.Resources operation
|
10
|
+
#
|
11
|
+
class Operation
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Operation name: {provider}/{resource}/{operation}
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [OperationDisplay] The object that represents the operation.
|
19
|
+
attr_accessor :display
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for Operation 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: 'Operation',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'Operation',
|
34
|
+
model_properties: {
|
35
|
+
name: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
serialized_name: 'name',
|
39
|
+
type: {
|
40
|
+
name: 'String'
|
41
|
+
}
|
42
|
+
},
|
43
|
+
display: {
|
44
|
+
client_side_validation: true,
|
45
|
+
required: false,
|
46
|
+
serialized_name: 'display',
|
47
|
+
type: {
|
48
|
+
name: 'Composite',
|
49
|
+
class_name: 'OperationDisplay'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,80 @@
|
|
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::Links::Mgmt::V2016_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The object that represents the operation.
|
10
|
+
#
|
11
|
+
class OperationDisplay
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Service provider: Microsoft.Resources
|
16
|
+
attr_accessor :provider
|
17
|
+
|
18
|
+
# @return [String] Resource on which the operation is performed: Profile,
|
19
|
+
# endpoint, etc.
|
20
|
+
attr_accessor :resource
|
21
|
+
|
22
|
+
# @return [String] Operation type: Read, write, delete, etc.
|
23
|
+
attr_accessor :operation
|
24
|
+
|
25
|
+
# @return [String] Description of the operation.
|
26
|
+
attr_accessor :description
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# Mapper for OperationDisplay class as Ruby Hash.
|
31
|
+
# This will be used for serialization/deserialization.
|
32
|
+
#
|
33
|
+
def self.mapper()
|
34
|
+
{
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'Operation_display',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'OperationDisplay',
|
41
|
+
model_properties: {
|
42
|
+
provider: {
|
43
|
+
client_side_validation: true,
|
44
|
+
required: false,
|
45
|
+
serialized_name: 'provider',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
resource: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
serialized_name: 'resource',
|
54
|
+
type: {
|
55
|
+
name: 'String'
|
56
|
+
}
|
57
|
+
},
|
58
|
+
operation: {
|
59
|
+
client_side_validation: true,
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'operation',
|
62
|
+
type: {
|
63
|
+
name: 'String'
|
64
|
+
}
|
65
|
+
},
|
66
|
+
description: {
|
67
|
+
client_side_validation: true,
|
68
|
+
required: false,
|
69
|
+
serialized_name: 'description',
|
70
|
+
type: {
|
71
|
+
name: 'String'
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,100 @@
|
|
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::Links::Mgmt::V2016_09_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Result of the request to list Microsoft.Resources operations. It contains
|
10
|
+
# a list of operations and a URL link to get the next set of results.
|
11
|
+
#
|
12
|
+
class OperationListResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [Array<Operation>] List of Microsoft.Resources operations.
|
18
|
+
attr_accessor :value
|
19
|
+
|
20
|
+
# @return [String] URL to get the next set of operation list results if
|
21
|
+
# there are any.
|
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<Operation>] operation results.
|
31
|
+
#
|
32
|
+
def get_all_items
|
33
|
+
items = @value
|
34
|
+
page = self
|
35
|
+
while page.next_link != nil && !page.next_link.strip.empty? 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 [OperationListResult] 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 OperationListResult 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: 'OperationListResult',
|
65
|
+
type: {
|
66
|
+
name: 'Composite',
|
67
|
+
class_name: 'OperationListResult',
|
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: 'OperationElementType',
|
79
|
+
type: {
|
80
|
+
name: 'Composite',
|
81
|
+
class_name: 'Operation'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
},
|
86
|
+
next_link: {
|
87
|
+
client_side_validation: true,
|
88
|
+
required: false,
|
89
|
+
serialized_name: 'nextLink',
|
90
|
+
type: {
|
91
|
+
name: 'String'
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -18,6 +18,9 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
18
18
|
# @return [String] The name of the resource link.
|
19
19
|
attr_accessor :name
|
20
20
|
|
21
|
+
# @return The resource link object.
|
22
|
+
attr_accessor :type
|
23
|
+
|
21
24
|
# @return [ResourceLinkProperties] Properties for resource link.
|
22
25
|
attr_accessor :properties
|
23
26
|
|
@@ -53,6 +56,15 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
53
56
|
name: 'String'
|
54
57
|
}
|
55
58
|
},
|
59
|
+
type: {
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
read_only: true,
|
63
|
+
serialized_name: 'type',
|
64
|
+
type: {
|
65
|
+
name: 'Object'
|
66
|
+
}
|
67
|
+
},
|
56
68
|
properties: {
|
57
69
|
client_side_validation: true,
|
58
70
|
required: false,
|
@@ -0,0 +1,220 @@
|
|
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::Links::Mgmt::V2016_09_01
|
7
|
+
#
|
8
|
+
# Azure resources can be linked together to form logical relationships. You
|
9
|
+
# can establish links between resources belonging to different resource
|
10
|
+
# groups. However, all the linked resources must belong to the same
|
11
|
+
# subscription. Each resource can be linked to 50 other resources. If any of
|
12
|
+
# the linked resources are deleted or moved, the link owner must clean up the
|
13
|
+
# remaining link.
|
14
|
+
#
|
15
|
+
class Operations
|
16
|
+
include MsRestAzure
|
17
|
+
|
18
|
+
#
|
19
|
+
# Creates and initializes a new instance of the Operations class.
|
20
|
+
# @param client service class for accessing basic functionality.
|
21
|
+
#
|
22
|
+
def initialize(client)
|
23
|
+
@client = client
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [ManagementLinkClient] reference to the ManagementLinkClient
|
27
|
+
attr_reader :client
|
28
|
+
|
29
|
+
#
|
30
|
+
# Lists all of the available Microsoft.Resources REST API operations.
|
31
|
+
#
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [Array<Operation>] operation results.
|
36
|
+
#
|
37
|
+
def list(custom_headers:nil)
|
38
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
39
|
+
first_page.get_all_items
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Lists all of the available Microsoft.Resources REST API operations.
|
44
|
+
#
|
45
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
46
|
+
# will be added to the HTTP request.
|
47
|
+
#
|
48
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
49
|
+
#
|
50
|
+
def list_with_http_info(custom_headers:nil)
|
51
|
+
list_async(custom_headers:custom_headers).value!
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Lists all of the available Microsoft.Resources REST API operations.
|
56
|
+
#
|
57
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
58
|
+
# to the HTTP request.
|
59
|
+
#
|
60
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
61
|
+
#
|
62
|
+
def list_async(custom_headers:nil)
|
63
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
64
|
+
|
65
|
+
|
66
|
+
request_headers = {}
|
67
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
68
|
+
|
69
|
+
# Set Headers
|
70
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
71
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
72
|
+
path_template = 'providers/Microsoft.Resources/operations'
|
73
|
+
|
74
|
+
request_url = @base_url || @client.base_url
|
75
|
+
|
76
|
+
options = {
|
77
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
78
|
+
query_params: {'api-version' => @client.api_version},
|
79
|
+
headers: request_headers.merge(custom_headers || {}),
|
80
|
+
base_url: request_url
|
81
|
+
}
|
82
|
+
promise = @client.make_request_async(:get, path_template, options)
|
83
|
+
|
84
|
+
promise = promise.then do |result|
|
85
|
+
http_response = result.response
|
86
|
+
status_code = http_response.status
|
87
|
+
response_content = http_response.body
|
88
|
+
unless status_code == 200
|
89
|
+
error_model = JSON.load(response_content)
|
90
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
91
|
+
end
|
92
|
+
|
93
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
94
|
+
# Deserialize Response
|
95
|
+
if status_code == 200
|
96
|
+
begin
|
97
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
98
|
+
result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult.mapper()
|
99
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
100
|
+
rescue Exception => e
|
101
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
result
|
106
|
+
end
|
107
|
+
|
108
|
+
promise.execute
|
109
|
+
end
|
110
|
+
|
111
|
+
#
|
112
|
+
# Lists all of the available Microsoft.Resources REST API operations.
|
113
|
+
#
|
114
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
115
|
+
# to List operation.
|
116
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
117
|
+
# will be added to the HTTP request.
|
118
|
+
#
|
119
|
+
# @return [OperationListResult] operation results.
|
120
|
+
#
|
121
|
+
def list_next(next_page_link, custom_headers:nil)
|
122
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
123
|
+
response.body unless response.nil?
|
124
|
+
end
|
125
|
+
|
126
|
+
#
|
127
|
+
# Lists all of the available Microsoft.Resources REST API operations.
|
128
|
+
#
|
129
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
130
|
+
# to List operation.
|
131
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
132
|
+
# will be added to the HTTP request.
|
133
|
+
#
|
134
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
135
|
+
#
|
136
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
137
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
138
|
+
end
|
139
|
+
|
140
|
+
#
|
141
|
+
# Lists all of the available Microsoft.Resources REST API operations.
|
142
|
+
#
|
143
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
144
|
+
# to List operation.
|
145
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
146
|
+
# to the HTTP request.
|
147
|
+
#
|
148
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
149
|
+
#
|
150
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
151
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
152
|
+
|
153
|
+
|
154
|
+
request_headers = {}
|
155
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
156
|
+
|
157
|
+
# Set Headers
|
158
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
159
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
160
|
+
path_template = '{nextLink}'
|
161
|
+
|
162
|
+
request_url = @base_url || @client.base_url
|
163
|
+
|
164
|
+
options = {
|
165
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
166
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
167
|
+
headers: request_headers.merge(custom_headers || {}),
|
168
|
+
base_url: request_url
|
169
|
+
}
|
170
|
+
promise = @client.make_request_async(:get, path_template, options)
|
171
|
+
|
172
|
+
promise = promise.then do |result|
|
173
|
+
http_response = result.response
|
174
|
+
status_code = http_response.status
|
175
|
+
response_content = http_response.body
|
176
|
+
unless status_code == 200
|
177
|
+
error_model = JSON.load(response_content)
|
178
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
179
|
+
end
|
180
|
+
|
181
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
182
|
+
# Deserialize Response
|
183
|
+
if status_code == 200
|
184
|
+
begin
|
185
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
186
|
+
result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult.mapper()
|
187
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
188
|
+
rescue Exception => e
|
189
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
result
|
194
|
+
end
|
195
|
+
|
196
|
+
promise.execute
|
197
|
+
end
|
198
|
+
|
199
|
+
#
|
200
|
+
# Lists all of the available Microsoft.Resources REST API operations.
|
201
|
+
#
|
202
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
203
|
+
# will be added to the HTTP request.
|
204
|
+
#
|
205
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
206
|
+
# response.
|
207
|
+
#
|
208
|
+
def list_as_lazy(custom_headers:nil)
|
209
|
+
response = list_async(custom_headers:custom_headers).value!
|
210
|
+
unless response.nil?
|
211
|
+
page = response.body
|
212
|
+
page.next_method = Proc.new do |next_page_link|
|
213
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
214
|
+
end
|
215
|
+
page
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
220
|
+
end
|
@@ -38,8 +38,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
38
38
|
# will be added to the HTTP request.
|
39
39
|
#
|
40
40
|
#
|
41
|
-
def delete(link_id, custom_headers
|
42
|
-
response = delete_async(link_id, custom_headers).value!
|
41
|
+
def delete(link_id, custom_headers:nil)
|
42
|
+
response = delete_async(link_id, custom_headers:custom_headers).value!
|
43
43
|
nil
|
44
44
|
end
|
45
45
|
|
@@ -56,8 +56,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
56
56
|
#
|
57
57
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
58
58
|
#
|
59
|
-
def delete_with_http_info(link_id, custom_headers
|
60
|
-
delete_async(link_id, custom_headers).value!
|
59
|
+
def delete_with_http_info(link_id, custom_headers:nil)
|
60
|
+
delete_async(link_id, custom_headers:custom_headers).value!
|
61
61
|
end
|
62
62
|
|
63
63
|
#
|
@@ -73,12 +73,13 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
73
73
|
#
|
74
74
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
75
75
|
#
|
76
|
-
def delete_async(link_id, custom_headers
|
76
|
+
def delete_async(link_id, custom_headers:nil)
|
77
77
|
fail ArgumentError, 'link_id is nil' if link_id.nil?
|
78
78
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
79
79
|
|
80
80
|
|
81
81
|
request_headers = {}
|
82
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
82
83
|
|
83
84
|
# Set Headers
|
84
85
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -128,8 +129,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
128
129
|
#
|
129
130
|
# @return [ResourceLink] operation results.
|
130
131
|
#
|
131
|
-
def create_or_update(link_id, parameters, custom_headers
|
132
|
-
response = create_or_update_async(link_id, parameters, custom_headers).value!
|
132
|
+
def create_or_update(link_id, parameters, custom_headers:nil)
|
133
|
+
response = create_or_update_async(link_id, parameters, custom_headers:custom_headers).value!
|
133
134
|
response.body unless response.nil?
|
134
135
|
end
|
135
136
|
|
@@ -148,8 +149,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
148
149
|
#
|
149
150
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
150
151
|
#
|
151
|
-
def create_or_update_with_http_info(link_id, parameters, custom_headers
|
152
|
-
create_or_update_async(link_id, parameters, custom_headers).value!
|
152
|
+
def create_or_update_with_http_info(link_id, parameters, custom_headers:nil)
|
153
|
+
create_or_update_async(link_id, parameters, custom_headers:custom_headers).value!
|
153
154
|
end
|
154
155
|
|
155
156
|
#
|
@@ -167,20 +168,19 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
167
168
|
#
|
168
169
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
169
170
|
#
|
170
|
-
def create_or_update_async(link_id, parameters, custom_headers
|
171
|
+
def create_or_update_async(link_id, parameters, custom_headers:nil)
|
171
172
|
fail ArgumentError, 'link_id is nil' if link_id.nil?
|
172
173
|
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
173
174
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
174
175
|
|
175
176
|
|
176
177
|
request_headers = {}
|
178
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
177
179
|
|
178
180
|
# Set Headers
|
179
181
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
180
182
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
181
183
|
|
182
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
183
|
-
|
184
184
|
# Serialize Request
|
185
185
|
request_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink.mapper()
|
186
186
|
request_content = @client.serialize(request_mapper, parameters)
|
@@ -248,8 +248,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
248
248
|
#
|
249
249
|
# @return [ResourceLink] operation results.
|
250
250
|
#
|
251
|
-
def get(link_id, custom_headers
|
252
|
-
response = get_async(link_id, custom_headers).value!
|
251
|
+
def get(link_id, custom_headers:nil)
|
252
|
+
response = get_async(link_id, custom_headers:custom_headers).value!
|
253
253
|
response.body unless response.nil?
|
254
254
|
end
|
255
255
|
|
@@ -264,8 +264,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
264
264
|
#
|
265
265
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
266
266
|
#
|
267
|
-
def get_with_http_info(link_id, custom_headers
|
268
|
-
get_async(link_id, custom_headers).value!
|
267
|
+
def get_with_http_info(link_id, custom_headers:nil)
|
268
|
+
get_async(link_id, custom_headers:custom_headers).value!
|
269
269
|
end
|
270
270
|
|
271
271
|
#
|
@@ -279,12 +279,13 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
279
279
|
#
|
280
280
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
281
281
|
#
|
282
|
-
def get_async(link_id, custom_headers
|
282
|
+
def get_async(link_id, custom_headers:nil)
|
283
283
|
fail ArgumentError, 'link_id is nil' if link_id.nil?
|
284
284
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
285
285
|
|
286
286
|
|
287
287
|
request_headers = {}
|
288
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
288
289
|
|
289
290
|
# Set Headers
|
290
291
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -340,8 +341,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
340
341
|
#
|
341
342
|
# @return [Array<ResourceLink>] operation results.
|
342
343
|
#
|
343
|
-
def list_at_subscription(filter
|
344
|
-
first_page = list_at_subscription_as_lazy(filter, custom_headers)
|
344
|
+
def list_at_subscription(filter:nil, custom_headers:nil)
|
345
|
+
first_page = list_at_subscription_as_lazy(filter:filter, custom_headers:custom_headers)
|
345
346
|
first_page.get_all_items
|
346
347
|
end
|
347
348
|
|
@@ -356,8 +357,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
356
357
|
#
|
357
358
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
358
359
|
#
|
359
|
-
def list_at_subscription_with_http_info(filter
|
360
|
-
list_at_subscription_async(filter, custom_headers).value!
|
360
|
+
def list_at_subscription_with_http_info(filter:nil, custom_headers:nil)
|
361
|
+
list_at_subscription_async(filter:filter, custom_headers:custom_headers).value!
|
361
362
|
end
|
362
363
|
|
363
364
|
#
|
@@ -371,12 +372,13 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
371
372
|
#
|
372
373
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
373
374
|
#
|
374
|
-
def list_at_subscription_async(filter
|
375
|
+
def list_at_subscription_async(filter:nil, custom_headers:nil)
|
375
376
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
376
377
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
377
378
|
|
378
379
|
|
379
380
|
request_headers = {}
|
381
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
380
382
|
|
381
383
|
# Set Headers
|
382
384
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -436,8 +438,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
436
438
|
#
|
437
439
|
# @return [Array<ResourceLink>] operation results.
|
438
440
|
#
|
439
|
-
def list_at_source_scope(scope, filter
|
440
|
-
first_page = list_at_source_scope_as_lazy(scope, filter, custom_headers)
|
441
|
+
def list_at_source_scope(scope, filter:nil, custom_headers:nil)
|
442
|
+
first_page = list_at_source_scope_as_lazy(scope, filter:filter, custom_headers:custom_headers)
|
441
443
|
first_page.get_all_items
|
442
444
|
end
|
443
445
|
|
@@ -456,8 +458,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
456
458
|
#
|
457
459
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
458
460
|
#
|
459
|
-
def list_at_source_scope_with_http_info(scope, filter
|
460
|
-
list_at_source_scope_async(scope, filter, custom_headers).value!
|
461
|
+
def list_at_source_scope_with_http_info(scope, filter:nil, custom_headers:nil)
|
462
|
+
list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
|
461
463
|
end
|
462
464
|
|
463
465
|
#
|
@@ -475,12 +477,13 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
475
477
|
#
|
476
478
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
477
479
|
#
|
478
|
-
def list_at_source_scope_async(scope, filter
|
480
|
+
def list_at_source_scope_async(scope, filter:nil, custom_headers:nil)
|
479
481
|
fail ArgumentError, 'scope is nil' if scope.nil?
|
480
482
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
481
483
|
|
482
484
|
|
483
485
|
request_headers = {}
|
486
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
484
487
|
|
485
488
|
# Set Headers
|
486
489
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -535,8 +538,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
535
538
|
#
|
536
539
|
# @return [ResourceLinkResult] operation results.
|
537
540
|
#
|
538
|
-
def list_at_subscription_next(next_page_link, custom_headers
|
539
|
-
response = list_at_subscription_next_async(next_page_link, custom_headers).value!
|
541
|
+
def list_at_subscription_next(next_page_link, custom_headers:nil)
|
542
|
+
response = list_at_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
540
543
|
response.body unless response.nil?
|
541
544
|
end
|
542
545
|
|
@@ -550,8 +553,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
550
553
|
#
|
551
554
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
552
555
|
#
|
553
|
-
def list_at_subscription_next_with_http_info(next_page_link, custom_headers
|
554
|
-
list_at_subscription_next_async(next_page_link, custom_headers).value!
|
556
|
+
def list_at_subscription_next_with_http_info(next_page_link, custom_headers:nil)
|
557
|
+
list_at_subscription_next_async(next_page_link, custom_headers:custom_headers).value!
|
555
558
|
end
|
556
559
|
|
557
560
|
#
|
@@ -564,11 +567,12 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
564
567
|
#
|
565
568
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
566
569
|
#
|
567
|
-
def list_at_subscription_next_async(next_page_link, custom_headers
|
570
|
+
def list_at_subscription_next_async(next_page_link, custom_headers:nil)
|
568
571
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
569
572
|
|
570
573
|
|
571
574
|
request_headers = {}
|
575
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
572
576
|
|
573
577
|
# Set Headers
|
574
578
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -622,8 +626,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
622
626
|
#
|
623
627
|
# @return [ResourceLinkResult] operation results.
|
624
628
|
#
|
625
|
-
def list_at_source_scope_next(next_page_link, custom_headers
|
626
|
-
response = list_at_source_scope_next_async(next_page_link, custom_headers).value!
|
629
|
+
def list_at_source_scope_next(next_page_link, custom_headers:nil)
|
630
|
+
response = list_at_source_scope_next_async(next_page_link, custom_headers:custom_headers).value!
|
627
631
|
response.body unless response.nil?
|
628
632
|
end
|
629
633
|
|
@@ -637,8 +641,8 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
637
641
|
#
|
638
642
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
639
643
|
#
|
640
|
-
def list_at_source_scope_next_with_http_info(next_page_link, custom_headers
|
641
|
-
list_at_source_scope_next_async(next_page_link, custom_headers).value!
|
644
|
+
def list_at_source_scope_next_with_http_info(next_page_link, custom_headers:nil)
|
645
|
+
list_at_source_scope_next_async(next_page_link, custom_headers:custom_headers).value!
|
642
646
|
end
|
643
647
|
|
644
648
|
#
|
@@ -651,11 +655,12 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
651
655
|
#
|
652
656
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
653
657
|
#
|
654
|
-
def list_at_source_scope_next_async(next_page_link, custom_headers
|
658
|
+
def list_at_source_scope_next_async(next_page_link, custom_headers:nil)
|
655
659
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
656
660
|
|
657
661
|
|
658
662
|
request_headers = {}
|
663
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
659
664
|
|
660
665
|
# Set Headers
|
661
666
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -711,12 +716,12 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
711
716
|
# @return [ResourceLinkResult] which provide lazy access to pages of the
|
712
717
|
# response.
|
713
718
|
#
|
714
|
-
def list_at_subscription_as_lazy(filter
|
715
|
-
response = list_at_subscription_async(filter, custom_headers).value!
|
719
|
+
def list_at_subscription_as_lazy(filter:nil, custom_headers:nil)
|
720
|
+
response = list_at_subscription_async(filter:filter, custom_headers:custom_headers).value!
|
716
721
|
unless response.nil?
|
717
722
|
page = response.body
|
718
723
|
page.next_method = Proc.new do |next_page_link|
|
719
|
-
list_at_subscription_next_async(next_page_link, custom_headers)
|
724
|
+
list_at_subscription_next_async(next_page_link, custom_headers:custom_headers)
|
720
725
|
end
|
721
726
|
page
|
722
727
|
end
|
@@ -738,12 +743,12 @@ module Azure::Links::Mgmt::V2016_09_01
|
|
738
743
|
# @return [ResourceLinkResult] which provide lazy access to pages of the
|
739
744
|
# response.
|
740
745
|
#
|
741
|
-
def list_at_source_scope_as_lazy(scope, filter
|
742
|
-
response = list_at_source_scope_async(scope, filter, custom_headers).value!
|
746
|
+
def list_at_source_scope_as_lazy(scope, filter:nil, custom_headers:nil)
|
747
|
+
response = list_at_source_scope_async(scope, filter:filter, custom_headers:custom_headers).value!
|
743
748
|
unless response.nil?
|
744
749
|
page = response.body
|
745
750
|
page.next_method = Proc.new do |next_page_link|
|
746
|
-
list_at_source_scope_next_async(next_page_link, custom_headers)
|
751
|
+
list_at_source_scope_next_async(next_page_link, custom_headers:custom_headers)
|
747
752
|
end
|
748
753
|
page
|
749
754
|
end
|
data/lib/azure_mgmt_links.rb
CHANGED
@@ -3,5 +3,5 @@
|
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
4
|
|
5
5
|
require '2016-09-01/generated/azure_mgmt_links'
|
6
|
-
require 'profiles/latest/links_latest_profile_client'
|
7
6
|
require 'profiles/v2017_03_09/links_v2017_03_09_profile_client'
|
7
|
+
require 'profiles/latest/links_latest_profile_client'
|
@@ -5,17 +5,36 @@
|
|
5
5
|
require 'profiles/latest/links_module_definition'
|
6
6
|
require 'profiles/latest/modules/links_profile_module'
|
7
7
|
|
8
|
-
module Azure::Links::Profiles::Latest
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
module Azure::Links::Profiles::Latest
|
9
|
+
module Mgmt
|
10
|
+
#
|
11
|
+
# Client class for the Latest profile SDK.
|
12
|
+
#
|
13
|
+
class Client < LinksManagementClass
|
14
|
+
include MsRestAzure::Common::Configurable
|
14
15
|
|
16
|
+
#
|
17
|
+
# Initializes a new instance of the Client class.
|
18
|
+
# @param options [Hash] hash of client options.
|
19
|
+
# options = {
|
20
|
+
# tenant_id: 'YOUR TENANT ID',
|
21
|
+
# client_id: 'YOUR CLIENT ID',
|
22
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
23
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
24
|
+
# credentials: credentials,
|
25
|
+
# active_directory_settings: active_directory_settings,
|
26
|
+
# base_url: 'YOUR BASE URL',
|
27
|
+
# options: options
|
28
|
+
# }
|
29
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
30
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
31
|
+
#
|
32
|
+
# Also, base_url, active_directory_settings & options are optional.
|
33
|
+
#
|
34
|
+
def initialize(options = {})
|
35
|
+
super(options)
|
36
|
+
end
|
15
37
|
|
16
|
-
def initialize(options = {})
|
17
|
-
super(options)
|
18
38
|
end
|
19
|
-
|
20
39
|
end
|
21
40
|
end
|
@@ -4,22 +4,27 @@
|
|
4
4
|
|
5
5
|
require 'azure_mgmt_links'
|
6
6
|
|
7
|
-
module Azure::Links::Profiles::Latest
|
7
|
+
module Azure::Links::Profiles::Latest
|
8
|
+
module Mgmt
|
9
|
+
Operations = Azure::Links::Mgmt::V2016_09_01::Operations
|
8
10
|
ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks
|
9
11
|
|
10
12
|
module Models
|
11
|
-
ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
|
12
|
-
ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
|
13
13
|
ResourceLinkResult = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
|
14
|
+
OperationDisplay = Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay
|
14
15
|
ResourceLinkProperties = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
|
16
|
+
Operation = Azure::Links::Mgmt::V2016_09_01::Models::Operation
|
17
|
+
ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
|
18
|
+
OperationListResult = Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult
|
19
|
+
ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
|
15
20
|
Filter = Azure::Links::Mgmt::V2016_09_01::Models::Filter
|
16
21
|
end
|
17
22
|
|
18
23
|
#
|
19
|
-
#
|
24
|
+
# LinksManagementClass
|
20
25
|
#
|
21
|
-
class
|
22
|
-
attr_reader :resource_links, :configurable, :base_url, :options, :model_classes
|
26
|
+
class LinksManagementClass
|
27
|
+
attr_reader :operations, :resource_links, :configurable, :base_url, :options, :model_classes
|
23
28
|
|
24
29
|
def initialize(options = {})
|
25
30
|
if options.is_a?(Hash) && options.length == 0
|
@@ -30,33 +35,61 @@ module Azure::Links::Profiles::Latest::Mgmt
|
|
30
35
|
|
31
36
|
reset!(options)
|
32
37
|
|
33
|
-
@configurable
|
38
|
+
@configurable = self
|
39
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
40
|
+
@options = options[:options].nil? ? nil:options[:options]
|
34
41
|
|
35
|
-
client_0 = Azure::Links::Mgmt::V2016_09_01::ManagementLinkClient.new(configurable.credentials, base_url, options)
|
36
|
-
if(client_0.respond_to?(:subscription_id))
|
37
|
-
client_0.subscription_id = configurable.subscription_id
|
42
|
+
@client_0 = Azure::Links::Mgmt::V2016_09_01::ManagementLinkClient.new(configurable.credentials, base_url, options)
|
43
|
+
if(@client_0.respond_to?(:subscription_id))
|
44
|
+
@client_0.subscription_id = configurable.subscription_id
|
38
45
|
end
|
39
|
-
@
|
46
|
+
add_telemetry(@client_0)
|
47
|
+
@operations = @client_0.operations
|
48
|
+
@resource_links = @client_0.resource_links
|
40
49
|
|
41
50
|
@model_classes = ModelClasses.new
|
42
51
|
end
|
43
52
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
def resource_link_properties
|
55
|
-
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
|
56
|
-
end
|
57
|
-
def filter
|
58
|
-
Azure::Links::Mgmt::V2016_09_01::Models::Filter
|
53
|
+
def add_telemetry(client)
|
54
|
+
profile_information = 'Profiles/Latest/Links/Mgmt'
|
55
|
+
client.add_user_agent_information(profile_information)
|
56
|
+
end
|
57
|
+
|
58
|
+
def method_missing(method, *args)
|
59
|
+
if @client_0.respond_to?method
|
60
|
+
@client_0.send(method, *args)
|
61
|
+
else
|
62
|
+
super
|
59
63
|
end
|
60
64
|
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
class ModelClasses
|
69
|
+
def resource_link_result
|
70
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
|
71
|
+
end
|
72
|
+
def operation_display
|
73
|
+
Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay
|
74
|
+
end
|
75
|
+
def resource_link_properties
|
76
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
|
77
|
+
end
|
78
|
+
def operation
|
79
|
+
Azure::Links::Mgmt::V2016_09_01::Models::Operation
|
80
|
+
end
|
81
|
+
def resource_link_filter
|
82
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
|
83
|
+
end
|
84
|
+
def operation_list_result
|
85
|
+
Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult
|
86
|
+
end
|
87
|
+
def resource_link
|
88
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
|
89
|
+
end
|
90
|
+
def filter
|
91
|
+
Azure::Links::Mgmt::V2016_09_01::Models::Filter
|
92
|
+
end
|
61
93
|
end
|
94
|
+
end
|
62
95
|
end
|
@@ -5,17 +5,36 @@
|
|
5
5
|
require 'profiles/v2017_03_09/links_module_definition'
|
6
6
|
require 'profiles/v2017_03_09/modules/links_profile_module'
|
7
7
|
|
8
|
-
module Azure::Links::Profiles::V2017_03_09
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
module Azure::Links::Profiles::V2017_03_09
|
9
|
+
module Mgmt
|
10
|
+
#
|
11
|
+
# Client class for the V2017_03_09 profile SDK.
|
12
|
+
#
|
13
|
+
class Client < LinksManagementClass
|
14
|
+
include MsRestAzure::Common::Configurable
|
14
15
|
|
16
|
+
#
|
17
|
+
# Initializes a new instance of the Client class.
|
18
|
+
# @param options [Hash] hash of client options.
|
19
|
+
# options = {
|
20
|
+
# tenant_id: 'YOUR TENANT ID',
|
21
|
+
# client_id: 'YOUR CLIENT ID',
|
22
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
23
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
24
|
+
# credentials: credentials,
|
25
|
+
# active_directory_settings: active_directory_settings,
|
26
|
+
# base_url: 'YOUR BASE URL',
|
27
|
+
# options: options
|
28
|
+
# }
|
29
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
30
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
31
|
+
#
|
32
|
+
# Also, base_url, active_directory_settings & options are optional.
|
33
|
+
#
|
34
|
+
def initialize(options = {})
|
35
|
+
super(options)
|
36
|
+
end
|
15
37
|
|
16
|
-
def initialize(options = {})
|
17
|
-
super(options)
|
18
38
|
end
|
19
|
-
|
20
39
|
end
|
21
40
|
end
|
@@ -4,22 +4,27 @@
|
|
4
4
|
|
5
5
|
require 'azure_mgmt_links'
|
6
6
|
|
7
|
-
module Azure::Links::Profiles::V2017_03_09
|
7
|
+
module Azure::Links::Profiles::V2017_03_09
|
8
|
+
module Mgmt
|
9
|
+
Operations = Azure::Links::Mgmt::V2016_09_01::Operations
|
8
10
|
ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks
|
9
11
|
|
10
12
|
module Models
|
11
|
-
ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
|
12
|
-
ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
|
13
13
|
ResourceLinkResult = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
|
14
|
+
OperationDisplay = Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay
|
14
15
|
ResourceLinkProperties = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
|
16
|
+
Operation = Azure::Links::Mgmt::V2016_09_01::Models::Operation
|
17
|
+
ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
|
18
|
+
OperationListResult = Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult
|
19
|
+
ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
|
15
20
|
Filter = Azure::Links::Mgmt::V2016_09_01::Models::Filter
|
16
21
|
end
|
17
22
|
|
18
23
|
#
|
19
|
-
#
|
24
|
+
# LinksManagementClass
|
20
25
|
#
|
21
|
-
class
|
22
|
-
attr_reader :resource_links, :configurable, :base_url, :options, :model_classes
|
26
|
+
class LinksManagementClass
|
27
|
+
attr_reader :operations, :resource_links, :configurable, :base_url, :options, :model_classes
|
23
28
|
|
24
29
|
def initialize(options = {})
|
25
30
|
if options.is_a?(Hash) && options.length == 0
|
@@ -30,33 +35,61 @@ module Azure::Links::Profiles::V2017_03_09::Mgmt
|
|
30
35
|
|
31
36
|
reset!(options)
|
32
37
|
|
33
|
-
@configurable
|
38
|
+
@configurable = self
|
39
|
+
@base_url = options[:base_url].nil? ? nil:options[:base_url]
|
40
|
+
@options = options[:options].nil? ? nil:options[:options]
|
34
41
|
|
35
|
-
client_0 = Azure::Links::Mgmt::V2016_09_01::ManagementLinkClient.new(configurable.credentials, base_url, options)
|
36
|
-
if(client_0.respond_to?(:subscription_id))
|
37
|
-
client_0.subscription_id = configurable.subscription_id
|
42
|
+
@client_0 = Azure::Links::Mgmt::V2016_09_01::ManagementLinkClient.new(configurable.credentials, base_url, options)
|
43
|
+
if(@client_0.respond_to?(:subscription_id))
|
44
|
+
@client_0.subscription_id = configurable.subscription_id
|
38
45
|
end
|
39
|
-
@
|
46
|
+
add_telemetry(@client_0)
|
47
|
+
@operations = @client_0.operations
|
48
|
+
@resource_links = @client_0.resource_links
|
40
49
|
|
41
50
|
@model_classes = ModelClasses.new
|
42
51
|
end
|
43
52
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
def resource_link_properties
|
55
|
-
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
|
56
|
-
end
|
57
|
-
def filter
|
58
|
-
Azure::Links::Mgmt::V2016_09_01::Models::Filter
|
53
|
+
def add_telemetry(client)
|
54
|
+
profile_information = 'Profiles/V2017_03_09/Links/Mgmt'
|
55
|
+
client.add_user_agent_information(profile_information)
|
56
|
+
end
|
57
|
+
|
58
|
+
def method_missing(method, *args)
|
59
|
+
if @client_0.respond_to?method
|
60
|
+
@client_0.send(method, *args)
|
61
|
+
else
|
62
|
+
super
|
59
63
|
end
|
60
64
|
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
class ModelClasses
|
69
|
+
def resource_link_result
|
70
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
|
71
|
+
end
|
72
|
+
def operation_display
|
73
|
+
Azure::Links::Mgmt::V2016_09_01::Models::OperationDisplay
|
74
|
+
end
|
75
|
+
def resource_link_properties
|
76
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
|
77
|
+
end
|
78
|
+
def operation
|
79
|
+
Azure::Links::Mgmt::V2016_09_01::Models::Operation
|
80
|
+
end
|
81
|
+
def resource_link_filter
|
82
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
|
83
|
+
end
|
84
|
+
def operation_list_result
|
85
|
+
Azure::Links::Mgmt::V2016_09_01::Models::OperationListResult
|
86
|
+
end
|
87
|
+
def resource_link
|
88
|
+
Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
|
89
|
+
end
|
90
|
+
def filter
|
91
|
+
Azure::Links::Mgmt::V2016_09_01::Models::Filter
|
92
|
+
end
|
61
93
|
end
|
94
|
+
end
|
62
95
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure_mgmt_links
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.12.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.12.0
|
83
83
|
description: Microsoft Azure Links Library for Ruby
|
84
84
|
email: azrubyteam@microsoft.com
|
85
85
|
executables: []
|
@@ -90,11 +90,15 @@ files:
|
|
90
90
|
- lib/2016-09-01/generated/azure_mgmt_links.rb
|
91
91
|
- lib/2016-09-01/generated/azure_mgmt_links/management_link_client.rb
|
92
92
|
- lib/2016-09-01/generated/azure_mgmt_links/models/filter.rb
|
93
|
+
- lib/2016-09-01/generated/azure_mgmt_links/models/operation.rb
|
94
|
+
- lib/2016-09-01/generated/azure_mgmt_links/models/operation_display.rb
|
95
|
+
- lib/2016-09-01/generated/azure_mgmt_links/models/operation_list_result.rb
|
93
96
|
- lib/2016-09-01/generated/azure_mgmt_links/models/resource_link.rb
|
94
97
|
- lib/2016-09-01/generated/azure_mgmt_links/models/resource_link_filter.rb
|
95
98
|
- lib/2016-09-01/generated/azure_mgmt_links/models/resource_link_properties.rb
|
96
99
|
- lib/2016-09-01/generated/azure_mgmt_links/models/resource_link_result.rb
|
97
100
|
- lib/2016-09-01/generated/azure_mgmt_links/module_definition.rb
|
101
|
+
- lib/2016-09-01/generated/azure_mgmt_links/operations.rb
|
98
102
|
- lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb
|
99
103
|
- lib/azure_mgmt_links.rb
|
100
104
|
- lib/module_definition.rb
|
@@ -130,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
134
|
version: '0'
|
131
135
|
requirements: []
|
132
136
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.
|
137
|
+
rubygems_version: 2.7.8
|
134
138
|
signing_key:
|
135
139
|
specification_version: 4
|
136
140
|
summary: Official Ruby client library to consume Microsoft Azure Links.
|