azure_mgmt_resources_management 0.15.2 → 0.16.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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups.rb +21 -18
  3. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +4 -1
  4. data/lib/2017-08-31-preview/generated/azure_mgmt_resources_management/operations.rb +15 -13
  5. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management.rb +42 -0
  6. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_group_subscriptions.rb +209 -0
  7. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups.rb +698 -0
  8. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/management_groups_api.rb +136 -0
  9. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/create_group_request.rb +59 -0
  10. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_details.rb +57 -0
  11. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/error_response.rb +47 -0
  12. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group.rb +130 -0
  13. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_child_info.rb +91 -0
  14. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_details.rb +81 -0
  15. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_info.rb +98 -0
  16. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/management_group_list_result.rb +99 -0
  17. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation.rb +59 -0
  18. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_display.rb +83 -0
  19. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/operation_list_result.rb +103 -0
  20. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/models/parent_group_info.rb +59 -0
  21. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/module_definition.rb +9 -0
  22. data/lib/2017-11-01-preview/generated/azure_mgmt_resources_management/operations.rb +219 -0
  23. data/lib/azure_mgmt_resources_management.rb +1 -0
  24. data/lib/profiles/latest/modules/resourcesmanagement_profile_module.rb +82 -69
  25. data/lib/profiles/latest/resourcesmanagement_latest_profile_client.rb +28 -9
  26. data/lib/profiles/latest/resourcesmanagement_module_definition.rb +0 -1
  27. data/lib/version.rb +1 -1
  28. metadata +21 -3
@@ -0,0 +1,136 @@
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::ResourcesManagement::Mgmt::V2017_11_01_preview
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class ManagementGroupsAPI < 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] Version of the API to be used with the client request.
21
+ # The current version is 2017-11-01-preview.
22
+ attr_reader :api_version
23
+
24
+ # @return [String] Gets or sets the preferred language for the response.
25
+ attr_accessor :accept_language
26
+
27
+ # @return [Integer] Gets or sets the retry timeout in seconds for Long
28
+ # Running Operations. Default value is 30.
29
+ attr_accessor :long_running_operation_retry_timeout
30
+
31
+ # @return [Boolean] When set to true a unique x-ms-client-request-id value
32
+ # is generated and included in each request. Default is true.
33
+ attr_accessor :generate_client_request_id
34
+
35
+ # @return [ManagementGroups] management_groups
36
+ attr_reader :management_groups
37
+
38
+ # @return [ManagementGroupSubscriptions] management_group_subscriptions
39
+ attr_reader :management_group_subscriptions
40
+
41
+ # @return [Operations] operations
42
+ attr_reader :operations
43
+
44
+ #
45
+ # Creates initializes a new instance of the ManagementGroupsAPI 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
+ @management_groups = ManagementGroups.new(self)
58
+ @management_group_subscriptions = ManagementGroupSubscriptions.new(self)
59
+ @operations = Operations.new(self)
60
+ @api_version = '2017-11-01-preview'
61
+ @accept_language = 'en-US'
62
+ @long_running_operation_retry_timeout = 30
63
+ @generate_client_request_id = true
64
+ add_telemetry
65
+ end
66
+
67
+ #
68
+ # Makes a request and returns the body of the response.
69
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
70
+ # @param path [String] the path, relative to {base_url}.
71
+ # @param options [Hash{String=>String}] specifying any request options like :body.
72
+ # @return [Hash{String=>String}] containing the body of the response.
73
+ # Example:
74
+ #
75
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
76
+ # path = "/path"
77
+ # options = {
78
+ # body: request_content,
79
+ # query_params: {'api-version' => '2016-02-01'}
80
+ # }
81
+ # result = @client.make_request(:put, path, options)
82
+ #
83
+ def make_request(method, path, options = {})
84
+ result = make_request_with_http_info(method, path, options)
85
+ result.body unless result.nil?
86
+ end
87
+
88
+ #
89
+ # Makes a request and returns the operation response.
90
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
91
+ # @param path [String] the path, relative to {base_url}.
92
+ # @param options [Hash{String=>String}] specifying any request options like :body.
93
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
94
+ #
95
+ def make_request_with_http_info(method, path, options = {})
96
+ result = make_request_async(method, path, options).value!
97
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
98
+ result
99
+ end
100
+
101
+ #
102
+ # Makes a request asynchronously.
103
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
104
+ # @param path [String] the path, relative to {base_url}.
105
+ # @param options [Hash{String=>String}] specifying any request options like :body.
106
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
107
+ #
108
+ def make_request_async(method, path, options = {})
109
+ fail ArgumentError, 'method is nil' if method.nil?
110
+ fail ArgumentError, 'path is nil' if path.nil?
111
+
112
+ request_url = options[:base_url] || @base_url
113
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
114
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
115
+ end
116
+
117
+ request_headers = @request_headers
118
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
119
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
120
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
121
+
122
+ super(request_url, method, path, options)
123
+ end
124
+
125
+
126
+ private
127
+ #
128
+ # Adds telemetry information.
129
+ #
130
+ def add_telemetry
131
+ sdk_information = 'azure_mgmt_resources_management'
132
+ sdk_information = "#{sdk_information}/0.16.0"
133
+ add_user_agent_information(sdk_information)
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,59 @@
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::ResourcesManagement::Mgmt::V2017_11_01_preview
7
+ module Models
8
+ #
9
+ # Management group creation parameters.
10
+ #
11
+ class CreateGroupRequest
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The friendly name of the management group.
16
+ attr_accessor :display_name
17
+
18
+ # @return [String] (Optional) The fully qualified ID for the parent
19
+ # management group. For example,
20
+ # /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
21
+ attr_accessor :parent_id
22
+
23
+
24
+ #
25
+ # Mapper for CreateGroupRequest class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ client_side_validation: true,
31
+ required: false,
32
+ serialized_name: 'CreateGroupRequest',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'CreateGroupRequest',
36
+ model_properties: {
37
+ display_name: {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'displayName',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ parent_id: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'parentId',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,57 @@
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::ResourcesManagement::Mgmt::V2017_11_01_preview
7
+ module Models
8
+ #
9
+ # The details of the error.
10
+ #
11
+ class ErrorDetails
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] One of a server-defined set of error codes.
16
+ attr_accessor :code
17
+
18
+ # @return [String] A human-readable representation of the error.
19
+ attr_accessor :message
20
+
21
+
22
+ #
23
+ # Mapper for ErrorDetails 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: 'ErrorDetails',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'ErrorDetails',
34
+ model_properties: {
35
+ code: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'code',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ message: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'message',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,47 @@
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::ResourcesManagement::Mgmt::V2017_11_01_preview
7
+ module Models
8
+ #
9
+ # The error object.
10
+ #
11
+ class ErrorResponse
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [ErrorDetails] Error.
16
+ attr_accessor :error
17
+
18
+
19
+ #
20
+ # Mapper for ErrorResponse 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: 'ErrorResponse',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'ErrorResponse',
31
+ model_properties: {
32
+ error: {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'error',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'ErrorDetails'
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,130 @@
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::ResourcesManagement::Mgmt::V2017_11_01_preview
7
+ module Models
8
+ #
9
+ # The management group details.
10
+ #
11
+ class ManagementGroup
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The fully qualified ID for the management group. For
16
+ # example,
17
+ # /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
18
+ attr_accessor :id
19
+
20
+ # @return [String] The type of the resource. For example,
21
+ # /providers/Microsoft.Management/managementGroups
22
+ attr_accessor :type
23
+
24
+ # @return [String] The name of the management group. For example,
25
+ # 00000000-0000-0000-0000-000000000000
26
+ attr_accessor :name
27
+
28
+ # @return [String] The AAD Tenant ID associated with the management
29
+ # group. For example, 00000000-0000-0000-0000-000000000000
30
+ attr_accessor :tenant_id
31
+
32
+ # @return [String] The friendly name of the management group.
33
+ attr_accessor :display_name
34
+
35
+ # @return [ManagementGroupDetails] Details.
36
+ attr_accessor :details
37
+
38
+ # @return [Array<ManagementGroupChildInfo>] The list of children.
39
+ attr_accessor :children
40
+
41
+
42
+ #
43
+ # Mapper for ManagementGroup class as Ruby Hash.
44
+ # This will be used for serialization/deserialization.
45
+ #
46
+ def self.mapper()
47
+ {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'ManagementGroup',
51
+ type: {
52
+ name: 'Composite',
53
+ class_name: 'ManagementGroup',
54
+ model_properties: {
55
+ id: {
56
+ client_side_validation: true,
57
+ required: false,
58
+ read_only: true,
59
+ serialized_name: 'id',
60
+ type: {
61
+ name: 'String'
62
+ }
63
+ },
64
+ type: {
65
+ client_side_validation: true,
66
+ required: false,
67
+ read_only: true,
68
+ serialized_name: 'type',
69
+ type: {
70
+ name: 'String'
71
+ }
72
+ },
73
+ name: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ read_only: true,
77
+ serialized_name: 'name',
78
+ type: {
79
+ name: 'String'
80
+ }
81
+ },
82
+ tenant_id: {
83
+ client_side_validation: true,
84
+ required: false,
85
+ serialized_name: 'properties.tenantId',
86
+ type: {
87
+ name: 'String'
88
+ }
89
+ },
90
+ display_name: {
91
+ client_side_validation: true,
92
+ required: false,
93
+ serialized_name: 'properties.displayName',
94
+ type: {
95
+ name: 'String'
96
+ }
97
+ },
98
+ details: {
99
+ client_side_validation: true,
100
+ required: false,
101
+ serialized_name: 'properties.details',
102
+ type: {
103
+ name: 'Composite',
104
+ class_name: 'ManagementGroupDetails'
105
+ }
106
+ },
107
+ children: {
108
+ client_side_validation: true,
109
+ required: false,
110
+ serialized_name: 'properties.children',
111
+ type: {
112
+ name: 'Sequence',
113
+ element: {
114
+ client_side_validation: true,
115
+ required: false,
116
+ serialized_name: 'ManagementGroupChildInfoElementType',
117
+ type: {
118
+ name: 'Composite',
119
+ class_name: 'ManagementGroupChildInfo'
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,91 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ResourcesManagement::Mgmt::V2017_11_01_preview
7
+ module Models
8
+ #
9
+ # The child information of a management group.
10
+ #
11
+ class ManagementGroupChildInfo
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Enum] The type of child resource. Possible values include:
16
+ # 'ManagementGroup', 'Subscription'
17
+ attr_accessor :child_type
18
+
19
+ # @return [String] The fully qualified ID for the child resource
20
+ # (management group or subscription). For example,
21
+ # /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
22
+ attr_accessor :child_id
23
+
24
+ # @return [String] The friendly name of the child resource.
25
+ attr_accessor :display_name
26
+
27
+ # @return [Array<ManagementGroupChildInfo>] The list of children.
28
+ attr_accessor :children
29
+
30
+
31
+ #
32
+ # Mapper for ManagementGroupChildInfo class as Ruby Hash.
33
+ # This will be used for serialization/deserialization.
34
+ #
35
+ def self.mapper()
36
+ {
37
+ client_side_validation: true,
38
+ required: false,
39
+ serialized_name: 'ManagementGroupChildInfo',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'ManagementGroupChildInfo',
43
+ model_properties: {
44
+ child_type: {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'childType',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ },
52
+ child_id: {
53
+ client_side_validation: true,
54
+ required: false,
55
+ serialized_name: 'childId',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ display_name: {
61
+ client_side_validation: true,
62
+ required: false,
63
+ serialized_name: 'displayName',
64
+ type: {
65
+ name: 'String'
66
+ }
67
+ },
68
+ children: {
69
+ client_side_validation: true,
70
+ required: false,
71
+ serialized_name: 'children',
72
+ type: {
73
+ name: 'Sequence',
74
+ element: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ serialized_name: 'ManagementGroupChildInfoElementType',
78
+ type: {
79
+ name: 'Composite',
80
+ class_name: 'ManagementGroupChildInfo'
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ end
89
+ end
90
+ end
91
+ end