azure_mgmt_storage 0.17.3 → 0.17.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
- data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
- data/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
- data/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/blob_containers.rb +3 -3
- data/lib/2018-02-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
- data/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/blob_containers.rb +3 -3
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/dimension.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
- data/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage.rb +35 -27
- data/lib/2018-07-01/generated/azure_mgmt_storage/blob_containers.rb +3 -3
- data/lib/2018-07-01/generated/azure_mgmt_storage/blob_services.rb +266 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/blob_service_properties.rb +104 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/cors_rule.rb +128 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/cors_rules.rb +57 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb +64 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/dimension.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb +85 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/geo_replication_status.rb +17 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/sku.rb +4 -4
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/skucapability.rb +3 -3
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account.rb +26 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +2 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_expand.rb +15 -0
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +1 -1
- data/lib/2018-07-01/generated/azure_mgmt_storage/storage_accounts.rb +171 -6
- data/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb +5 -1
- data/lib/profiles/latest/modules/storage_profile_module.rb +116 -86
- data/lib/version.rb +1 -1
- metadata +10 -2
@@ -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::Storage::Mgmt::V2018_07_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Sets the CORS rules. You can include up to five CorsRule elements in the
|
10
|
+
# request.
|
11
|
+
#
|
12
|
+
class CorsRules
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Array<CorsRule>] The List of CORS rules. You can include up to
|
17
|
+
# five CorsRule elements in the request.
|
18
|
+
attr_accessor :cors_rules
|
19
|
+
|
20
|
+
|
21
|
+
#
|
22
|
+
# Mapper for CorsRules class as Ruby Hash.
|
23
|
+
# This will be used for serialization/deserialization.
|
24
|
+
#
|
25
|
+
def self.mapper()
|
26
|
+
{
|
27
|
+
client_side_validation: true,
|
28
|
+
required: false,
|
29
|
+
serialized_name: 'CorsRules',
|
30
|
+
type: {
|
31
|
+
name: 'Composite',
|
32
|
+
class_name: 'CorsRules',
|
33
|
+
model_properties: {
|
34
|
+
cors_rules: {
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'corsRules',
|
38
|
+
type: {
|
39
|
+
name: 'Sequence',
|
40
|
+
element: {
|
41
|
+
client_side_validation: true,
|
42
|
+
required: false,
|
43
|
+
serialized_name: 'CorsRuleElementType',
|
44
|
+
type: {
|
45
|
+
name: 'Composite',
|
46
|
+
class_name: 'CorsRule'
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,64 @@
|
|
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::Storage::Mgmt::V2018_07_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The blob service properties for soft delete.
|
10
|
+
#
|
11
|
+
class DeleteRetentionPolicy
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Boolean] Indicates whether DeleteRetentionPolicy is enabled
|
16
|
+
# for the Blob service.
|
17
|
+
attr_accessor :enabled
|
18
|
+
|
19
|
+
# @return [Integer] Indicates the number of days that the deleted blob
|
20
|
+
# should be retained. The minimum specified value can be 1 and the
|
21
|
+
# maximum value can be 365.
|
22
|
+
attr_accessor :days
|
23
|
+
|
24
|
+
|
25
|
+
#
|
26
|
+
# Mapper for DeleteRetentionPolicy 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: 'DeleteRetentionPolicy',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'DeleteRetentionPolicy',
|
37
|
+
model_properties: {
|
38
|
+
enabled: {
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'enabled',
|
42
|
+
type: {
|
43
|
+
name: 'Boolean'
|
44
|
+
}
|
45
|
+
},
|
46
|
+
days: {
|
47
|
+
client_side_validation: true,
|
48
|
+
required: false,
|
49
|
+
serialized_name: 'days',
|
50
|
+
constraints: {
|
51
|
+
InclusiveMaximum: 365,
|
52
|
+
InclusiveMinimum: 1
|
53
|
+
},
|
54
|
+
type: {
|
55
|
+
name: 'Number'
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,85 @@
|
|
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::Storage::Mgmt::V2018_07_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Statistics related to replication for storage account's Blob, Table,
|
10
|
+
# Queue and File services. It is only available when geo-redundant
|
11
|
+
# replication is enabled for the storage account.
|
12
|
+
#
|
13
|
+
class GeoReplicationStats
|
14
|
+
|
15
|
+
include MsRestAzure
|
16
|
+
|
17
|
+
# @return [GeoReplicationStatus] The status of the secondary location.
|
18
|
+
# Possible values are: - Live: Indicates that the secondary location is
|
19
|
+
# active and operational. - Bootstrap: Indicates initial synchronization
|
20
|
+
# from the primary location to the secondary location is in progress.This
|
21
|
+
# typically occurs when replication is first enabled. - Unavailable:
|
22
|
+
# Indicates that the secondary location is temporarily unavailable.
|
23
|
+
# Possible values include: 'Live', 'Bootstrap', 'Unavailable'
|
24
|
+
attr_accessor :status
|
25
|
+
|
26
|
+
# @return [DateTime] All primary writes preceding this UTC date/time
|
27
|
+
# value are guaranteed to be available for read operations. Primary
|
28
|
+
# writes following this point in time may or may not be available for
|
29
|
+
# reads. Element may be default value if value of LastSyncTime is not
|
30
|
+
# available, this can happen if secondary is offline or we are in
|
31
|
+
# bootstrap.
|
32
|
+
attr_accessor :last_sync_time
|
33
|
+
|
34
|
+
# @return [Boolean] A boolean flag which indicates whether or not account
|
35
|
+
# failover is supported for the account.
|
36
|
+
attr_accessor :can_failover
|
37
|
+
|
38
|
+
|
39
|
+
#
|
40
|
+
# Mapper for GeoReplicationStats class as Ruby Hash.
|
41
|
+
# This will be used for serialization/deserialization.
|
42
|
+
#
|
43
|
+
def self.mapper()
|
44
|
+
{
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'GeoReplicationStats',
|
48
|
+
type: {
|
49
|
+
name: 'Composite',
|
50
|
+
class_name: 'GeoReplicationStats',
|
51
|
+
model_properties: {
|
52
|
+
status: {
|
53
|
+
client_side_validation: true,
|
54
|
+
required: false,
|
55
|
+
read_only: true,
|
56
|
+
serialized_name: 'status',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
},
|
61
|
+
last_sync_time: {
|
62
|
+
client_side_validation: true,
|
63
|
+
required: false,
|
64
|
+
read_only: true,
|
65
|
+
serialized_name: 'lastSyncTime',
|
66
|
+
type: {
|
67
|
+
name: 'DateTime'
|
68
|
+
}
|
69
|
+
},
|
70
|
+
can_failover: {
|
71
|
+
client_side_validation: true,
|
72
|
+
required: false,
|
73
|
+
read_only: true,
|
74
|
+
serialized_name: 'canFailover',
|
75
|
+
type: {
|
76
|
+
name: 'Boolean'
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
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::Storage::Mgmt::V2018_07_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for GeoReplicationStatus
|
10
|
+
#
|
11
|
+
module GeoReplicationStatus
|
12
|
+
Live = "Live"
|
13
|
+
Bootstrap = "Bootstrap"
|
14
|
+
Unavailable = "Unavailable"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -12,14 +12,14 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [SkuName] Gets or sets the
|
16
|
-
# creation; optional for update. Note that in older versions,
|
15
|
+
# @return [SkuName] Gets or sets the SKU name. Required for account
|
16
|
+
# creation; optional for update. Note that in older versions, SKU name
|
17
17
|
# was called accountType. Possible values include: 'Standard_LRS',
|
18
18
|
# 'Standard_GRS', 'Standard_RAGRS', 'Standard_ZRS', 'Premium_LRS',
|
19
19
|
# 'Premium_ZRS'
|
20
20
|
attr_accessor :name
|
21
21
|
|
22
|
-
# @return [SkuTier] Gets the
|
22
|
+
# @return [SkuTier] Gets the SKU tier. This is based on the SKU name.
|
23
23
|
# Possible values include: 'Standard', 'Premium'
|
24
24
|
attr_accessor :tier
|
25
25
|
|
@@ -38,7 +38,7 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
38
38
|
attr_accessor :locations
|
39
39
|
|
40
40
|
# @return [Array<SKUCapability>] The capability information in the
|
41
|
-
# specified
|
41
|
+
# specified SKU, including file encryption, network ACLs, change
|
42
42
|
# notification, etc.
|
43
43
|
attr_accessor :capabilities
|
44
44
|
|
@@ -6,15 +6,15 @@
|
|
6
6
|
module Azure::Storage::Mgmt::V2018_07_01
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
# The capability information in the specified
|
10
|
-
# encryption, network
|
9
|
+
# The capability information in the specified SKU, including file
|
10
|
+
# encryption, network ACLs, change notification, etc.
|
11
11
|
#
|
12
12
|
class SKUCapability
|
13
13
|
|
14
14
|
include MsRestAzure
|
15
15
|
|
16
16
|
# @return [String] The name of capability, The capability information in
|
17
|
-
# the specified
|
17
|
+
# the specified SKU, including file encryption, network ACLs, change
|
18
18
|
# notification, etc.
|
19
19
|
attr_accessor :name
|
20
20
|
|
@@ -96,6 +96,13 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
96
96
|
# true.
|
97
97
|
attr_accessor :is_hns_enabled
|
98
98
|
|
99
|
+
# @return [GeoReplicationStats] Geo Replication Stats
|
100
|
+
attr_accessor :geo_replication_stats
|
101
|
+
|
102
|
+
# @return [Boolean] If the failover is in progress, the value will be
|
103
|
+
# true, otherwise, it will be null.
|
104
|
+
attr_accessor :failover_in_progress
|
105
|
+
|
99
106
|
|
100
107
|
#
|
101
108
|
# Mapper for StorageAccount class as Ruby Hash.
|
@@ -339,6 +346,25 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
339
346
|
type: {
|
340
347
|
name: 'Boolean'
|
341
348
|
}
|
349
|
+
},
|
350
|
+
geo_replication_stats: {
|
351
|
+
client_side_validation: true,
|
352
|
+
required: false,
|
353
|
+
read_only: true,
|
354
|
+
serialized_name: 'properties.geoReplicationStats',
|
355
|
+
type: {
|
356
|
+
name: 'Composite',
|
357
|
+
class_name: 'GeoReplicationStats'
|
358
|
+
}
|
359
|
+
},
|
360
|
+
failover_in_progress: {
|
361
|
+
client_side_validation: true,
|
362
|
+
required: false,
|
363
|
+
read_only: true,
|
364
|
+
serialized_name: 'properties.failoverInProgress',
|
365
|
+
type: {
|
366
|
+
name: 'Boolean'
|
367
|
+
}
|
342
368
|
}
|
343
369
|
}
|
344
370
|
}
|
@@ -6,7 +6,8 @@
|
|
6
6
|
module Azure::Storage::Mgmt::V2018_07_01
|
7
7
|
module Models
|
8
8
|
#
|
9
|
-
# The parameters used to check the
|
9
|
+
# The parameters used to check the availability of the storage account
|
10
|
+
# name.
|
10
11
|
#
|
11
12
|
class StorageAccountCheckNameAvailabilityParameters
|
12
13
|
|
data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb
CHANGED
@@ -12,7 +12,7 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
12
12
|
|
13
13
|
include MsRestAzure
|
14
14
|
|
15
|
-
# @return [Sku] Required. Gets or sets the
|
15
|
+
# @return [Sku] Required. Gets or sets the SKU name.
|
16
16
|
attr_accessor :sku
|
17
17
|
|
18
18
|
# @return [Kind] Required. Indicates the type of storage account.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Storage::Mgmt::V2018_07_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for StorageAccountExpand
|
10
|
+
#
|
11
|
+
module StorageAccountExpand
|
12
|
+
GeoReplicationStats = "geoReplicationStats"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/2018-07-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb
CHANGED
@@ -15,7 +15,7 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
15
15
|
|
16
16
|
# @return [Sku] Gets or sets the SKU name. Note that the SKU name cannot
|
17
17
|
# be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can
|
18
|
-
# accounts of those
|
18
|
+
# accounts of those SKU names be updated to any other value.
|
19
19
|
attr_accessor :sku
|
20
20
|
|
21
21
|
# @return [Hash{String => String}] Gets or sets a list of key value pairs
|
@@ -290,13 +290,17 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
290
290
|
# @param account_name [String] The name of the storage account within the
|
291
291
|
# specified resource group. Storage account names must be between 3 and 24
|
292
292
|
# characters in length and use numbers and lower-case letters only.
|
293
|
+
# @param expand [StorageAccountExpand] May be used to expand the properties
|
294
|
+
# within account's properties. By default, data is not included when fetching
|
295
|
+
# properties. Currently we only support geoReplicationStats. Possible values
|
296
|
+
# include: 'geoReplicationStats'
|
293
297
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
294
298
|
# will be added to the HTTP request.
|
295
299
|
#
|
296
300
|
# @return [StorageAccount] operation results.
|
297
301
|
#
|
298
|
-
def get_properties(resource_group_name, account_name, custom_headers:nil)
|
299
|
-
response = get_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
302
|
+
def get_properties(resource_group_name, account_name, expand:nil, custom_headers:nil)
|
303
|
+
response = get_properties_async(resource_group_name, account_name, expand:expand, custom_headers:custom_headers).value!
|
300
304
|
response.body unless response.nil?
|
301
305
|
end
|
302
306
|
|
@@ -310,13 +314,17 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
310
314
|
# @param account_name [String] The name of the storage account within the
|
311
315
|
# specified resource group. Storage account names must be between 3 and 24
|
312
316
|
# characters in length and use numbers and lower-case letters only.
|
317
|
+
# @param expand [StorageAccountExpand] May be used to expand the properties
|
318
|
+
# within account's properties. By default, data is not included when fetching
|
319
|
+
# properties. Currently we only support geoReplicationStats. Possible values
|
320
|
+
# include: 'geoReplicationStats'
|
313
321
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
314
322
|
# will be added to the HTTP request.
|
315
323
|
#
|
316
324
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
317
325
|
#
|
318
|
-
def get_properties_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
319
|
-
get_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
326
|
+
def get_properties_with_http_info(resource_group_name, account_name, expand:nil, custom_headers:nil)
|
327
|
+
get_properties_async(resource_group_name, account_name, expand:expand, custom_headers:custom_headers).value!
|
320
328
|
end
|
321
329
|
|
322
330
|
#
|
@@ -329,12 +337,16 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
329
337
|
# @param account_name [String] The name of the storage account within the
|
330
338
|
# specified resource group. Storage account names must be between 3 and 24
|
331
339
|
# characters in length and use numbers and lower-case letters only.
|
340
|
+
# @param expand [StorageAccountExpand] May be used to expand the properties
|
341
|
+
# within account's properties. By default, data is not included when fetching
|
342
|
+
# properties. Currently we only support geoReplicationStats. Possible values
|
343
|
+
# include: 'geoReplicationStats'
|
332
344
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
333
345
|
# to the HTTP request.
|
334
346
|
#
|
335
347
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
336
348
|
#
|
337
|
-
def get_properties_async(resource_group_name, account_name, custom_headers:nil)
|
349
|
+
def get_properties_async(resource_group_name, account_name, expand:nil, custom_headers:nil)
|
338
350
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
339
351
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
340
352
|
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
@@ -361,7 +373,7 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
361
373
|
options = {
|
362
374
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
363
375
|
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
364
|
-
query_params: {'api-version' => @client.api_version},
|
376
|
+
query_params: {'api-version' => @client.api_version,'$expand' => expand},
|
365
377
|
headers: request_headers.merge(custom_headers || {}),
|
366
378
|
base_url: request_url
|
367
379
|
}
|
@@ -1202,6 +1214,53 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
1202
1214
|
promise.execute
|
1203
1215
|
end
|
1204
1216
|
|
1217
|
+
#
|
1218
|
+
# Failover request can be triggered for a storage account in case of
|
1219
|
+
# availability issues. The failover occurs from the storage account's primary
|
1220
|
+
# cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
|
1221
|
+
# become primary after failover.
|
1222
|
+
#
|
1223
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1224
|
+
# user's subscription. The name is case insensitive.
|
1225
|
+
# @param account_name [String] The name of the storage account within the
|
1226
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1227
|
+
# characters in length and use numbers and lower-case letters only.
|
1228
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1229
|
+
# will be added to the HTTP request.
|
1230
|
+
#
|
1231
|
+
def failover(resource_group_name, account_name, custom_headers:nil)
|
1232
|
+
response = failover_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
1233
|
+
nil
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
#
|
1237
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1238
|
+
# user's subscription. The name is case insensitive.
|
1239
|
+
# @param account_name [String] The name of the storage account within the
|
1240
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1241
|
+
# characters in length and use numbers and lower-case letters only.
|
1242
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1243
|
+
# will be added to the HTTP request.
|
1244
|
+
#
|
1245
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
1246
|
+
# response.
|
1247
|
+
#
|
1248
|
+
def failover_async(resource_group_name, account_name, custom_headers:nil)
|
1249
|
+
# Send request
|
1250
|
+
promise = begin_failover_async(resource_group_name, account_name, custom_headers:custom_headers)
|
1251
|
+
|
1252
|
+
promise = promise.then do |response|
|
1253
|
+
# Defining deserialization method.
|
1254
|
+
deserialize_method = lambda do |parsed_response|
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
# Waiting for response.
|
1258
|
+
@client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
promise
|
1262
|
+
end
|
1263
|
+
|
1205
1264
|
#
|
1206
1265
|
# Asynchronously creates a new storage account with the specified parameters.
|
1207
1266
|
# If an account is already created and a subsequent create request is issued
|
@@ -1336,5 +1395,111 @@ module Azure::Storage::Mgmt::V2018_07_01
|
|
1336
1395
|
promise.execute
|
1337
1396
|
end
|
1338
1397
|
|
1398
|
+
#
|
1399
|
+
# Failover request can be triggered for a storage account in case of
|
1400
|
+
# availability issues. The failover occurs from the storage account's primary
|
1401
|
+
# cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
|
1402
|
+
# become primary after failover.
|
1403
|
+
#
|
1404
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1405
|
+
# user's subscription. The name is case insensitive.
|
1406
|
+
# @param account_name [String] The name of the storage account within the
|
1407
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1408
|
+
# characters in length and use numbers and lower-case letters only.
|
1409
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1410
|
+
# will be added to the HTTP request.
|
1411
|
+
#
|
1412
|
+
#
|
1413
|
+
def begin_failover(resource_group_name, account_name, custom_headers:nil)
|
1414
|
+
response = begin_failover_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
1415
|
+
nil
|
1416
|
+
end
|
1417
|
+
|
1418
|
+
#
|
1419
|
+
# Failover request can be triggered for a storage account in case of
|
1420
|
+
# availability issues. The failover occurs from the storage account's primary
|
1421
|
+
# cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
|
1422
|
+
# become primary after failover.
|
1423
|
+
#
|
1424
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1425
|
+
# user's subscription. The name is case insensitive.
|
1426
|
+
# @param account_name [String] The name of the storage account within the
|
1427
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1428
|
+
# characters in length and use numbers and lower-case letters only.
|
1429
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1430
|
+
# will be added to the HTTP request.
|
1431
|
+
#
|
1432
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1433
|
+
#
|
1434
|
+
def begin_failover_with_http_info(resource_group_name, account_name, custom_headers:nil)
|
1435
|
+
begin_failover_async(resource_group_name, account_name, custom_headers:custom_headers).value!
|
1436
|
+
end
|
1437
|
+
|
1438
|
+
#
|
1439
|
+
# Failover request can be triggered for a storage account in case of
|
1440
|
+
# availability issues. The failover occurs from the storage account's primary
|
1441
|
+
# cluster to secondary cluster for RA-GRS accounts. The secondary cluster will
|
1442
|
+
# become primary after failover.
|
1443
|
+
#
|
1444
|
+
# @param resource_group_name [String] The name of the resource group within the
|
1445
|
+
# user's subscription. The name is case insensitive.
|
1446
|
+
# @param account_name [String] The name of the storage account within the
|
1447
|
+
# specified resource group. Storage account names must be between 3 and 24
|
1448
|
+
# characters in length and use numbers and lower-case letters only.
|
1449
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1450
|
+
# to the HTTP request.
|
1451
|
+
#
|
1452
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1453
|
+
#
|
1454
|
+
def begin_failover_async(resource_group_name, account_name, custom_headers:nil)
|
1455
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
1456
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
1457
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
1458
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
1459
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
1460
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
|
1461
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
1462
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1463
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
1464
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1465
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
1466
|
+
|
1467
|
+
|
1468
|
+
request_headers = {}
|
1469
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1470
|
+
|
1471
|
+
# Set Headers
|
1472
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1473
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1474
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover'
|
1475
|
+
|
1476
|
+
request_url = @base_url || @client.base_url
|
1477
|
+
|
1478
|
+
options = {
|
1479
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1480
|
+
path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
|
1481
|
+
query_params: {'api-version' => @client.api_version},
|
1482
|
+
headers: request_headers.merge(custom_headers || {}),
|
1483
|
+
base_url: request_url
|
1484
|
+
}
|
1485
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1486
|
+
|
1487
|
+
promise = promise.then do |result|
|
1488
|
+
http_response = result.response
|
1489
|
+
status_code = http_response.status
|
1490
|
+
response_content = http_response.body
|
1491
|
+
unless status_code == 200 || status_code == 202
|
1492
|
+
error_model = JSON.load(response_content)
|
1493
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1497
|
+
|
1498
|
+
result
|
1499
|
+
end
|
1500
|
+
|
1501
|
+
promise.execute
|
1502
|
+
end
|
1503
|
+
|
1339
1504
|
end
|
1340
1505
|
end
|