azure_mgmt_mysql 0.17.1 → 0.17.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.
- checksums.yaml +4 -4
- data/lib/2017-12-01-preview/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +1 -1
- data/lib/2017-12-01/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_mysql.rb +52 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/advisors.rb +349 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/location_based_recommended_action_sessions_operation_status.rb +124 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/location_based_recommended_action_sessions_result.rb +256 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/advisor.rb +73 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/advisors_result_list.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/azure_entity_resource.rb +75 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/error_additional_info.rb +59 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/error_response.rb +113 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_endpoint_connection.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_endpoint_connection_list_result.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_endpoint_property.rb +47 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_resource.rb +76 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_resource_list_result.rb +100 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_resource_properties.rb +68 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/private_link_service_connection_state_property.rb +72 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/proxy_resource.rb +63 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/recommendation_action.rb +158 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/recommendation_actions_result_list.rb +101 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/recommended_action_sessions_operation_status.rb +68 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/resource.rb +83 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/tags_object.rb +54 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/models/tracked_resource.rb +92 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/module_definition.rb +9 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +351 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/private_endpoint_connections.rb +832 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/private_link_resources.rb +349 -0
- data/lib/2018-06-01/generated/azure_mgmt_mysql/recommended_actions.rb +362 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql.rb +38 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/azure_entity_resource.rb +75 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/error_additional_info.rb +59 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/error_response.rb +113 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/proxy_resource.rb +63 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/resource.rb +83 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/server_key.rb +111 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/server_key_list_result.rb +100 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/server_upgrade_parameters.rb +47 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/models/tracked_resource.rb +92 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/module_definition.rb +9 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/my_sqlmanagement_client.rb +135 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/server_keys.rb +666 -0
- data/lib/2020-01-01/generated/azure_mgmt_mysql/servers.rb +439 -0
- data/lib/azure_mgmt_mysql.rb +3 -1
- data/lib/profiles/latest/modules/mysql_profile_module.rb +122 -12
- data/lib/version.rb +1 -1
- metadata +44 -2
@@ -0,0 +1,101 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Mysql::Mgmt::V2018_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# A list of recommendation actions.
|
10
|
+
#
|
11
|
+
class RecommendationActionsResultList
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<RecommendationAction>] The list of recommendation action
|
17
|
+
# advisors.
|
18
|
+
attr_accessor :value
|
19
|
+
|
20
|
+
# @return [String] Link to retrieve next page of results.
|
21
|
+
attr_accessor :next_link
|
22
|
+
|
23
|
+
# return [Proc] with next page method call.
|
24
|
+
attr_accessor :next_method
|
25
|
+
|
26
|
+
#
|
27
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
28
|
+
#
|
29
|
+
# @return [Array<RecommendationAction>] operation results.
|
30
|
+
#
|
31
|
+
def get_all_items
|
32
|
+
items = @value
|
33
|
+
page = self
|
34
|
+
while page.next_link != nil && !page.next_link.strip.empty? do
|
35
|
+
page = page.get_next_page
|
36
|
+
items.concat(page.value)
|
37
|
+
end
|
38
|
+
items
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Gets the next page of results.
|
43
|
+
#
|
44
|
+
# @return [RecommendationActionsResultList] with next page content.
|
45
|
+
#
|
46
|
+
def get_next_page
|
47
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
48
|
+
unless response.nil?
|
49
|
+
@next_link = response.body.next_link
|
50
|
+
@value = response.body.value
|
51
|
+
self
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Mapper for RecommendationActionsResultList class as Ruby Hash.
|
57
|
+
# This will be used for serialization/deserialization.
|
58
|
+
#
|
59
|
+
def self.mapper()
|
60
|
+
{
|
61
|
+
client_side_validation: true,
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'RecommendationActionsResultList',
|
64
|
+
type: {
|
65
|
+
name: 'Composite',
|
66
|
+
class_name: 'RecommendationActionsResultList',
|
67
|
+
model_properties: {
|
68
|
+
value: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
read_only: true,
|
72
|
+
serialized_name: 'value',
|
73
|
+
type: {
|
74
|
+
name: 'Sequence',
|
75
|
+
element: {
|
76
|
+
client_side_validation: true,
|
77
|
+
required: false,
|
78
|
+
serialized_name: 'RecommendationActionElementType',
|
79
|
+
type: {
|
80
|
+
name: 'Composite',
|
81
|
+
class_name: 'RecommendationAction'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
},
|
86
|
+
next_link: {
|
87
|
+
client_side_validation: true,
|
88
|
+
required: false,
|
89
|
+
read_only: true,
|
90
|
+
serialized_name: 'nextLink',
|
91
|
+
type: {
|
92
|
+
name: 'String'
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,68 @@
|
|
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::Mysql::Mgmt::V2018_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Recommendation action session operation status.
|
10
|
+
#
|
11
|
+
class RecommendedActionSessionsOperationStatus
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Operation identifier.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [DateTime] Operation start time.
|
19
|
+
attr_accessor :start_time
|
20
|
+
|
21
|
+
# @return [String] Operation status.
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
|
25
|
+
#
|
26
|
+
# Mapper for RecommendedActionSessionsOperationStatus class as Ruby Hash.
|
27
|
+
# This will be used for serialization/deserialization.
|
28
|
+
#
|
29
|
+
def self.mapper()
|
30
|
+
{
|
31
|
+
client_side_validation: true,
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'RecommendedActionSessionsOperationStatus',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'RecommendedActionSessionsOperationStatus',
|
37
|
+
model_properties: {
|
38
|
+
name: {
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'name',
|
42
|
+
type: {
|
43
|
+
name: 'String'
|
44
|
+
}
|
45
|
+
},
|
46
|
+
start_time: {
|
47
|
+
client_side_validation: true,
|
48
|
+
required: false,
|
49
|
+
serialized_name: 'startTime',
|
50
|
+
type: {
|
51
|
+
name: 'DateTime'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
status: {
|
55
|
+
client_side_validation: true,
|
56
|
+
required: false,
|
57
|
+
serialized_name: 'status',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,83 @@
|
|
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::Mysql::Mgmt::V2018_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class Resource
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [String] Fully qualified resource Id for the resource. Ex -
|
17
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
# @return [String] The name of the resource
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
# @return [String] The type of the resource. Ex-
|
24
|
+
# Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
|
25
|
+
attr_accessor :type
|
26
|
+
|
27
|
+
|
28
|
+
# @return [String] the name of the resource group of the resource.
|
29
|
+
def resource_group
|
30
|
+
unless self.id.nil?
|
31
|
+
groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
|
32
|
+
groups.captures[0].strip if groups
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
#
|
38
|
+
# Mapper for Resource class as Ruby Hash.
|
39
|
+
# This will be used for serialization/deserialization.
|
40
|
+
#
|
41
|
+
def self.mapper()
|
42
|
+
{
|
43
|
+
client_side_validation: true,
|
44
|
+
required: false,
|
45
|
+
serialized_name: 'Resource',
|
46
|
+
type: {
|
47
|
+
name: 'Composite',
|
48
|
+
class_name: 'Resource',
|
49
|
+
model_properties: {
|
50
|
+
id: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
read_only: true,
|
54
|
+
serialized_name: 'id',
|
55
|
+
type: {
|
56
|
+
name: 'String'
|
57
|
+
}
|
58
|
+
},
|
59
|
+
name: {
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
read_only: true,
|
63
|
+
serialized_name: 'name',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
type: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
read_only: true,
|
72
|
+
serialized_name: 'type',
|
73
|
+
type: {
|
74
|
+
name: 'String'
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Mysql::Mgmt::V2018_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Tags object for patch operations.
|
10
|
+
#
|
11
|
+
class TagsObject
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Hash{String => String}] Resource tags.
|
16
|
+
attr_accessor :tags
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for TagsObject 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: 'TagsObject',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'TagsObject',
|
31
|
+
model_properties: {
|
32
|
+
tags: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'tags',
|
36
|
+
type: {
|
37
|
+
name: 'Dictionary',
|
38
|
+
value: {
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'StringElementType',
|
42
|
+
type: {
|
43
|
+
name: 'String'
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Mysql::Mgmt::V2018_06_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The resource model definition for a ARM tracked top level resource
|
10
|
+
#
|
11
|
+
class TrackedResource < Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Hash{String => String}] Resource tags.
|
16
|
+
attr_accessor :tags
|
17
|
+
|
18
|
+
# @return [String] The geo-location where the resource lives
|
19
|
+
attr_accessor :location
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for TrackedResource class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'TrackedResource',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'TrackedResource',
|
34
|
+
model_properties: {
|
35
|
+
id: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
read_only: true,
|
39
|
+
serialized_name: 'id',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
name: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
read_only: true,
|
48
|
+
serialized_name: 'name',
|
49
|
+
type: {
|
50
|
+
name: 'String'
|
51
|
+
}
|
52
|
+
},
|
53
|
+
type: {
|
54
|
+
client_side_validation: true,
|
55
|
+
required: false,
|
56
|
+
read_only: true,
|
57
|
+
serialized_name: 'type',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
tags: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'tags',
|
66
|
+
type: {
|
67
|
+
name: 'Dictionary',
|
68
|
+
value: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'StringElementType',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
78
|
+
location: {
|
79
|
+
client_side_validation: true,
|
80
|
+
required: true,
|
81
|
+
serialized_name: 'location',
|
82
|
+
type: {
|
83
|
+
name: 'String'
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure end
|
7
|
+
module Azure::Mysql end
|
8
|
+
module Azure::Mysql::Mgmt end
|
9
|
+
module Azure::Mysql::Mgmt::V2018_06_01 end
|
@@ -0,0 +1,351 @@
|
|
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::Mysql::Mgmt::V2018_06_01
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class MySQLManagementClient < 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 this operation.
|
24
|
+
attr_reader :api_version
|
25
|
+
|
26
|
+
# @return [String] The preferred language for the response.
|
27
|
+
attr_accessor :accept_language
|
28
|
+
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
32
|
+
|
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.
|
36
|
+
attr_accessor :generate_client_request_id
|
37
|
+
|
38
|
+
# @return [Advisors] advisors
|
39
|
+
attr_reader :advisors
|
40
|
+
|
41
|
+
# @return [RecommendedActions] recommended_actions
|
42
|
+
attr_reader :recommended_actions
|
43
|
+
|
44
|
+
# @return [LocationBasedRecommendedActionSessionsOperationStatus]
|
45
|
+
# location_based_recommended_action_sessions_operation_status
|
46
|
+
attr_reader :location_based_recommended_action_sessions_operation_status
|
47
|
+
|
48
|
+
# @return [LocationBasedRecommendedActionSessionsResult]
|
49
|
+
# location_based_recommended_action_sessions_result
|
50
|
+
attr_reader :location_based_recommended_action_sessions_result
|
51
|
+
|
52
|
+
# @return [PrivateEndpointConnections] private_endpoint_connections
|
53
|
+
attr_reader :private_endpoint_connections
|
54
|
+
|
55
|
+
# @return [PrivateLinkResources] private_link_resources
|
56
|
+
attr_reader :private_link_resources
|
57
|
+
|
58
|
+
#
|
59
|
+
# Creates initializes a new instance of the MySQLManagementClient class.
|
60
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
61
|
+
# @param base_url [String] the base URI of the service.
|
62
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
63
|
+
#
|
64
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
65
|
+
super(credentials, options)
|
66
|
+
@base_url = base_url || 'https://management.azure.com'
|
67
|
+
|
68
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
69
|
+
@credentials = credentials
|
70
|
+
|
71
|
+
@advisors = Advisors.new(self)
|
72
|
+
@recommended_actions = RecommendedActions.new(self)
|
73
|
+
@location_based_recommended_action_sessions_operation_status = LocationBasedRecommendedActionSessionsOperationStatus.new(self)
|
74
|
+
@location_based_recommended_action_sessions_result = LocationBasedRecommendedActionSessionsResult.new(self)
|
75
|
+
@private_endpoint_connections = PrivateEndpointConnections.new(self)
|
76
|
+
@private_link_resources = PrivateLinkResources.new(self)
|
77
|
+
@api_version = '2018-06-01'
|
78
|
+
@accept_language = 'en-US'
|
79
|
+
@long_running_operation_retry_timeout = 30
|
80
|
+
@generate_client_request_id = true
|
81
|
+
add_telemetry
|
82
|
+
end
|
83
|
+
|
84
|
+
#
|
85
|
+
# Makes a request and returns the body of the response.
|
86
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
87
|
+
# @param path [String] the path, relative to {base_url}.
|
88
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
89
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
90
|
+
# Example:
|
91
|
+
#
|
92
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
93
|
+
# path = "/path"
|
94
|
+
# options = {
|
95
|
+
# body: request_content,
|
96
|
+
# query_params: {'api-version' => '2016-02-01'}
|
97
|
+
# }
|
98
|
+
# result = @client.make_request(:put, path, options)
|
99
|
+
#
|
100
|
+
def make_request(method, path, options = {})
|
101
|
+
result = make_request_with_http_info(method, path, options)
|
102
|
+
result.body unless result.nil?
|
103
|
+
end
|
104
|
+
|
105
|
+
#
|
106
|
+
# Makes a request and returns the operation response.
|
107
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
108
|
+
# @param path [String] the path, relative to {base_url}.
|
109
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
110
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
111
|
+
#
|
112
|
+
def make_request_with_http_info(method, path, options = {})
|
113
|
+
result = make_request_async(method, path, options).value!
|
114
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
115
|
+
result
|
116
|
+
end
|
117
|
+
|
118
|
+
#
|
119
|
+
# Makes a request asynchronously.
|
120
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
121
|
+
# @param path [String] the path, relative to {base_url}.
|
122
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
123
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
124
|
+
#
|
125
|
+
def make_request_async(method, path, options = {})
|
126
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
127
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
128
|
+
|
129
|
+
request_url = options[:base_url] || @base_url
|
130
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
131
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
132
|
+
end
|
133
|
+
|
134
|
+
request_headers = @request_headers
|
135
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
136
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
137
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
138
|
+
|
139
|
+
super(request_url, method, path, options)
|
140
|
+
end
|
141
|
+
|
142
|
+
#
|
143
|
+
# Create recommendation action session for the advisor.
|
144
|
+
#
|
145
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
146
|
+
# is case insensitive.
|
147
|
+
# @param server_name [String] The name of the server.
|
148
|
+
# @param advisor_name [String] The advisor name for recommendation action.
|
149
|
+
# @param database_name [String] The name of the database.
|
150
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
151
|
+
# will be added to the HTTP request.
|
152
|
+
#
|
153
|
+
#
|
154
|
+
def create_recommended_action_session(resource_group_name, server_name, advisor_name, database_name, custom_headers:nil)
|
155
|
+
response = create_recommended_action_session_async(resource_group_name, server_name, advisor_name, database_name, custom_headers:custom_headers).value!
|
156
|
+
nil
|
157
|
+
end
|
158
|
+
|
159
|
+
#
|
160
|
+
# Create recommendation action session for the advisor.
|
161
|
+
#
|
162
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
163
|
+
# is case insensitive.
|
164
|
+
# @param server_name [String] The name of the server.
|
165
|
+
# @param advisor_name [String] The advisor name for recommendation action.
|
166
|
+
# @param database_name [String] The name of the database.
|
167
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
168
|
+
# will be added to the HTTP request.
|
169
|
+
#
|
170
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
171
|
+
#
|
172
|
+
def create_recommended_action_session_with_http_info(resource_group_name, server_name, advisor_name, database_name, custom_headers:nil)
|
173
|
+
create_recommended_action_session_async(resource_group_name, server_name, advisor_name, database_name, custom_headers:custom_headers).value!
|
174
|
+
end
|
175
|
+
|
176
|
+
#
|
177
|
+
# Create recommendation action session for the advisor.
|
178
|
+
#
|
179
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
180
|
+
# is case insensitive.
|
181
|
+
# @param server_name [String] The name of the server.
|
182
|
+
# @param advisor_name [String] The advisor name for recommendation action.
|
183
|
+
# @param database_name [String] The name of the database.
|
184
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
185
|
+
# to the HTTP request.
|
186
|
+
#
|
187
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
188
|
+
#
|
189
|
+
def create_recommended_action_session_async(resource_group_name, server_name, advisor_name, database_name, custom_headers:nil)
|
190
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
191
|
+
fail ArgumentError, "'api_version' should satisfy the constraint - 'MinLength': '1'" if !api_version.nil? && api_version.length < 1
|
192
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
193
|
+
fail ArgumentError, "'subscription_id' should satisfy the constraint - 'MinLength': '1'" if !subscription_id.nil? && subscription_id.length < 1
|
194
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
195
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
196
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
197
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
198
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
199
|
+
fail ArgumentError, 'advisor_name is nil' if advisor_name.nil?
|
200
|
+
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
201
|
+
|
202
|
+
|
203
|
+
request_headers = {}
|
204
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
205
|
+
|
206
|
+
# Set Headers
|
207
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
208
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
209
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession'
|
210
|
+
|
211
|
+
request_url = @base_url || self.base_url
|
212
|
+
|
213
|
+
options = {
|
214
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
215
|
+
path_params: {'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'advisorName' => advisor_name},
|
216
|
+
query_params: {'api-version' => api_version,'databaseName' => database_name},
|
217
|
+
headers: request_headers.merge(custom_headers || {}),
|
218
|
+
base_url: request_url
|
219
|
+
}
|
220
|
+
promise = self.make_request_async(:post, path_template, options)
|
221
|
+
|
222
|
+
promise = promise.then do |result|
|
223
|
+
http_response = result.response
|
224
|
+
status_code = http_response.status
|
225
|
+
response_content = http_response.body
|
226
|
+
unless status_code == 200 || status_code == 202
|
227
|
+
error_model = JSON.load(response_content)
|
228
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
229
|
+
end
|
230
|
+
|
231
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
232
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
233
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
234
|
+
|
235
|
+
result
|
236
|
+
end
|
237
|
+
|
238
|
+
promise.execute
|
239
|
+
end
|
240
|
+
|
241
|
+
#
|
242
|
+
# Create recommendation action session for the advisor.
|
243
|
+
#
|
244
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
245
|
+
# is case insensitive.
|
246
|
+
# @param server_name [String] The name of the server.
|
247
|
+
# @param advisor_name [String] The advisor name for recommendation action.
|
248
|
+
# @param database_name [String] The name of the database.
|
249
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
250
|
+
# will be added to the HTTP request.
|
251
|
+
#
|
252
|
+
#
|
253
|
+
def begin_create_recommended_action_session(resource_group_name, server_name, advisor_name, database_name, custom_headers:nil)
|
254
|
+
response = begin_create_recommended_action_session_async(resource_group_name, server_name, advisor_name, database_name, custom_headers:custom_headers).value!
|
255
|
+
nil
|
256
|
+
end
|
257
|
+
|
258
|
+
#
|
259
|
+
# Create recommendation action session for the advisor.
|
260
|
+
#
|
261
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
262
|
+
# is case insensitive.
|
263
|
+
# @param server_name [String] The name of the server.
|
264
|
+
# @param advisor_name [String] The advisor name for recommendation action.
|
265
|
+
# @param database_name [String] The name of the database.
|
266
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
267
|
+
# will be added to the HTTP request.
|
268
|
+
#
|
269
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
270
|
+
#
|
271
|
+
def begin_create_recommended_action_session_with_http_info(resource_group_name, server_name, advisor_name, database_name, custom_headers:nil)
|
272
|
+
begin_create_recommended_action_session_async(resource_group_name, server_name, advisor_name, database_name, custom_headers:custom_headers).value!
|
273
|
+
end
|
274
|
+
|
275
|
+
#
|
276
|
+
# Create recommendation action session for the advisor.
|
277
|
+
#
|
278
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
279
|
+
# is case insensitive.
|
280
|
+
# @param server_name [String] The name of the server.
|
281
|
+
# @param advisor_name [String] The advisor name for recommendation action.
|
282
|
+
# @param database_name [String] The name of the database.
|
283
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
284
|
+
# to the HTTP request.
|
285
|
+
#
|
286
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
287
|
+
#
|
288
|
+
def begin_create_recommended_action_session_async(resource_group_name, server_name, advisor_name, database_name, custom_headers:nil)
|
289
|
+
fail ArgumentError, 'api_version is nil' if api_version.nil?
|
290
|
+
fail ArgumentError, "'api_version' should satisfy the constraint - 'MinLength': '1'" if !api_version.nil? && api_version.length < 1
|
291
|
+
fail ArgumentError, 'subscription_id is nil' if subscription_id.nil?
|
292
|
+
fail ArgumentError, "'subscription_id' should satisfy the constraint - 'MinLength': '1'" if !subscription_id.nil? && subscription_id.length < 1
|
293
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
294
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
295
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
296
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
297
|
+
fail ArgumentError, 'server_name is nil' if server_name.nil?
|
298
|
+
fail ArgumentError, 'advisor_name is nil' if advisor_name.nil?
|
299
|
+
fail ArgumentError, 'database_name is nil' if database_name.nil?
|
300
|
+
|
301
|
+
|
302
|
+
request_headers = {}
|
303
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
304
|
+
|
305
|
+
# Set Headers
|
306
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
307
|
+
request_headers['accept-language'] = accept_language unless accept_language.nil?
|
308
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMySQL/servers/{serverName}/advisors/{advisorName}/createRecommendedActionSession'
|
309
|
+
|
310
|
+
request_url = @base_url || self.base_url
|
311
|
+
|
312
|
+
options = {
|
313
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
314
|
+
path_params: {'subscriptionId' => subscription_id,'resourceGroupName' => resource_group_name,'serverName' => server_name,'advisorName' => advisor_name},
|
315
|
+
query_params: {'api-version' => api_version,'databaseName' => database_name},
|
316
|
+
headers: request_headers.merge(custom_headers || {}),
|
317
|
+
base_url: request_url
|
318
|
+
}
|
319
|
+
promise = self.make_request_async(:post, path_template, options)
|
320
|
+
|
321
|
+
promise = promise.then do |result|
|
322
|
+
http_response = result.response
|
323
|
+
status_code = http_response.status
|
324
|
+
response_content = http_response.body
|
325
|
+
unless status_code == 200 || status_code == 202
|
326
|
+
error_model = JSON.load(response_content)
|
327
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
328
|
+
end
|
329
|
+
|
330
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
331
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
332
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
333
|
+
|
334
|
+
result
|
335
|
+
end
|
336
|
+
|
337
|
+
promise.execute
|
338
|
+
end
|
339
|
+
|
340
|
+
|
341
|
+
private
|
342
|
+
#
|
343
|
+
# Adds telemetry information.
|
344
|
+
#
|
345
|
+
def add_telemetry
|
346
|
+
sdk_information = 'azure_mgmt_mysql'
|
347
|
+
sdk_information = "#{sdk_information}/0.17.2"
|
348
|
+
add_user_agent_information(sdk_information)
|
349
|
+
end
|
350
|
+
end
|
351
|
+
end
|