azure_mgmt_msi 0.15.2

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 996516f838c1ea81d04d8346fcd4fe9978b6ceec
4
+ data.tar.gz: 5fb820ec8898844f1ce6488241ee7ae82c817e4a
5
+ SHA512:
6
+ metadata.gz: 23a87d563707a92e8450241f197407c5fbcbecb4d1b2671173cbc7ca135290f4dd78cd43c77b482171faa286c51799541b85467e1a8ec4b9367c8d36a0fcc7a8
7
+ data.tar.gz: 72316444d8dd756da983185f7b950cd069f5f1a3ebf2ddec45fdb9f6bc8c8152eea1f1e12ba3e64a840146e9e9f3b656d15e25fde80026188ed69245f42251ee
@@ -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,35 @@
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 '2015-08-31-preview/generated/azure_mgmt_msi/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ManagedServiceIdentity::Mgmt::V2015_08_31_preview
23
+ autoload :Operations, '2015-08-31-preview/generated/azure_mgmt_msi/operations.rb'
24
+ autoload :UserAssignedIdentities, '2015-08-31-preview/generated/azure_mgmt_msi/user_assigned_identities.rb'
25
+ autoload :ManagedServiceIdentityClient, '2015-08-31-preview/generated/azure_mgmt_msi/managed_service_identity_client.rb'
26
+
27
+ module Models
28
+ autoload :Identity, '2015-08-31-preview/generated/azure_mgmt_msi/models/identity.rb'
29
+ autoload :OperationDisplay, '2015-08-31-preview/generated/azure_mgmt_msi/models/operation_display.rb'
30
+ autoload :Operation, '2015-08-31-preview/generated/azure_mgmt_msi/models/operation.rb'
31
+ autoload :UserAssignedIdentitiesListResult, '2015-08-31-preview/generated/azure_mgmt_msi/models/user_assigned_identities_list_result.rb'
32
+ autoload :OperationListResult, '2015-08-31-preview/generated/azure_mgmt_msi/models/operation_list_result.rb'
33
+ autoload :UserAssignedIdentities, '2015-08-31-preview/generated/azure_mgmt_msi/models/user_assigned_identities.rb'
34
+ end
35
+ end
@@ -0,0 +1,132 @@
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::ManagedServiceIdentity::Mgmt::V2015_08_31_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class ManagedServiceIdentityClient < 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 Subscription to which the identity
21
+ # belongs.
22
+ attr_accessor :subscription_id
23
+
24
+ # @return [String] Version of API to invoke.
25
+ attr_reader :api_version
26
+
27
+ # @return [String] Gets or sets the preferred language for the response.
28
+ attr_accessor :accept_language
29
+
30
+ # @return [Integer] Gets or sets the retry timeout in seconds for Long
31
+ # Running Operations. Default value is 30.
32
+ attr_accessor :long_running_operation_retry_timeout
33
+
34
+ # @return [Boolean] When set to true a unique x-ms-client-request-id value
35
+ # is generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [Operations] operations
39
+ attr_reader :operations
40
+
41
+ # @return [UserAssignedIdentities] user_assigned_identities
42
+ attr_reader :user_assigned_identities
43
+
44
+ #
45
+ # Creates initializes a new instance of the ManagedServiceIdentityClient class.
46
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
47
+ # @param base_url [String] the base URI of the service.
48
+ # @param options [Array] filters to be applied to the HTTP requests.
49
+ #
50
+ def initialize(credentials = nil, base_url = nil, options = nil)
51
+ super(credentials, options)
52
+ @base_url = base_url || 'https://management.azure.com'
53
+
54
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
55
+ @credentials = credentials
56
+
57
+ @operations = Operations.new(self)
58
+ @user_assigned_identities = UserAssignedIdentities.new(self)
59
+ @api_version = '2015-08-31-preview'
60
+ @accept_language = 'en-US'
61
+ @long_running_operation_retry_timeout = 30
62
+ @generate_client_request_id = true
63
+ add_telemetry
64
+ end
65
+
66
+ #
67
+ # Makes a request and returns the body of the response.
68
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
69
+ # @param path [String] the path, relative to {base_url}.
70
+ # @param options [Hash{String=>String}] specifying any request options like :body.
71
+ # @return [Hash{String=>String}] containing the body of the response.
72
+ # Example:
73
+ #
74
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
75
+ # path = "/path"
76
+ # options = {
77
+ # body: request_content,
78
+ # query_params: {'api-version' => '2016-02-01'}
79
+ # }
80
+ # result = @client.make_request(:put, path, options)
81
+ #
82
+ def make_request(method, path, options = {})
83
+ result = make_request_with_http_info(method, path, options)
84
+ result.body unless result.nil?
85
+ end
86
+
87
+ #
88
+ # Makes a request and returns the operation response.
89
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
90
+ # @param path [String] the path, relative to {base_url}.
91
+ # @param options [Hash{String=>String}] specifying any request options like :body.
92
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
93
+ #
94
+ def make_request_with_http_info(method, path, options = {})
95
+ result = make_request_async(method, path, options).value!
96
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
97
+ result
98
+ end
99
+
100
+ #
101
+ # Makes a request asynchronously.
102
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
103
+ # @param path [String] the path, relative to {base_url}.
104
+ # @param options [Hash{String=>String}] specifying any request options like :body.
105
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
106
+ #
107
+ def make_request_async(method, path, options = {})
108
+ fail ArgumentError, 'method is nil' if method.nil?
109
+ fail ArgumentError, 'path is nil' if path.nil?
110
+
111
+ request_url = options[:base_url] || @base_url
112
+
113
+ request_headers = @request_headers
114
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
115
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
116
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
117
+
118
+ super(request_url, method, path, options)
119
+ end
120
+
121
+
122
+ private
123
+ #
124
+ # Adds telemetry information.
125
+ #
126
+ def add_telemetry
127
+ sdk_information = 'azure_mgmt_msi'
128
+ sdk_information = "#{sdk_information}/0.15.2"
129
+ add_user_agent_information(sdk_information)
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,154 @@
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::ManagedServiceIdentity::Mgmt::V2015_08_31_preview
7
+ module Models
8
+ #
9
+ # Describes an identity resource.
10
+ #
11
+ class Identity
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The id of the created identity.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The name of the created identity.
19
+ attr_accessor :name
20
+
21
+ # @return [String] The Azure region where the identity lives.
22
+ attr_accessor :location
23
+
24
+ # @return [Hash{String => String}] Resource tags
25
+ attr_accessor :tags
26
+
27
+ # @return The id of the tenant which the identity belongs to.
28
+ attr_accessor :tenant_id
29
+
30
+ # @return The id of the service principal object associated with the
31
+ # created identity.
32
+ attr_accessor :principal_id
33
+
34
+ # @return The id of the app associated with the identity. This is a
35
+ # random generated UUID by MSI.
36
+ attr_accessor :client_id
37
+
38
+ # @return [String] The ManagedServiceIdentity DataPlane URL that can be
39
+ # queried to obtain the identity credentials.
40
+ attr_accessor :client_secret_url
41
+
42
+ # @return [UserAssignedIdentities] The type of resource i.e.
43
+ # Microsoft.ManagedIdentity/userAssignedIdentities. Possible values
44
+ # include: 'Microsoft.ManagedIdentity/userAssignedIdentities'
45
+ attr_accessor :type
46
+
47
+
48
+ #
49
+ # Mapper for Identity class as Ruby Hash.
50
+ # This will be used for serialization/deserialization.
51
+ #
52
+ def self.mapper()
53
+ {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'Identity',
57
+ type: {
58
+ name: 'Composite',
59
+ class_name: 'Identity',
60
+ model_properties: {
61
+ id: {
62
+ client_side_validation: true,
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'id',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ name: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ read_only: true,
74
+ serialized_name: 'name',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ },
79
+ location: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ serialized_name: 'location',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ },
87
+ tags: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ serialized_name: 'tags',
91
+ type: {
92
+ name: 'Dictionary',
93
+ value: {
94
+ client_side_validation: true,
95
+ required: false,
96
+ serialized_name: 'StringElementType',
97
+ type: {
98
+ name: 'String'
99
+ }
100
+ }
101
+ }
102
+ },
103
+ tenant_id: {
104
+ client_side_validation: true,
105
+ required: false,
106
+ read_only: true,
107
+ serialized_name: 'properties.tenantId',
108
+ type: {
109
+ name: 'String'
110
+ }
111
+ },
112
+ principal_id: {
113
+ client_side_validation: true,
114
+ required: false,
115
+ read_only: true,
116
+ serialized_name: 'properties.principalId',
117
+ type: {
118
+ name: 'String'
119
+ }
120
+ },
121
+ client_id: {
122
+ client_side_validation: true,
123
+ required: false,
124
+ read_only: true,
125
+ serialized_name: 'properties.clientId',
126
+ type: {
127
+ name: 'String'
128
+ }
129
+ },
130
+ client_secret_url: {
131
+ client_side_validation: true,
132
+ required: false,
133
+ read_only: true,
134
+ serialized_name: 'properties.clientSecretUrl',
135
+ type: {
136
+ name: 'String'
137
+ }
138
+ },
139
+ type: {
140
+ client_side_validation: true,
141
+ required: false,
142
+ read_only: true,
143
+ serialized_name: 'type',
144
+ type: {
145
+ name: 'String'
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ end
152
+ end
153
+ end
154
+ end
@@ -0,0 +1,62 @@
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::ManagedServiceIdentity::Mgmt::V2015_08_31_preview
7
+ module Models
8
+ #
9
+ # Microsoft.ManagedIdentity Operation.
10
+
11
+ # Operation supported by the Microsoft.ManagedIdentity REST API.
12
+ #
13
+ class Operation
14
+
15
+ include MsRestAzure
16
+
17
+ # @return [String] Operation Name. The name of the REST Operation. This
18
+ # is of the format {provider}/{resource}/{operation}.
19
+ attr_accessor :name
20
+
21
+ # @return [OperationDisplay] Operation Display. The object that describes
22
+ # the operation.
23
+ attr_accessor :display
24
+
25
+
26
+ #
27
+ # Mapper for Operation class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'Operation',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'Operation',
38
+ model_properties: {
39
+ name: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'name',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ display: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'display',
51
+ type: {
52
+ name: 'Composite',
53
+ class_name: 'OperationDisplay'
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,84 @@
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::ManagedServiceIdentity::Mgmt::V2015_08_31_preview
7
+ module Models
8
+ #
9
+ # Operation Display.
10
+
11
+ # The object that describes the operation.
12
+ #
13
+ class OperationDisplay
14
+
15
+ include MsRestAzure
16
+
17
+ # @return [String] Resource Provider Name. Friendly name of the resource
18
+ # provider.
19
+ attr_accessor :provider
20
+
21
+ # @return [String] Operation Type. The type of operation. For example:
22
+ # read, write, delete.
23
+ attr_accessor :operation
24
+
25
+ # @return [String] Resource Type. The resource type on which the
26
+ # operation is performed.
27
+ attr_accessor :resource
28
+
29
+ # @return [String] Operation description. A description of the operation.
30
+ attr_accessor :description
31
+
32
+
33
+ #
34
+ # Mapper for OperationDisplay class as Ruby Hash.
35
+ # This will be used for serialization/deserialization.
36
+ #
37
+ def self.mapper()
38
+ {
39
+ client_side_validation: true,
40
+ required: false,
41
+ serialized_name: 'OperationDisplay',
42
+ type: {
43
+ name: 'Composite',
44
+ class_name: 'OperationDisplay',
45
+ model_properties: {
46
+ provider: {
47
+ client_side_validation: true,
48
+ required: false,
49
+ serialized_name: 'provider',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ operation: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ serialized_name: 'operation',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ resource: {
63
+ client_side_validation: true,
64
+ required: false,
65
+ serialized_name: 'resource',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ description: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ serialized_name: 'description',
74
+ type: {
75
+ name: 'String'
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ end
82
+ end
83
+ end
84
+ end