azure_mgmt_links 0.14.0
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 +7 -0
- data/LICENSE.txt +21 -0
- data/lib/azure_mgmt_links.rb +7 -0
- data/lib/generated/azure_mgmt_links.rb +33 -0
- data/lib/generated/azure_mgmt_links/management_link_client.rb +129 -0
- data/lib/generated/azure_mgmt_links/models/filter.rb +15 -0
- data/lib/generated/azure_mgmt_links/models/resource_link.rb +67 -0
- data/lib/generated/azure_mgmt_links/models/resource_link_filter.rb +44 -0
- data/lib/generated/azure_mgmt_links/models/resource_link_properties.rb +67 -0
- data/lib/generated/azure_mgmt_links/models/resource_link_result.rb +95 -0
- data/lib/generated/azure_mgmt_links/module_definition.rb +8 -0
- data/lib/generated/azure_mgmt_links/resource_links.rb +753 -0
- data/lib/generated/azure_mgmt_links/version.rb +8 -0
- metadata +125 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e46489ae9b403f702ebcf97d835be246ce7eee4a
|
4
|
+
data.tar.gz: bade94019ff28a5266da59ee1e0837b8e2b7fe4b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 120a9f6f8226cdfe5b77e86b9b1d35857f06b8131f0794d1b77a29752e4cbf52c5c5ad97d207e0c58c888de68f8a6475052611f085e87f0a9ee0308a0ff1cf63
|
7
|
+
data.tar.gz: 1221400383e0e19be1f5471842fb3f35d4f6fbdc36fadf564b599aa830ecf92c3f3bd0ac9a0e96807909f198d1a89065e7ea3c7af92a2b7ed8de240312b3af9a
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,33 @@
|
|
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 'generated/azure_mgmt_links/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::ARM::Links
|
23
|
+
autoload :ResourceLinks, 'generated/azure_mgmt_links/resource_links.rb'
|
24
|
+
autoload :ManagementLinkClient, 'generated/azure_mgmt_links/management_link_client.rb'
|
25
|
+
|
26
|
+
module Models
|
27
|
+
autoload :ResourceLink, 'generated/azure_mgmt_links/models/resource_link.rb'
|
28
|
+
autoload :ResourceLinkFilter, 'generated/azure_mgmt_links/models/resource_link_filter.rb'
|
29
|
+
autoload :ResourceLinkResult, 'generated/azure_mgmt_links/models/resource_link_result.rb'
|
30
|
+
autoload :ResourceLinkProperties, 'generated/azure_mgmt_links/models/resource_link_properties.rb'
|
31
|
+
autoload :Filter, 'generated/azure_mgmt_links/models/filter.rb'
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,129 @@
|
|
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::ARM::Links
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class ManagementLinkClient < 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] The ID of the target subscription.
|
21
|
+
attr_accessor :subscription_id
|
22
|
+
|
23
|
+
# @return [String] The API version to use for the operation.
|
24
|
+
attr_reader :api_version
|
25
|
+
|
26
|
+
# @return [String] Gets or sets the preferred language for the response.
|
27
|
+
attr_accessor :accept_language
|
28
|
+
|
29
|
+
# @return [Integer] Gets or sets the retry timeout in seconds for Long
|
30
|
+
# Running Operations. Default value is 30.
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
32
|
+
|
33
|
+
# @return [Boolean] When set to true a unique x-ms-client-request-id value
|
34
|
+
# is generated and included in each request. Default is true.
|
35
|
+
attr_accessor :generate_client_request_id
|
36
|
+
|
37
|
+
# @return [ResourceLinks] resource_links
|
38
|
+
attr_reader :resource_links
|
39
|
+
|
40
|
+
#
|
41
|
+
# Creates initializes a new instance of the ManagementLinkClient class.
|
42
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
43
|
+
# @param base_url [String] the base URI of the service.
|
44
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
45
|
+
#
|
46
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
47
|
+
super(credentials, options)
|
48
|
+
@base_url = base_url || 'https://management.azure.com'
|
49
|
+
|
50
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
51
|
+
@credentials = credentials
|
52
|
+
|
53
|
+
@resource_links = ResourceLinks.new(self)
|
54
|
+
@api_version = '2016-09-01'
|
55
|
+
@accept_language = 'en-US'
|
56
|
+
@long_running_operation_retry_timeout = 30
|
57
|
+
@generate_client_request_id = true
|
58
|
+
add_telemetry
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Makes a request and returns the body of the response.
|
63
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
64
|
+
# @param path [String] the path, relative to {base_url}.
|
65
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
66
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
67
|
+
# Example:
|
68
|
+
#
|
69
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
70
|
+
# path = "/path"
|
71
|
+
# options = {
|
72
|
+
# body: request_content,
|
73
|
+
# query_params: {'api-version' => '2016-02-01'}
|
74
|
+
# }
|
75
|
+
# result = @client.make_request(:put, path, options)
|
76
|
+
#
|
77
|
+
def make_request(method, path, options = {})
|
78
|
+
result = make_request_with_http_info(method, path, options)
|
79
|
+
result.body unless result.nil?
|
80
|
+
end
|
81
|
+
|
82
|
+
#
|
83
|
+
# Makes a request and returns the operation response.
|
84
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
85
|
+
# @param path [String] the path, relative to {base_url}.
|
86
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
87
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
88
|
+
#
|
89
|
+
def make_request_with_http_info(method, path, options = {})
|
90
|
+
result = make_request_async(method, path, options).value!
|
91
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
92
|
+
result
|
93
|
+
end
|
94
|
+
|
95
|
+
#
|
96
|
+
# Makes a request asynchronously.
|
97
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
98
|
+
# @param path [String] the path, relative to {base_url}.
|
99
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
100
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
101
|
+
#
|
102
|
+
def make_request_async(method, path, options = {})
|
103
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
104
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
105
|
+
|
106
|
+
request_url = options[:base_url] || @base_url
|
107
|
+
|
108
|
+
request_headers = @request_headers
|
109
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
110
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
111
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
112
|
+
|
113
|
+
super(request_url, method, path, options)
|
114
|
+
end
|
115
|
+
|
116
|
+
|
117
|
+
private
|
118
|
+
#
|
119
|
+
# Adds telemetry information.
|
120
|
+
#
|
121
|
+
def add_telemetry
|
122
|
+
sdk_information = 'azure_mgmt_links'
|
123
|
+
if defined? Azure::ARM::Links::VERSION
|
124
|
+
sdk_information = "#{sdk_information}/#{Azure::ARM::Links::VERSION}"
|
125
|
+
end
|
126
|
+
add_user_agent_information(sdk_information)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,15 @@
|
|
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::ARM::Links
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for Filter
|
10
|
+
#
|
11
|
+
module Filter
|
12
|
+
AtScope = "atScope()"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,67 @@
|
|
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::ARM::Links
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The resource link.
|
10
|
+
#
|
11
|
+
class ResourceLink
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The fully qualified ID of the resource link.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] The name of the resource link.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [ResourceLinkProperties] Properties for resource link.
|
22
|
+
attr_accessor :properties
|
23
|
+
|
24
|
+
|
25
|
+
#
|
26
|
+
# Mapper for ResourceLink class as Ruby Hash.
|
27
|
+
# This will be used for serialization/deserialization.
|
28
|
+
#
|
29
|
+
def self.mapper()
|
30
|
+
{
|
31
|
+
required: false,
|
32
|
+
serialized_name: 'ResourceLink',
|
33
|
+
type: {
|
34
|
+
name: 'Composite',
|
35
|
+
class_name: 'ResourceLink',
|
36
|
+
model_properties: {
|
37
|
+
id: {
|
38
|
+
required: false,
|
39
|
+
read_only: true,
|
40
|
+
serialized_name: 'id',
|
41
|
+
type: {
|
42
|
+
name: 'String'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
name: {
|
46
|
+
required: false,
|
47
|
+
read_only: true,
|
48
|
+
serialized_name: 'name',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
properties: {
|
54
|
+
required: false,
|
55
|
+
serialized_name: 'properties',
|
56
|
+
type: {
|
57
|
+
name: 'Composite',
|
58
|
+
class_name: 'ResourceLinkProperties'
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,44 @@
|
|
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::ARM::Links
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Resource link filter.
|
10
|
+
#
|
11
|
+
class ResourceLinkFilter
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The ID of the target resource.
|
16
|
+
attr_accessor :target_id
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for ResourceLinkFilter class as Ruby Hash.
|
21
|
+
# This will be used for serialization/deserialization.
|
22
|
+
#
|
23
|
+
def self.mapper()
|
24
|
+
{
|
25
|
+
required: false,
|
26
|
+
serialized_name: 'ResourceLinkFilter',
|
27
|
+
type: {
|
28
|
+
name: 'Composite',
|
29
|
+
class_name: 'ResourceLinkFilter',
|
30
|
+
model_properties: {
|
31
|
+
target_id: {
|
32
|
+
required: true,
|
33
|
+
serialized_name: 'targetId',
|
34
|
+
type: {
|
35
|
+
name: 'String'
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,67 @@
|
|
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::ARM::Links
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The resource link properties.
|
10
|
+
#
|
11
|
+
class ResourceLinkProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The fully qualified ID of the source resource in the
|
16
|
+
# link.
|
17
|
+
attr_accessor :source_id
|
18
|
+
|
19
|
+
# @return [String] The fully qualified ID of the target resource in the
|
20
|
+
# link.
|
21
|
+
attr_accessor :target_id
|
22
|
+
|
23
|
+
# @return [String] Notes about the resource link.
|
24
|
+
attr_accessor :notes
|
25
|
+
|
26
|
+
|
27
|
+
#
|
28
|
+
# Mapper for ResourceLinkProperties class as Ruby Hash.
|
29
|
+
# This will be used for serialization/deserialization.
|
30
|
+
#
|
31
|
+
def self.mapper()
|
32
|
+
{
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'ResourceLinkProperties',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'ResourceLinkProperties',
|
38
|
+
model_properties: {
|
39
|
+
source_id: {
|
40
|
+
required: false,
|
41
|
+
read_only: true,
|
42
|
+
serialized_name: 'sourceId',
|
43
|
+
type: {
|
44
|
+
name: 'String'
|
45
|
+
}
|
46
|
+
},
|
47
|
+
target_id: {
|
48
|
+
required: true,
|
49
|
+
serialized_name: 'targetId',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
notes: {
|
55
|
+
required: false,
|
56
|
+
serialized_name: 'notes',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,95 @@
|
|
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::ARM::Links
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of resource links.
|
10
|
+
#
|
11
|
+
class ResourceLinkResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<ResourceLink>] An array of resource links.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] The URL to use for getting the next set of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
# return [Proc] with next page method call.
|
23
|
+
attr_accessor :next_method
|
24
|
+
|
25
|
+
#
|
26
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
27
|
+
#
|
28
|
+
# @return [Array<ResourceLink>] operation results.
|
29
|
+
#
|
30
|
+
def get_all_items
|
31
|
+
items = @value
|
32
|
+
page = self
|
33
|
+
while page.next_link != nil do
|
34
|
+
page = page.get_next_page
|
35
|
+
items.concat(page.value)
|
36
|
+
end
|
37
|
+
items
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Gets the next page of results.
|
42
|
+
#
|
43
|
+
# @return [ResourceLinkResult] with next page content.
|
44
|
+
#
|
45
|
+
def get_next_page
|
46
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
47
|
+
unless response.nil?
|
48
|
+
@next_link = response.body.next_link
|
49
|
+
@value = response.body.value
|
50
|
+
self
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Mapper for ResourceLinkResult class as Ruby Hash.
|
56
|
+
# This will be used for serialization/deserialization.
|
57
|
+
#
|
58
|
+
def self.mapper()
|
59
|
+
{
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'ResourceLinkResult',
|
62
|
+
type: {
|
63
|
+
name: 'Composite',
|
64
|
+
class_name: 'ResourceLinkResult',
|
65
|
+
model_properties: {
|
66
|
+
value: {
|
67
|
+
required: true,
|
68
|
+
serialized_name: 'value',
|
69
|
+
type: {
|
70
|
+
name: 'Sequence',
|
71
|
+
element: {
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'ResourceLinkElementType',
|
74
|
+
type: {
|
75
|
+
name: 'Composite',
|
76
|
+
class_name: 'ResourceLink'
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
},
|
81
|
+
next_link: {
|
82
|
+
required: false,
|
83
|
+
read_only: true,
|
84
|
+
serialized_name: 'nextLink',
|
85
|
+
type: {
|
86
|
+
name: 'String'
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|