azure_mgmt_postgresql 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql.rb +71 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/check_name_availability.rb +126 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/configurations.rb +396 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/databases.rb +541 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/firewall_rules.rb +541 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/location_based_performance_tier.rb +116 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/log_files.rb +126 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/configuration.rb +132 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/configuration_list_result.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/database.rb +84 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/database_list_result.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/firewall_rule.rb +92 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/firewall_rule_list_result.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/geo_redundant_backup.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/log_file.rb +119 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/log_file_list_result.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/name_availability.rb +68 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/name_availability_request.rb +57 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/operation.rb +95 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/operation_display.rb +83 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/operation_list_result.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/operation_origin.rb +17 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/performance_tier_list_result.rb +56 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/performance_tier_properties.rb +67 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/performance_tier_service_level_objectives.rb +126 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/proxy_resource.rb +71 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server.rb +220 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_for_create.rb +92 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_list_result.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_properties_for_create.rb +86 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_properties_for_default_create.rb +100 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_properties_for_geo_restore.rb +88 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_properties_for_replica.rb +87 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_properties_for_restore.rb +99 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_state.rb +17 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_update_parameters.rb +115 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/server_version.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/sku.rb +97 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/sku_tier.rb +17 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/ssl_enforcement_enum.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/storage_profile.rb +69 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/models/tracked_resource.rb +93 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/module_definition.rb +9 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/operations.rb +110 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/postgre_sqlmanagement_client.rb +164 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/replicas.rb +126 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_postgresql/servers.rb +771 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql.rb +78 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/check_name_availability.rb +126 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/configurations.rb +396 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/databases.rb +541 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/firewall_rules.rb +541 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/location_based_performance_tier.rb +116 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/log_files.rb +126 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/configuration.rb +132 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/configuration_list_result.rb +55 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/database.rb +84 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/database_list_result.rb +55 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/firewall_rule.rb +92 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/firewall_rule_list_result.rb +55 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/geo_redundant_backup.rb +16 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/log_file.rb +119 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/log_file_list_result.rb +55 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/name_availability.rb +68 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/name_availability_request.rb +57 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/operation.rb +95 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/operation_display.rb +83 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/operation_list_result.rb +55 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/operation_origin.rb +17 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/performance_tier_list_result.rb +56 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/performance_tier_properties.rb +67 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/performance_tier_service_level_objectives.rb +126 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/proxy_resource.rb +71 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server.rb +220 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_for_create.rb +92 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_list_result.rb +55 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_properties_for_create.rb +86 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_properties_for_default_create.rb +100 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_properties_for_geo_restore.rb +88 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_properties_for_replica.rb +87 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_properties_for_restore.rb +99 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_security_alert_policy.rb +166 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_security_alert_policy_state.rb +16 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_state.rb +17 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_update_parameters.rb +126 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/server_version.rb +19 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/sku.rb +97 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/sku_tier.rb +17 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/ssl_enforcement_enum.rb +16 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/storage_profile.rb +69 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/tracked_resource.rb +93 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/virtual_network_rule.rb +99 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/virtual_network_rule_list_result.rb +100 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/models/virtual_network_rule_state.rb +19 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/module_definition.rb +9 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/operations.rb +110 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/postgre_sqlmanagement_client.rb +172 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/replicas.rb +126 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/server_security_alert_policies.rb +290 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/servers.rb +900 -0
- data/lib/2017-12-01/generated/azure_mgmt_postgresql/virtual_network_rules.rb +666 -0
- data/lib/azure_mgmt_postgresql.rb +7 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/postgresql_profile_module.rb +241 -0
- data/lib/profiles/latest/postgresql_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/postgresql_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +225 -0
@@ -0,0 +1,16 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for ServerVersion
|
10
|
+
#
|
11
|
+
module ServerVersion
|
12
|
+
NineFullStopFive = "9.5"
|
13
|
+
NineFullStopSix = "9.6"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,97 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Billing information related properties of a server.
|
10
|
+
#
|
11
|
+
class Sku
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The name of the sku, typically, tier + family + cores,
|
16
|
+
# e.g. B_Gen4_1, GP_Gen5_8.
|
17
|
+
attr_accessor :name
|
18
|
+
|
19
|
+
# @return [SkuTier] The tier of the particular SKU, e.g. Basic. Possible
|
20
|
+
# values include: 'Basic', 'GeneralPurpose', 'MemoryOptimized'
|
21
|
+
attr_accessor :tier
|
22
|
+
|
23
|
+
# @return [Integer] The scale up/out capacity, representing server's
|
24
|
+
# compute units.
|
25
|
+
attr_accessor :capacity
|
26
|
+
|
27
|
+
# @return [String] The size code, to be interpreted by resource as
|
28
|
+
# appropriate.
|
29
|
+
attr_accessor :size
|
30
|
+
|
31
|
+
# @return [String] The family of hardware.
|
32
|
+
attr_accessor :family
|
33
|
+
|
34
|
+
|
35
|
+
#
|
36
|
+
# Mapper for Sku class as Ruby Hash.
|
37
|
+
# This will be used for serialization/deserialization.
|
38
|
+
#
|
39
|
+
def self.mapper()
|
40
|
+
{
|
41
|
+
client_side_validation: true,
|
42
|
+
required: false,
|
43
|
+
serialized_name: 'Sku',
|
44
|
+
type: {
|
45
|
+
name: 'Composite',
|
46
|
+
class_name: 'Sku',
|
47
|
+
model_properties: {
|
48
|
+
name: {
|
49
|
+
client_side_validation: true,
|
50
|
+
required: false,
|
51
|
+
serialized_name: 'name',
|
52
|
+
type: {
|
53
|
+
name: 'String'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
tier: {
|
57
|
+
client_side_validation: true,
|
58
|
+
required: false,
|
59
|
+
serialized_name: 'tier',
|
60
|
+
type: {
|
61
|
+
name: 'String'
|
62
|
+
}
|
63
|
+
},
|
64
|
+
capacity: {
|
65
|
+
client_side_validation: true,
|
66
|
+
required: false,
|
67
|
+
serialized_name: 'capacity',
|
68
|
+
constraints: {
|
69
|
+
InclusiveMinimum: 0
|
70
|
+
},
|
71
|
+
type: {
|
72
|
+
name: 'Number'
|
73
|
+
}
|
74
|
+
},
|
75
|
+
size: {
|
76
|
+
client_side_validation: true,
|
77
|
+
required: false,
|
78
|
+
serialized_name: 'size',
|
79
|
+
type: {
|
80
|
+
name: 'String'
|
81
|
+
}
|
82
|
+
},
|
83
|
+
family: {
|
84
|
+
client_side_validation: true,
|
85
|
+
required: false,
|
86
|
+
serialized_name: 'family',
|
87
|
+
type: {
|
88
|
+
name: 'String'
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,17 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for SkuTier
|
10
|
+
#
|
11
|
+
module SkuTier
|
12
|
+
Basic = "Basic"
|
13
|
+
GeneralPurpose = "GeneralPurpose"
|
14
|
+
MemoryOptimized = "MemoryOptimized"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for SslEnforcementEnum
|
10
|
+
#
|
11
|
+
module SslEnforcementEnum
|
12
|
+
Enabled = "Enabled"
|
13
|
+
Disabled = "Disabled"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Storage Profile properties of a server
|
10
|
+
#
|
11
|
+
class StorageProfile
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Integer] Backup retention days for the server.
|
16
|
+
attr_accessor :backup_retention_days
|
17
|
+
|
18
|
+
# @return [GeoRedundantBackup] Enable Geo-redundant or not for server
|
19
|
+
# backup. Possible values include: 'Enabled', 'Disabled'
|
20
|
+
attr_accessor :geo_redundant_backup
|
21
|
+
|
22
|
+
# @return [Integer] Max storage allowed for a server.
|
23
|
+
attr_accessor :storage_mb
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for StorageProfile 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: 'StorageProfile',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'StorageProfile',
|
38
|
+
model_properties: {
|
39
|
+
backup_retention_days: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'backupRetentionDays',
|
43
|
+
type: {
|
44
|
+
name: 'Number'
|
45
|
+
}
|
46
|
+
},
|
47
|
+
geo_redundant_backup: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: false,
|
50
|
+
serialized_name: 'geoRedundantBackup',
|
51
|
+
type: {
|
52
|
+
name: 'String'
|
53
|
+
}
|
54
|
+
},
|
55
|
+
storage_mb: {
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'storageMB',
|
59
|
+
type: {
|
60
|
+
name: 'Number'
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,93 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Resource properties including location and tags for track resources.
|
10
|
+
#
|
11
|
+
class TrackedResource < ProxyResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The location the resource resides in.
|
16
|
+
attr_accessor :location
|
17
|
+
|
18
|
+
# @return [Hash{String => String}] Application-specific metadata in the
|
19
|
+
# form of key-value pairs.
|
20
|
+
attr_accessor :tags
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for TrackedResource class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'TrackedResource',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'TrackedResource',
|
35
|
+
model_properties: {
|
36
|
+
id: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: false,
|
39
|
+
read_only: true,
|
40
|
+
serialized_name: 'id',
|
41
|
+
type: {
|
42
|
+
name: 'String'
|
43
|
+
}
|
44
|
+
},
|
45
|
+
name: {
|
46
|
+
client_side_validation: true,
|
47
|
+
required: false,
|
48
|
+
read_only: true,
|
49
|
+
serialized_name: 'name',
|
50
|
+
type: {
|
51
|
+
name: 'String'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
type: {
|
55
|
+
client_side_validation: true,
|
56
|
+
required: false,
|
57
|
+
read_only: true,
|
58
|
+
serialized_name: 'type',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
},
|
63
|
+
location: {
|
64
|
+
client_side_validation: true,
|
65
|
+
required: true,
|
66
|
+
serialized_name: 'location',
|
67
|
+
type: {
|
68
|
+
name: 'String'
|
69
|
+
}
|
70
|
+
},
|
71
|
+
tags: {
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'tags',
|
75
|
+
type: {
|
76
|
+
name: 'Dictionary',
|
77
|
+
value: {
|
78
|
+
client_side_validation: true,
|
79
|
+
required: false,
|
80
|
+
serialized_name: 'StringElementType',
|
81
|
+
type: {
|
82
|
+
name: 'String'
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
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::Postgresql end
|
8
|
+
module Azure::Postgresql::Mgmt end
|
9
|
+
module Azure::Postgresql::Mgmt::V2017_12_01_preview end
|
@@ -0,0 +1,110 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
#
|
8
|
+
# The Microsoft Azure management API provides create, read, update, and
|
9
|
+
# delete functionality for Azure PostgreSQL resources including servers,
|
10
|
+
# databases, firewall rules, log files and configurations with new business
|
11
|
+
# model.
|
12
|
+
#
|
13
|
+
class Operations
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
#
|
17
|
+
# Creates and initializes a new instance of the Operations class.
|
18
|
+
# @param client service class for accessing basic functionality.
|
19
|
+
#
|
20
|
+
def initialize(client)
|
21
|
+
@client = client
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return [PostgreSQLManagementClient] reference to the PostgreSQLManagementClient
|
25
|
+
attr_reader :client
|
26
|
+
|
27
|
+
#
|
28
|
+
# Lists all of the available REST API operations.
|
29
|
+
#
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
# @return [OperationListResult] operation results.
|
34
|
+
#
|
35
|
+
def list(custom_headers:nil)
|
36
|
+
response = list_async(custom_headers:custom_headers).value!
|
37
|
+
response.body unless response.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Lists all of the available REST API operations.
|
42
|
+
#
|
43
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
44
|
+
# will be added to the HTTP request.
|
45
|
+
#
|
46
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
47
|
+
#
|
48
|
+
def list_with_http_info(custom_headers:nil)
|
49
|
+
list_async(custom_headers:custom_headers).value!
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Lists all of the available REST API operations.
|
54
|
+
#
|
55
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
56
|
+
# to the HTTP request.
|
57
|
+
#
|
58
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
59
|
+
#
|
60
|
+
def list_async(custom_headers:nil)
|
61
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
62
|
+
|
63
|
+
|
64
|
+
request_headers = {}
|
65
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
66
|
+
|
67
|
+
# Set Headers
|
68
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
69
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
70
|
+
path_template = 'providers/Microsoft.DBforPostgreSQL/operations'
|
71
|
+
|
72
|
+
request_url = @base_url || @client.base_url
|
73
|
+
|
74
|
+
options = {
|
75
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
76
|
+
query_params: {'api-version' => @client.api_version},
|
77
|
+
headers: request_headers.merge(custom_headers || {}),
|
78
|
+
base_url: request_url
|
79
|
+
}
|
80
|
+
promise = @client.make_request_async(:get, path_template, options)
|
81
|
+
|
82
|
+
promise = promise.then do |result|
|
83
|
+
http_response = result.response
|
84
|
+
status_code = http_response.status
|
85
|
+
response_content = http_response.body
|
86
|
+
unless status_code == 200
|
87
|
+
error_model = JSON.load(response_content)
|
88
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
89
|
+
end
|
90
|
+
|
91
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
92
|
+
# Deserialize Response
|
93
|
+
if status_code == 200
|
94
|
+
begin
|
95
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
96
|
+
result_mapper = Azure::Postgresql::Mgmt::V2017_12_01_preview::Models::OperationListResult.mapper()
|
97
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
98
|
+
rescue Exception => e
|
99
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
result
|
104
|
+
end
|
105
|
+
|
106
|
+
promise.execute
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,164 @@
|
|
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::Postgresql::Mgmt::V2017_12_01_preview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class PostgreSQLManagementClient < 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 subscription ID that identifies an Azure
|
21
|
+
# subscription.
|
22
|
+
attr_accessor :subscription_id
|
23
|
+
|
24
|
+
# @return [String] The API version to use for the request.
|
25
|
+
attr_reader :api_version
|
26
|
+
|
27
|
+
# @return [String] The preferred language for the response.
|
28
|
+
attr_accessor :accept_language
|
29
|
+
|
30
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
31
|
+
# Operations. Default value is 30.
|
32
|
+
attr_accessor :long_running_operation_retry_timeout
|
33
|
+
|
34
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
35
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
36
|
+
# generated and included in each request. Default is true.
|
37
|
+
attr_accessor :generate_client_request_id
|
38
|
+
|
39
|
+
# @return [Servers] servers
|
40
|
+
attr_reader :servers
|
41
|
+
|
42
|
+
# @return [Replicas] replicas
|
43
|
+
attr_reader :replicas
|
44
|
+
|
45
|
+
# @return [FirewallRules] firewall_rules
|
46
|
+
attr_reader :firewall_rules
|
47
|
+
|
48
|
+
# @return [Databases] databases
|
49
|
+
attr_reader :databases
|
50
|
+
|
51
|
+
# @return [Configurations] configurations
|
52
|
+
attr_reader :configurations
|
53
|
+
|
54
|
+
# @return [LogFiles] log_files
|
55
|
+
attr_reader :log_files
|
56
|
+
|
57
|
+
# @return [LocationBasedPerformanceTier] location_based_performance_tier
|
58
|
+
attr_reader :location_based_performance_tier
|
59
|
+
|
60
|
+
# @return [CheckNameAvailability] check_name_availability
|
61
|
+
attr_reader :check_name_availability
|
62
|
+
|
63
|
+
# @return [Operations] operations
|
64
|
+
attr_reader :operations
|
65
|
+
|
66
|
+
#
|
67
|
+
# Creates initializes a new instance of the PostgreSQLManagementClient class.
|
68
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
69
|
+
# @param base_url [String] the base URI of the service.
|
70
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
71
|
+
#
|
72
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
73
|
+
super(credentials, options)
|
74
|
+
@base_url = base_url || 'https://management.azure.com'
|
75
|
+
|
76
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
77
|
+
@credentials = credentials
|
78
|
+
|
79
|
+
@servers = Servers.new(self)
|
80
|
+
@replicas = Replicas.new(self)
|
81
|
+
@firewall_rules = FirewallRules.new(self)
|
82
|
+
@databases = Databases.new(self)
|
83
|
+
@configurations = Configurations.new(self)
|
84
|
+
@log_files = LogFiles.new(self)
|
85
|
+
@location_based_performance_tier = LocationBasedPerformanceTier.new(self)
|
86
|
+
@check_name_availability = CheckNameAvailability.new(self)
|
87
|
+
@operations = Operations.new(self)
|
88
|
+
@api_version = '2017-12-01-preview'
|
89
|
+
@accept_language = 'en-US'
|
90
|
+
@long_running_operation_retry_timeout = 30
|
91
|
+
@generate_client_request_id = true
|
92
|
+
add_telemetry
|
93
|
+
end
|
94
|
+
|
95
|
+
#
|
96
|
+
# Makes a request and returns the body of the response.
|
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 [Hash{String=>String}] containing the body of the response.
|
101
|
+
# Example:
|
102
|
+
#
|
103
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
104
|
+
# path = "/path"
|
105
|
+
# options = {
|
106
|
+
# body: request_content,
|
107
|
+
# query_params: {'api-version' => '2016-02-01'}
|
108
|
+
# }
|
109
|
+
# result = @client.make_request(:put, path, options)
|
110
|
+
#
|
111
|
+
def make_request(method, path, options = {})
|
112
|
+
result = make_request_with_http_info(method, path, options)
|
113
|
+
result.body unless result.nil?
|
114
|
+
end
|
115
|
+
|
116
|
+
#
|
117
|
+
# Makes a request and returns the operation response.
|
118
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
119
|
+
# @param path [String] the path, relative to {base_url}.
|
120
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
121
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
122
|
+
#
|
123
|
+
def make_request_with_http_info(method, path, options = {})
|
124
|
+
result = make_request_async(method, path, options).value!
|
125
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
126
|
+
result
|
127
|
+
end
|
128
|
+
|
129
|
+
#
|
130
|
+
# Makes a request asynchronously.
|
131
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
132
|
+
# @param path [String] the path, relative to {base_url}.
|
133
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
134
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
135
|
+
#
|
136
|
+
def make_request_async(method, path, options = {})
|
137
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
138
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
139
|
+
|
140
|
+
request_url = options[:base_url] || @base_url
|
141
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
142
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
143
|
+
end
|
144
|
+
|
145
|
+
request_headers = @request_headers
|
146
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
147
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
148
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
149
|
+
|
150
|
+
super(request_url, method, path, options)
|
151
|
+
end
|
152
|
+
|
153
|
+
|
154
|
+
private
|
155
|
+
#
|
156
|
+
# Adds telemetry information.
|
157
|
+
#
|
158
|
+
def add_telemetry
|
159
|
+
sdk_information = 'azure_mgmt_postgresql'
|
160
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
161
|
+
add_user_agent_information(sdk_information)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|