azure_mgmt_storage 0.19.2 → 0.19.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  3. data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  4. data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  5. data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  6. data/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  7. data/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  8. data/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  9. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  10. data/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  11. data/lib/2018-11-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  12. data/lib/2019-04-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  13. data/lib/2019-06-01/generated/azure_mgmt_storage.rb +45 -39
  14. data/lib/2019-06-01/generated/azure_mgmt_storage/encryption_scopes.rb +691 -0
  15. data/lib/2019-06-01/generated/azure_mgmt_storage/models/blob_service_properties.rb +25 -1
  16. data/lib/2019-06-01/generated/azure_mgmt_storage/models/encryption_scope.rb +129 -0
  17. data/lib/2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_key_vault_properties.rb +51 -0
  18. data/lib/2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_list_result.rb +103 -0
  19. data/lib/2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_source.rb +16 -0
  20. data/lib/2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_state.rb +16 -0
  21. data/lib/2019-06-01/generated/azure_mgmt_storage/models/immutability_policy.rb +17 -1
  22. data/lib/2019-06-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb +17 -1
  23. data/lib/2019-06-01/generated/azure_mgmt_storage/storage_management_client.rb +5 -1
  24. data/lib/profiles/latest/modules/storage_profile_module.rb +153 -131
  25. data/lib/version.rb +1 -1
  26. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4a5c232f7ecedbf446952a98f1941c8f4235c2341e38484bccc5d3be61f292d
4
- data.tar.gz: 257c3142947d951e60ec5805d6917ad2f05de8001f0d31efe8bb9ffbb2df8b7a
3
+ metadata.gz: a8af8c5a7b5924be1d5f99660dae4c590b0c2cbf1756023a00d02a7d9b41df68
4
+ data.tar.gz: 072fd80109ecdf75e02eb1d07251cdd982e8732587a7d2effbf679beca4a37bb
5
5
  SHA512:
6
- metadata.gz: bc81968b7e9dc68d689e4f5ca7853ba012fb467c2d2876d6337ccb80c585f245a50632fa020b71b3f7ba88dd72e0dd9477fae8afd7600af5bb5930690eb79935
7
- data.tar.gz: 87854776c9c4d744fc936c60949085f550ae64cd7ea23ce0cfa5478960bf0ff376c643130e84a58a5ec75bdc042fbcdbd89212b970037762f6741c2e5e6f00bd
6
+ metadata.gz: 4793f20c7fe81b4e80ecde946004a4d862636a9cc340ac0f292e7e30223b47ec84df91c5ee0552c44125b15d3c5ee6a788a52bc7957dc86dac9782ecb0c61d6f
7
+ data.tar.gz: 90dc0a4927d4b2d5aba5861b32799f70c44346a9c4410472c09485108d0c9fa54f98a627176275342f8edcac535ab6e0b26bcab904f414b6b8bf16973f45f807
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2015_05_01_preview
130
130
  #
131
131
  def add_telemetry
132
132
  sdk_information = 'azure_mgmt_storage'
133
- sdk_information = "#{sdk_information}/0.19.2"
133
+ sdk_information = "#{sdk_information}/0.19.3"
134
134
  add_user_agent_information(sdk_information)
135
135
  end
136
136
  end
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2015_06_15
130
130
  #
131
131
  def add_telemetry
132
132
  sdk_information = 'azure_mgmt_storage'
133
- sdk_information = "#{sdk_information}/0.19.2"
133
+ sdk_information = "#{sdk_information}/0.19.3"
134
134
  add_user_agent_information(sdk_information)
135
135
  end
136
136
  end
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2016_01_01
130
130
  #
131
131
  def add_telemetry
132
132
  sdk_information = 'azure_mgmt_storage'
133
- sdk_information = "#{sdk_information}/0.19.2"
133
+ sdk_information = "#{sdk_information}/0.19.3"
134
134
  add_user_agent_information(sdk_information)
135
135
  end
136
136
  end
@@ -130,7 +130,7 @@ module Azure::Storage::Mgmt::V2016_12_01
130
130
  #
131
131
  def add_telemetry
132
132
  sdk_information = 'azure_mgmt_storage'
133
- sdk_information = "#{sdk_information}/0.19.2"
133
+ sdk_information = "#{sdk_information}/0.19.3"
134
134
  add_user_agent_information(sdk_information)
135
135
  end
136
136
  end
@@ -138,7 +138,7 @@ module Azure::Storage::Mgmt::V2017_06_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_storage'
141
- sdk_information = "#{sdk_information}/0.19.2"
141
+ sdk_information = "#{sdk_information}/0.19.3"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -138,7 +138,7 @@ module Azure::Storage::Mgmt::V2017_10_01
138
138
  #
139
139
  def add_telemetry
140
140
  sdk_information = 'azure_mgmt_storage'
141
- sdk_information = "#{sdk_information}/0.19.2"
141
+ sdk_information = "#{sdk_information}/0.19.3"
142
142
  add_user_agent_information(sdk_information)
143
143
  end
144
144
  end
@@ -140,7 +140,7 @@ module Azure::Storage::Mgmt::V2018_02_01
140
140
  #
141
141
  def add_telemetry
142
142
  sdk_information = 'azure_mgmt_storage'
143
- sdk_information = "#{sdk_information}/0.19.2"
143
+ sdk_information = "#{sdk_information}/0.19.3"
144
144
  add_user_agent_information(sdk_information)
145
145
  end
146
146
  end
@@ -140,7 +140,7 @@ module Azure::Storage::Mgmt::V2018_03_01_preview
140
140
  #
141
141
  def add_telemetry
142
142
  sdk_information = 'azure_mgmt_storage'
143
- sdk_information = "#{sdk_information}/0.19.2"
143
+ sdk_information = "#{sdk_information}/0.19.3"
144
144
  add_user_agent_information(sdk_information)
145
145
  end
146
146
  end
@@ -144,7 +144,7 @@ module Azure::Storage::Mgmt::V2018_07_01
144
144
  #
145
145
  def add_telemetry
146
146
  sdk_information = 'azure_mgmt_storage'
147
- sdk_information = "#{sdk_information}/0.19.2"
147
+ sdk_information = "#{sdk_information}/0.19.3"
148
148
  add_user_agent_information(sdk_information)
149
149
  end
150
150
  end
@@ -148,7 +148,7 @@ module Azure::Storage::Mgmt::V2018_11_01
148
148
  #
149
149
  def add_telemetry
150
150
  sdk_information = 'azure_mgmt_storage'
151
- sdk_information = "#{sdk_information}/0.19.2"
151
+ sdk_information = "#{sdk_information}/0.19.3"
152
152
  add_user_agent_information(sdk_information)
153
153
  end
154
154
  end
@@ -156,7 +156,7 @@ module Azure::Storage::Mgmt::V2019_04_01
156
156
  #
157
157
  def add_telemetry
158
158
  sdk_information = 'azure_mgmt_storage'
159
- sdk_information = "#{sdk_information}/0.19.2"
159
+ sdk_information = "#{sdk_information}/0.19.3"
160
160
  add_user_agent_information(sdk_information)
161
161
  end
162
162
  end
@@ -27,6 +27,7 @@ module Azure::Storage::Mgmt::V2019_06_01
27
27
  autoload :ManagementPolicies, '2019-06-01/generated/azure_mgmt_storage/management_policies.rb'
28
28
  autoload :PrivateEndpointConnections, '2019-06-01/generated/azure_mgmt_storage/private_endpoint_connections.rb'
29
29
  autoload :PrivateLinkResources, '2019-06-01/generated/azure_mgmt_storage/private_link_resources.rb'
30
+ autoload :EncryptionScopes, '2019-06-01/generated/azure_mgmt_storage/encryption_scopes.rb'
30
31
  autoload :BlobServices, '2019-06-01/generated/azure_mgmt_storage/blob_services.rb'
31
32
  autoload :BlobContainers, '2019-06-01/generated/azure_mgmt_storage/blob_containers.rb'
32
33
  autoload :FileServices, '2019-06-01/generated/azure_mgmt_storage/file_services.rb'
@@ -34,85 +35,88 @@ module Azure::Storage::Mgmt::V2019_06_01
34
35
  autoload :StorageManagementClient, '2019-06-01/generated/azure_mgmt_storage/storage_management_client.rb'
35
36
 
36
37
  module Models
37
- autoload :AccountSasParameters, '2019-06-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb'
38
- autoload :OperationDisplay, '2019-06-01/generated/azure_mgmt_storage/models/operation_display.rb'
39
38
  autoload :ListAccountSasResponse, '2019-06-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb'
40
- autoload :MetricSpecification, '2019-06-01/generated/azure_mgmt_storage/models/metric_specification.rb'
41
39
  autoload :ServiceSasParameters, '2019-06-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb'
42
- autoload :Operation, '2019-06-01/generated/azure_mgmt_storage/models/operation.rb'
40
+ autoload :Dimension, '2019-06-01/generated/azure_mgmt_storage/models/dimension.rb'
43
41
  autoload :ListServiceSasResponse, '2019-06-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb'
44
- autoload :StorageAccountCheckNameAvailabilityParameters, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb'
42
+ autoload :ServiceSpecification, '2019-06-01/generated/azure_mgmt_storage/models/service_specification.rb'
45
43
  autoload :DateAfterModification, '2019-06-01/generated/azure_mgmt_storage/models/date_after_modification.rb'
46
- autoload :Restriction, '2019-06-01/generated/azure_mgmt_storage/models/restriction.rb'
44
+ autoload :OperationListResult, '2019-06-01/generated/azure_mgmt_storage/models/operation_list_result.rb'
47
45
  autoload :ManagementPolicyBaseBlob, '2019-06-01/generated/azure_mgmt_storage/models/management_policy_base_blob.rb'
48
- autoload :StorageSkuListResult, '2019-06-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb'
46
+ autoload :SKUCapability, '2019-06-01/generated/azure_mgmt_storage/models/skucapability.rb'
49
47
  autoload :DateAfterCreation, '2019-06-01/generated/azure_mgmt_storage/models/date_after_creation.rb'
50
- autoload :CustomDomain, '2019-06-01/generated/azure_mgmt_storage/models/custom_domain.rb'
48
+ autoload :SkuInformation, '2019-06-01/generated/azure_mgmt_storage/models/sku_information.rb'
51
49
  autoload :ManagementPolicySnapShot, '2019-06-01/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb'
52
- autoload :EncryptionServices, '2019-06-01/generated/azure_mgmt_storage/models/encryption_services.rb'
50
+ autoload :CheckNameAvailabilityResult, '2019-06-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb'
53
51
  autoload :ManagementPolicyAction, '2019-06-01/generated/azure_mgmt_storage/models/management_policy_action.rb'
54
- autoload :Encryption, '2019-06-01/generated/azure_mgmt_storage/models/encryption.rb'
52
+ autoload :EncryptionService, '2019-06-01/generated/azure_mgmt_storage/models/encryption_service.rb'
55
53
  autoload :ManagementPolicyFilter, '2019-06-01/generated/azure_mgmt_storage/models/management_policy_filter.rb'
56
- autoload :IPRule, '2019-06-01/generated/azure_mgmt_storage/models/iprule.rb'
54
+ autoload :KeyVaultProperties, '2019-06-01/generated/azure_mgmt_storage/models/key_vault_properties.rb'
57
55
  autoload :ManagementPolicyDefinition, '2019-06-01/generated/azure_mgmt_storage/models/management_policy_definition.rb'
58
- autoload :ActiveDirectoryProperties, '2019-06-01/generated/azure_mgmt_storage/models/active_directory_properties.rb'
56
+ autoload :VirtualNetworkRule, '2019-06-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb'
59
57
  autoload :ManagementPolicyRule, '2019-06-01/generated/azure_mgmt_storage/models/management_policy_rule.rb'
60
- autoload :RoutingPreference, '2019-06-01/generated/azure_mgmt_storage/models/routing_preference.rb'
58
+ autoload :NetworkRuleSet, '2019-06-01/generated/azure_mgmt_storage/models/network_rule_set.rb'
61
59
  autoload :ManagementPolicySchema, '2019-06-01/generated/azure_mgmt_storage/models/management_policy_schema.rb'
60
+ autoload :AzureFilesIdentityBasedAuthentication, '2019-06-01/generated/azure_mgmt_storage/models/azure_files_identity_based_authentication.rb'
61
+ autoload :StorageSkuListResult, '2019-06-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb'
62
+ autoload :CustomDomain, '2019-06-01/generated/azure_mgmt_storage/models/custom_domain.rb'
62
63
  autoload :Sku, '2019-06-01/generated/azure_mgmt_storage/models/sku.rb'
63
- autoload :KeyVaultProperties, '2019-06-01/generated/azure_mgmt_storage/models/key_vault_properties.rb'
64
+ autoload :EncryptionServices, '2019-06-01/generated/azure_mgmt_storage/models/encryption_services.rb'
64
65
  autoload :StorageAccountMicrosoftEndpoints, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_microsoft_endpoints.rb'
65
- autoload :VirtualNetworkRule, '2019-06-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb'
66
+ autoload :Encryption, '2019-06-01/generated/azure_mgmt_storage/models/encryption.rb'
66
67
  autoload :Endpoints, '2019-06-01/generated/azure_mgmt_storage/models/endpoints.rb'
67
- autoload :NetworkRuleSet, '2019-06-01/generated/azure_mgmt_storage/models/network_rule_set.rb'
68
+ autoload :IPRule, '2019-06-01/generated/azure_mgmt_storage/models/iprule.rb'
68
69
  autoload :BlobRestoreRange, '2019-06-01/generated/azure_mgmt_storage/models/blob_restore_range.rb'
69
- autoload :AzureFilesIdentityBasedAuthentication, '2019-06-01/generated/azure_mgmt_storage/models/azure_files_identity_based_authentication.rb'
70
+ autoload :ActiveDirectoryProperties, '2019-06-01/generated/azure_mgmt_storage/models/active_directory_properties.rb'
70
71
  autoload :BlobRestoreStatus, '2019-06-01/generated/azure_mgmt_storage/models/blob_restore_status.rb'
71
- autoload :Identity, '2019-06-01/generated/azure_mgmt_storage/models/identity.rb'
72
+ autoload :RoutingPreference, '2019-06-01/generated/azure_mgmt_storage/models/routing_preference.rb'
72
73
  autoload :PrivateLinkServiceConnectionState, '2019-06-01/generated/azure_mgmt_storage/models/private_link_service_connection_state.rb'
73
- autoload :StorageAccountCreateParameters, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb'
74
- autoload :ChangeFeed, '2019-06-01/generated/azure_mgmt_storage/models/change_feed.rb'
74
+ autoload :DeleteRetentionPolicy, '2019-06-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb'
75
75
  autoload :StorageAccountKey, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_key.rb'
76
76
  autoload :StorageAccountListKeysResult, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb'
77
- autoload :StorageAccountUpdateParameters, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb'
78
77
  autoload :PrivateLinkResourceListResult, '2019-06-01/generated/azure_mgmt_storage/models/private_link_resource_list_result.rb'
78
+ autoload :StorageAccountUpdateParameters, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb'
79
+ autoload :EncryptionScopeKeyVaultProperties, '2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_key_vault_properties.rb'
79
80
  autoload :Usage, '2019-06-01/generated/azure_mgmt_storage/models/usage.rb'
80
- autoload :ErrorResponse, '2019-06-01/generated/azure_mgmt_storage/models/error_response.rb'
81
- autoload :Dimension, '2019-06-01/generated/azure_mgmt_storage/models/dimension.rb'
82
81
  autoload :FileShareItems, '2019-06-01/generated/azure_mgmt_storage/models/file_share_items.rb'
83
- autoload :OperationListResult, '2019-06-01/generated/azure_mgmt_storage/models/operation_list_result.rb'
82
+ autoload :AccountSasParameters, '2019-06-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb'
83
+ autoload :EncryptionScopeListResult, '2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_list_result.rb'
84
+ autoload :MetricSpecification, '2019-06-01/generated/azure_mgmt_storage/models/metric_specification.rb'
85
+ autoload :ErrorResponse, '2019-06-01/generated/azure_mgmt_storage/models/error_response.rb'
86
+ autoload :StorageAccountCheckNameAvailabilityParameters, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb'
84
87
  autoload :FileServiceItems, '2019-06-01/generated/azure_mgmt_storage/models/file_service_items.rb'
85
- autoload :SkuInformation, '2019-06-01/generated/azure_mgmt_storage/models/sku_information.rb'
88
+ autoload :Identity, '2019-06-01/generated/azure_mgmt_storage/models/identity.rb'
86
89
  autoload :LeaseContainerResponse, '2019-06-01/generated/azure_mgmt_storage/models/lease_container_response.rb'
87
- autoload :EncryptionService, '2019-06-01/generated/azure_mgmt_storage/models/encryption_service.rb'
90
+ autoload :StorageAccountInternetEndpoints, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_internet_endpoints.rb'
91
+ autoload :LeaseContainerRequest, '2019-06-01/generated/azure_mgmt_storage/models/lease_container_request.rb'
92
+ autoload :BlobRestoreParameters, '2019-06-01/generated/azure_mgmt_storage/models/blob_restore_parameters.rb'
88
93
  autoload :Resource, '2019-06-01/generated/azure_mgmt_storage/models/resource.rb'
89
- autoload :GeoReplicationStats, '2019-06-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb'
94
+ autoload :CorsRules, '2019-06-01/generated/azure_mgmt_storage/models/cors_rules.rb'
95
+ autoload :StorageAccountListResult, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb'
90
96
  autoload :UpdateHistoryProperty, '2019-06-01/generated/azure_mgmt_storage/models/update_history_property.rb'
91
- autoload :PrivateEndpoint, '2019-06-01/generated/azure_mgmt_storage/models/private_endpoint.rb'
97
+ autoload :UsageName, '2019-06-01/generated/azure_mgmt_storage/models/usage_name.rb'
92
98
  autoload :ImmutabilityPolicyProperties, '2019-06-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb'
93
- autoload :StorageAccountListResult, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb'
99
+ autoload :OperationDisplay, '2019-06-01/generated/azure_mgmt_storage/models/operation_display.rb'
94
100
  autoload :TagProperty, '2019-06-01/generated/azure_mgmt_storage/models/tag_property.rb'
95
- autoload :UsageName, '2019-06-01/generated/azure_mgmt_storage/models/usage_name.rb'
101
+ autoload :Restriction, '2019-06-01/generated/azure_mgmt_storage/models/restriction.rb'
96
102
  autoload :LegalHoldProperties, '2019-06-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb'
97
- autoload :ServiceSpecification, '2019-06-01/generated/azure_mgmt_storage/models/service_specification.rb'
98
- autoload :LeaseContainerRequest, '2019-06-01/generated/azure_mgmt_storage/models/lease_container_request.rb'
99
- autoload :CheckNameAvailabilityResult, '2019-06-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb'
103
+ autoload :GeoReplicationStats, '2019-06-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb'
100
104
  autoload :BlobServiceItems, '2019-06-01/generated/azure_mgmt_storage/models/blob_service_items.rb'
101
- autoload :BlobRestoreParameters, '2019-06-01/generated/azure_mgmt_storage/models/blob_restore_parameters.rb'
102
- autoload :LegalHold, '2019-06-01/generated/azure_mgmt_storage/models/legal_hold.rb'
103
105
  autoload :StorageAccountRegenerateKeyParameters, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb'
104
106
  autoload :RestorePolicyProperties, '2019-06-01/generated/azure_mgmt_storage/models/restore_policy_properties.rb'
105
- autoload :SKUCapability, '2019-06-01/generated/azure_mgmt_storage/models/skucapability.rb'
107
+ autoload :Operation, '2019-06-01/generated/azure_mgmt_storage/models/operation.rb'
108
+ autoload :LegalHold, '2019-06-01/generated/azure_mgmt_storage/models/legal_hold.rb'
109
+ autoload :PrivateEndpoint, '2019-06-01/generated/azure_mgmt_storage/models/private_endpoint.rb'
110
+ autoload :ChangeFeed, '2019-06-01/generated/azure_mgmt_storage/models/change_feed.rb'
111
+ autoload :StorageAccountCreateParameters, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb'
106
112
  autoload :ListContainerItems, '2019-06-01/generated/azure_mgmt_storage/models/list_container_items.rb'
107
- autoload :DeleteRetentionPolicy, '2019-06-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb'
108
113
  autoload :UsageListResult, '2019-06-01/generated/azure_mgmt_storage/models/usage_list_result.rb'
109
114
  autoload :CorsRule, '2019-06-01/generated/azure_mgmt_storage/models/cors_rule.rb'
110
- autoload :StorageAccountInternetEndpoints, '2019-06-01/generated/azure_mgmt_storage/models/storage_account_internet_endpoints.rb'
111
- autoload :CorsRules, '2019-06-01/generated/azure_mgmt_storage/models/cors_rules.rb'
112
115
  autoload :PrivateEndpointConnection, '2019-06-01/generated/azure_mgmt_storage/models/private_endpoint_connection.rb'
113
116
  autoload :StorageAccount, '2019-06-01/generated/azure_mgmt_storage/models/storage_account.rb'
114
117
  autoload :ManagementPolicy, '2019-06-01/generated/azure_mgmt_storage/models/management_policy.rb'
115
118
  autoload :PrivateLinkResource, '2019-06-01/generated/azure_mgmt_storage/models/private_link_resource.rb'
119
+ autoload :EncryptionScope, '2019-06-01/generated/azure_mgmt_storage/models/encryption_scope.rb'
116
120
  autoload :ProxyResource, '2019-06-01/generated/azure_mgmt_storage/models/proxy_resource.rb'
117
121
  autoload :TrackedResource, '2019-06-01/generated/azure_mgmt_storage/models/tracked_resource.rb'
118
122
  autoload :AzureEntityResource, '2019-06-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb'
@@ -151,6 +155,8 @@ module Azure::Storage::Mgmt::V2019_06_01
151
155
  autoload :Permissions, '2019-06-01/generated/azure_mgmt_storage/models/permissions.rb'
152
156
  autoload :HttpProtocol, '2019-06-01/generated/azure_mgmt_storage/models/http_protocol.rb'
153
157
  autoload :SignedResource, '2019-06-01/generated/azure_mgmt_storage/models/signed_resource.rb'
158
+ autoload :EncryptionScopeSource, '2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_source.rb'
159
+ autoload :EncryptionScopeState, '2019-06-01/generated/azure_mgmt_storage/models/encryption_scope_state.rb'
154
160
  autoload :PublicAccess, '2019-06-01/generated/azure_mgmt_storage/models/public_access.rb'
155
161
  autoload :LeaseStatus, '2019-06-01/generated/azure_mgmt_storage/models/lease_status.rb'
156
162
  autoload :LeaseState, '2019-06-01/generated/azure_mgmt_storage/models/lease_state.rb'
@@ -0,0 +1,691 @@
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::V2019_06_01
7
+ #
8
+ # The Azure Storage Management API.
9
+ #
10
+ class EncryptionScopes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the EncryptionScopes class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StorageManagementClient] reference to the StorageManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Synchronously creates or updates an encryption scope under the specified
26
+ # storage account. If an encryption scope is already created and a subsequent
27
+ # request is issued with different properties, the encryption scope properties
28
+ # will be updated per the specified request.
29
+ #
30
+ # @param resource_group_name [String] The name of the resource group within the
31
+ # user's subscription. The name is case insensitive.
32
+ # @param account_name [String] The name of the storage account within the
33
+ # specified resource group. Storage account names must be between 3 and 24
34
+ # characters in length and use numbers and lower-case letters only.
35
+ # @param encryption_scope_name [String] The name of the encryption scope within
36
+ # the specified storage account. Encryption scope names must be between 3 and
37
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
38
+ # only. Every dash (-) character must be immediately preceded and followed by a
39
+ # letter or number.
40
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
41
+ # used for the create or update.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [EncryptionScope] operation results.
46
+ #
47
+ def put(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
48
+ response = put_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
49
+ response.body unless response.nil?
50
+ end
51
+
52
+ #
53
+ # Synchronously creates or updates an encryption scope under the specified
54
+ # storage account. If an encryption scope is already created and a subsequent
55
+ # request is issued with different properties, the encryption scope properties
56
+ # will be updated per the specified request.
57
+ #
58
+ # @param resource_group_name [String] The name of the resource group within the
59
+ # user's subscription. The name is case insensitive.
60
+ # @param account_name [String] The name of the storage account within the
61
+ # specified resource group. Storage account names must be between 3 and 24
62
+ # characters in length and use numbers and lower-case letters only.
63
+ # @param encryption_scope_name [String] The name of the encryption scope within
64
+ # the specified storage account. Encryption scope names must be between 3 and
65
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
66
+ # only. Every dash (-) character must be immediately preceded and followed by a
67
+ # letter or number.
68
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
69
+ # used for the create or update.
70
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
71
+ # will be added to the HTTP request.
72
+ #
73
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
74
+ #
75
+ def put_with_http_info(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
76
+ put_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
77
+ end
78
+
79
+ #
80
+ # Synchronously creates or updates an encryption scope under the specified
81
+ # storage account. If an encryption scope is already created and a subsequent
82
+ # request is issued with different properties, the encryption scope properties
83
+ # will be updated per the specified request.
84
+ #
85
+ # @param resource_group_name [String] The name of the resource group within the
86
+ # user's subscription. The name is case insensitive.
87
+ # @param account_name [String] The name of the storage account within the
88
+ # specified resource group. Storage account names must be between 3 and 24
89
+ # characters in length and use numbers and lower-case letters only.
90
+ # @param encryption_scope_name [String] The name of the encryption scope within
91
+ # the specified storage account. Encryption scope names must be between 3 and
92
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
93
+ # only. Every dash (-) character must be immediately preceded and followed by a
94
+ # letter or number.
95
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
96
+ # used for the create or update.
97
+ # @param [Hash{String => String}] A hash of custom headers that will be added
98
+ # to the HTTP request.
99
+ #
100
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
101
+ #
102
+ def put_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
103
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
104
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
105
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
106
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
107
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
108
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
109
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
110
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
111
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
112
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
113
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
114
+ fail ArgumentError, 'encryption_scope_name is nil' if encryption_scope_name.nil?
115
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MaxLength': '63'" if !encryption_scope_name.nil? && encryption_scope_name.length > 63
116
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MinLength': '3'" if !encryption_scope_name.nil? && encryption_scope_name.length < 3
117
+ fail ArgumentError, 'encryption_scope is nil' if encryption_scope.nil?
118
+
119
+
120
+ request_headers = {}
121
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
122
+
123
+ # Set Headers
124
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
125
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
126
+
127
+ # Serialize Request
128
+ request_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScope.mapper()
129
+ request_content = @client.serialize(request_mapper, encryption_scope)
130
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
131
+
132
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}'
133
+
134
+ request_url = @base_url || @client.base_url
135
+
136
+ options = {
137
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
138
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'encryptionScopeName' => encryption_scope_name},
139
+ query_params: {'api-version' => @client.api_version},
140
+ body: request_content,
141
+ headers: request_headers.merge(custom_headers || {}),
142
+ base_url: request_url
143
+ }
144
+ promise = @client.make_request_async(:put, path_template, options)
145
+
146
+ promise = promise.then do |result|
147
+ http_response = result.response
148
+ status_code = http_response.status
149
+ response_content = http_response.body
150
+ unless status_code == 201 || status_code == 200
151
+ error_model = JSON.load(response_content)
152
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
153
+ end
154
+
155
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
156
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
157
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
158
+ # Deserialize Response
159
+ if status_code == 201
160
+ begin
161
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
162
+ result_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScope.mapper()
163
+ result.body = @client.deserialize(result_mapper, parsed_response)
164
+ rescue Exception => e
165
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
166
+ end
167
+ end
168
+ # Deserialize Response
169
+ if status_code == 200
170
+ begin
171
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
172
+ result_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScope.mapper()
173
+ result.body = @client.deserialize(result_mapper, parsed_response)
174
+ rescue Exception => e
175
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
176
+ end
177
+ end
178
+
179
+ result
180
+ end
181
+
182
+ promise.execute
183
+ end
184
+
185
+ #
186
+ # Update encryption scope properties as specified in the request body. Update
187
+ # fails if the specified encryption scope does not already exist.
188
+ #
189
+ # @param resource_group_name [String] The name of the resource group within the
190
+ # user's subscription. The name is case insensitive.
191
+ # @param account_name [String] The name of the storage account within the
192
+ # specified resource group. Storage account names must be between 3 and 24
193
+ # characters in length and use numbers and lower-case letters only.
194
+ # @param encryption_scope_name [String] The name of the encryption scope within
195
+ # the specified storage account. Encryption scope names must be between 3 and
196
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
197
+ # only. Every dash (-) character must be immediately preceded and followed by a
198
+ # letter or number.
199
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
200
+ # used for the update.
201
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
202
+ # will be added to the HTTP request.
203
+ #
204
+ # @return [EncryptionScope] operation results.
205
+ #
206
+ def patch(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
207
+ response = patch_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
208
+ response.body unless response.nil?
209
+ end
210
+
211
+ #
212
+ # Update encryption scope properties as specified in the request body. Update
213
+ # fails if the specified encryption scope does not already exist.
214
+ #
215
+ # @param resource_group_name [String] The name of the resource group within the
216
+ # user's subscription. The name is case insensitive.
217
+ # @param account_name [String] The name of the storage account within the
218
+ # specified resource group. Storage account names must be between 3 and 24
219
+ # characters in length and use numbers and lower-case letters only.
220
+ # @param encryption_scope_name [String] The name of the encryption scope within
221
+ # the specified storage account. Encryption scope names must be between 3 and
222
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
223
+ # only. Every dash (-) character must be immediately preceded and followed by a
224
+ # letter or number.
225
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
226
+ # used for the update.
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
231
+ #
232
+ def patch_with_http_info(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
233
+ patch_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
234
+ end
235
+
236
+ #
237
+ # Update encryption scope properties as specified in the request body. Update
238
+ # fails if the specified encryption scope does not already exist.
239
+ #
240
+ # @param resource_group_name [String] The name of the resource group within the
241
+ # user's subscription. The name is case insensitive.
242
+ # @param account_name [String] The name of the storage account within the
243
+ # specified resource group. Storage account names must be between 3 and 24
244
+ # characters in length and use numbers and lower-case letters only.
245
+ # @param encryption_scope_name [String] The name of the encryption scope within
246
+ # the specified storage account. Encryption scope names must be between 3 and
247
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
248
+ # only. Every dash (-) character must be immediately preceded and followed by a
249
+ # letter or number.
250
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
251
+ # used for the update.
252
+ # @param [Hash{String => String}] A hash of custom headers that will be added
253
+ # to the HTTP request.
254
+ #
255
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
256
+ #
257
+ def patch_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
258
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
259
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
260
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
261
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
262
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
263
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
264
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
265
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
266
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
267
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
268
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
269
+ fail ArgumentError, 'encryption_scope_name is nil' if encryption_scope_name.nil?
270
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MaxLength': '63'" if !encryption_scope_name.nil? && encryption_scope_name.length > 63
271
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MinLength': '3'" if !encryption_scope_name.nil? && encryption_scope_name.length < 3
272
+ fail ArgumentError, 'encryption_scope is nil' if encryption_scope.nil?
273
+
274
+
275
+ request_headers = {}
276
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
277
+
278
+ # Set Headers
279
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
280
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
281
+
282
+ # Serialize Request
283
+ request_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScope.mapper()
284
+ request_content = @client.serialize(request_mapper, encryption_scope)
285
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
286
+
287
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}'
288
+
289
+ request_url = @base_url || @client.base_url
290
+
291
+ options = {
292
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
293
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'encryptionScopeName' => encryption_scope_name},
294
+ query_params: {'api-version' => @client.api_version},
295
+ body: request_content,
296
+ headers: request_headers.merge(custom_headers || {}),
297
+ base_url: request_url
298
+ }
299
+ promise = @client.make_request_async(:patch, path_template, options)
300
+
301
+ promise = promise.then do |result|
302
+ http_response = result.response
303
+ status_code = http_response.status
304
+ response_content = http_response.body
305
+ unless status_code == 200
306
+ error_model = JSON.load(response_content)
307
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
308
+ end
309
+
310
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
311
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
312
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
313
+ # Deserialize Response
314
+ if status_code == 200
315
+ begin
316
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
317
+ result_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScope.mapper()
318
+ result.body = @client.deserialize(result_mapper, parsed_response)
319
+ rescue Exception => e
320
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
321
+ end
322
+ end
323
+
324
+ result
325
+ end
326
+
327
+ promise.execute
328
+ end
329
+
330
+ #
331
+ # Returns the properties for the specified encryption scope.
332
+ #
333
+ # @param resource_group_name [String] The name of the resource group within the
334
+ # user's subscription. The name is case insensitive.
335
+ # @param account_name [String] The name of the storage account within the
336
+ # specified resource group. Storage account names must be between 3 and 24
337
+ # characters in length and use numbers and lower-case letters only.
338
+ # @param encryption_scope_name [String] The name of the encryption scope within
339
+ # the specified storage account. Encryption scope names must be between 3 and
340
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
341
+ # only. Every dash (-) character must be immediately preceded and followed by a
342
+ # letter or number.
343
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
344
+ # will be added to the HTTP request.
345
+ #
346
+ # @return [EncryptionScope] operation results.
347
+ #
348
+ def get(resource_group_name, account_name, encryption_scope_name, custom_headers:nil)
349
+ response = get_async(resource_group_name, account_name, encryption_scope_name, custom_headers:custom_headers).value!
350
+ response.body unless response.nil?
351
+ end
352
+
353
+ #
354
+ # Returns the properties for the specified encryption scope.
355
+ #
356
+ # @param resource_group_name [String] The name of the resource group within the
357
+ # user's subscription. The name is case insensitive.
358
+ # @param account_name [String] The name of the storage account within the
359
+ # specified resource group. Storage account names must be between 3 and 24
360
+ # characters in length and use numbers and lower-case letters only.
361
+ # @param encryption_scope_name [String] The name of the encryption scope within
362
+ # the specified storage account. Encryption scope names must be between 3 and
363
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
364
+ # only. Every dash (-) character must be immediately preceded and followed by a
365
+ # letter or number.
366
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
+ # will be added to the HTTP request.
368
+ #
369
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
370
+ #
371
+ def get_with_http_info(resource_group_name, account_name, encryption_scope_name, custom_headers:nil)
372
+ get_async(resource_group_name, account_name, encryption_scope_name, custom_headers:custom_headers).value!
373
+ end
374
+
375
+ #
376
+ # Returns the properties for the specified encryption scope.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group within the
379
+ # user's subscription. The name is case insensitive.
380
+ # @param account_name [String] The name of the storage account within the
381
+ # specified resource group. Storage account names must be between 3 and 24
382
+ # characters in length and use numbers and lower-case letters only.
383
+ # @param encryption_scope_name [String] The name of the encryption scope within
384
+ # the specified storage account. Encryption scope names must be between 3 and
385
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
386
+ # only. Every dash (-) character must be immediately preceded and followed by a
387
+ # letter or number.
388
+ # @param [Hash{String => String}] A hash of custom headers that will be added
389
+ # to the HTTP request.
390
+ #
391
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
392
+ #
393
+ def get_async(resource_group_name, account_name, encryption_scope_name, custom_headers:nil)
394
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
395
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
396
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
397
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
398
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
399
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
400
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
401
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
402
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
403
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
404
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
405
+ fail ArgumentError, 'encryption_scope_name is nil' if encryption_scope_name.nil?
406
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MaxLength': '63'" if !encryption_scope_name.nil? && encryption_scope_name.length > 63
407
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MinLength': '3'" if !encryption_scope_name.nil? && encryption_scope_name.length < 3
408
+
409
+
410
+ request_headers = {}
411
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
412
+
413
+ # Set Headers
414
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
415
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
416
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}'
417
+
418
+ request_url = @base_url || @client.base_url
419
+
420
+ options = {
421
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
422
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'encryptionScopeName' => encryption_scope_name},
423
+ query_params: {'api-version' => @client.api_version},
424
+ headers: request_headers.merge(custom_headers || {}),
425
+ base_url: request_url
426
+ }
427
+ promise = @client.make_request_async(:get, path_template, options)
428
+
429
+ promise = promise.then do |result|
430
+ http_response = result.response
431
+ status_code = http_response.status
432
+ response_content = http_response.body
433
+ unless status_code == 200
434
+ error_model = JSON.load(response_content)
435
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
436
+ end
437
+
438
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
439
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
440
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
441
+ # Deserialize Response
442
+ if status_code == 200
443
+ begin
444
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
445
+ result_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScope.mapper()
446
+ result.body = @client.deserialize(result_mapper, parsed_response)
447
+ rescue Exception => e
448
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
449
+ end
450
+ end
451
+
452
+ result
453
+ end
454
+
455
+ promise.execute
456
+ end
457
+
458
+ #
459
+ # Lists all the encryption scopes available under the specified storage
460
+ # account.
461
+ #
462
+ # @param resource_group_name [String] The name of the resource group within the
463
+ # user's subscription. The name is case insensitive.
464
+ # @param account_name [String] The name of the storage account within the
465
+ # specified resource group. Storage account names must be between 3 and 24
466
+ # characters in length and use numbers and lower-case letters only.
467
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
468
+ # will be added to the HTTP request.
469
+ #
470
+ # @return [Array<EncryptionScope>] operation results.
471
+ #
472
+ def list(resource_group_name, account_name, custom_headers:nil)
473
+ first_page = list_as_lazy(resource_group_name, account_name, custom_headers:custom_headers)
474
+ first_page.get_all_items
475
+ end
476
+
477
+ #
478
+ # Lists all the encryption scopes available under the specified storage
479
+ # account.
480
+ #
481
+ # @param resource_group_name [String] The name of the resource group within the
482
+ # user's subscription. The name is case insensitive.
483
+ # @param account_name [String] The name of the storage account within the
484
+ # specified resource group. Storage account names must be between 3 and 24
485
+ # characters in length and use numbers and lower-case letters only.
486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
487
+ # will be added to the HTTP request.
488
+ #
489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
490
+ #
491
+ def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
492
+ list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
493
+ end
494
+
495
+ #
496
+ # Lists all the encryption scopes available under the specified storage
497
+ # account.
498
+ #
499
+ # @param resource_group_name [String] The name of the resource group within the
500
+ # user's subscription. The name is case insensitive.
501
+ # @param account_name [String] The name of the storage account within the
502
+ # specified resource group. Storage account names must be between 3 and 24
503
+ # characters in length and use numbers and lower-case letters only.
504
+ # @param [Hash{String => String}] A hash of custom headers that will be added
505
+ # to the HTTP request.
506
+ #
507
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
508
+ #
509
+ def list_async(resource_group_name, account_name, custom_headers:nil)
510
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
511
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
512
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
513
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
514
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
515
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
516
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
517
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
518
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
519
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
520
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
521
+
522
+
523
+ request_headers = {}
524
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
525
+
526
+ # Set Headers
527
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
528
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
529
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes'
530
+
531
+ request_url = @base_url || @client.base_url
532
+
533
+ options = {
534
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
535
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
536
+ query_params: {'api-version' => @client.api_version},
537
+ headers: request_headers.merge(custom_headers || {}),
538
+ base_url: request_url
539
+ }
540
+ promise = @client.make_request_async(:get, path_template, options)
541
+
542
+ promise = promise.then do |result|
543
+ http_response = result.response
544
+ status_code = http_response.status
545
+ response_content = http_response.body
546
+ unless status_code == 200
547
+ error_model = JSON.load(response_content)
548
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
549
+ end
550
+
551
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
552
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
553
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
554
+ # Deserialize Response
555
+ if status_code == 200
556
+ begin
557
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
558
+ result_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScopeListResult.mapper()
559
+ result.body = @client.deserialize(result_mapper, parsed_response)
560
+ rescue Exception => e
561
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
562
+ end
563
+ end
564
+
565
+ result
566
+ end
567
+
568
+ promise.execute
569
+ end
570
+
571
+ #
572
+ # Lists all the encryption scopes available under the specified storage
573
+ # account.
574
+ #
575
+ # @param next_page_link [String] The NextLink from the previous successful call
576
+ # to List operation.
577
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
578
+ # will be added to the HTTP request.
579
+ #
580
+ # @return [EncryptionScopeListResult] operation results.
581
+ #
582
+ def list_next(next_page_link, custom_headers:nil)
583
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
584
+ response.body unless response.nil?
585
+ end
586
+
587
+ #
588
+ # Lists all the encryption scopes available under the specified storage
589
+ # account.
590
+ #
591
+ # @param next_page_link [String] The NextLink from the previous successful call
592
+ # to List operation.
593
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
594
+ # will be added to the HTTP request.
595
+ #
596
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
597
+ #
598
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
599
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
600
+ end
601
+
602
+ #
603
+ # Lists all the encryption scopes available under the specified storage
604
+ # account.
605
+ #
606
+ # @param next_page_link [String] The NextLink from the previous successful call
607
+ # to List operation.
608
+ # @param [Hash{String => String}] A hash of custom headers that will be added
609
+ # to the HTTP request.
610
+ #
611
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
612
+ #
613
+ def list_next_async(next_page_link, custom_headers:nil)
614
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
615
+
616
+
617
+ request_headers = {}
618
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
619
+
620
+ # Set Headers
621
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
622
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
623
+ path_template = '{nextLink}'
624
+
625
+ request_url = @base_url || @client.base_url
626
+
627
+ options = {
628
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
629
+ skip_encoding_path_params: {'nextLink' => next_page_link},
630
+ headers: request_headers.merge(custom_headers || {}),
631
+ base_url: request_url
632
+ }
633
+ promise = @client.make_request_async(:get, path_template, options)
634
+
635
+ promise = promise.then do |result|
636
+ http_response = result.response
637
+ status_code = http_response.status
638
+ response_content = http_response.body
639
+ unless status_code == 200
640
+ error_model = JSON.load(response_content)
641
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
642
+ end
643
+
644
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
645
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
646
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
647
+ # Deserialize Response
648
+ if status_code == 200
649
+ begin
650
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
651
+ result_mapper = Azure::Storage::Mgmt::V2019_06_01::Models::EncryptionScopeListResult.mapper()
652
+ result.body = @client.deserialize(result_mapper, parsed_response)
653
+ rescue Exception => e
654
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
655
+ end
656
+ end
657
+
658
+ result
659
+ end
660
+
661
+ promise.execute
662
+ end
663
+
664
+ #
665
+ # Lists all the encryption scopes available under the specified storage
666
+ # account.
667
+ #
668
+ # @param resource_group_name [String] The name of the resource group within the
669
+ # user's subscription. The name is case insensitive.
670
+ # @param account_name [String] The name of the storage account within the
671
+ # specified resource group. Storage account names must be between 3 and 24
672
+ # characters in length and use numbers and lower-case letters only.
673
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
674
+ # will be added to the HTTP request.
675
+ #
676
+ # @return [EncryptionScopeListResult] which provide lazy access to pages of the
677
+ # response.
678
+ #
679
+ def list_as_lazy(resource_group_name, account_name, custom_headers:nil)
680
+ response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
681
+ unless response.nil?
682
+ page = response.body
683
+ page.next_method = Proc.new do |next_page_link|
684
+ list_next_async(next_page_link, custom_headers:custom_headers)
685
+ end
686
+ page
687
+ end
688
+ end
689
+
690
+ end
691
+ end