Class: Azure::ContainerRegistry::Mgmt::V2019_05_01::Registries
- Inherits:
-
Object
- Object
- Azure::ContainerRegistry::Mgmt::V2019_05_01::Registries
- Includes:
- MsRestAzure
- Defined in:
- lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb
Overview
Registries
Instance Attribute Summary collapse
-
#client ⇒ ContainerRegistryManagementClient
readonly
Reference to the ContainerRegistryManagementClient.
Instance Method Summary collapse
-
#begin_create(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Registry
Creates a container registry with the specified parameters.
-
#begin_create_async(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Concurrent::Promise
Creates a container registry with the specified parameters.
-
#begin_create_with_http_info(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a container registry with the specified parameters.
-
#begin_delete(resource_group_name, registry_name, custom_headers: nil) ⇒ Object
Deletes a container registry.
-
#begin_delete_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a container registry.
-
#begin_delete_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a container registry.
-
#begin_import_image(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Object
Copies an image to this container registry from the specified container registry.
-
#begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Copies an image to this container registry from the specified container registry.
-
#begin_import_image_with_http_info(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Copies an image to this container registry from the specified container registry.
-
#begin_update(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Registry
Updates a container registry with the specified parameters.
-
#begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a container registry with the specified parameters.
-
#begin_update_with_http_info(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a container registry with the specified parameters.
-
#check_name_availability(registry_name_check_request, custom_headers: nil) ⇒ RegistryNameStatus
Checks whether the container registry name is available for use.
-
#check_name_availability_async(registry_name_check_request, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the container registry name is available for use.
-
#check_name_availability_with_http_info(registry_name_check_request, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the container registry name is available for use.
-
#create(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Registry
Creates a container registry with the specified parameters.
-
#create_async(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
-
#delete(resource_group_name, registry_name, custom_headers: nil) ⇒ Object
Deletes a container registry.
-
#delete_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
-
#get(resource_group_name, registry_name, custom_headers: nil) ⇒ Registry
Gets the properties of the specified container registry.
-
#get_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the properties of the specified container registry.
-
#get_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the properties of the specified container registry.
-
#import_image(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Object
Copies an image to this container registry from the specified container registry.
-
#import_image_async(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
-
#initialize(client) ⇒ Registries
constructor
Creates and initializes a new instance of the Registries class.
-
#list(custom_headers: nil) ⇒ Array<Registry>
Lists all the container registries under the specified subscription.
-
#list_as_lazy(custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified subscription.
-
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified subscription.
-
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<Registry>
Lists all the container registries under the specified resource group.
-
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified resource group.
-
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified resource group.
-
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified resource group.
-
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified resource group.
-
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified resource group.
-
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified resource group.
-
#list_credentials(resource_group_name, registry_name, custom_headers: nil) ⇒ RegistryListCredentialsResult
Lists the login credentials for the specified container registry.
-
#list_credentials_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists the login credentials for the specified container registry.
-
#list_credentials_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the login credentials for the specified container registry.
-
#list_next(next_page_link, custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified subscription.
-
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified subscription.
-
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified subscription.
-
#list_usages(resource_group_name, registry_name, custom_headers: nil) ⇒ RegistryUsageListResult
Gets the quota usages for the specified container registry.
-
#list_usages_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the quota usages for the specified container registry.
-
#list_usages_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the quota usages for the specified container registry.
-
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified subscription.
-
#regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers: nil) ⇒ RegistryListCredentialsResult
Regenerates one of the login credentials for the specified container registry.
-
#regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Regenerates one of the login credentials for the specified container registry.
-
#regenerate_credential_with_http_info(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerates one of the login credentials for the specified container registry.
-
#update(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Registry
Updates a container registry with the specified parameters.
-
#update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs.
Constructor Details
#initialize(client) ⇒ Registries
Creates and initializes a new instance of the Registries class.
17 18 19 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 17 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ ContainerRegistryManagementClient (readonly)
Returns reference to the ContainerRegistryManagementClient.
22 23 24 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 22 def client @client end |
Instance Method Details
#begin_create(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Registry
Creates a container registry with the specified parameters.
the container registry belongs. will be added to the HTTP request.
1032 1033 1034 1035 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1032 def begin_create(resource_group_name, registry_name, registry, custom_headers:nil) response = begin_create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_create_async(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Concurrent::Promise
Creates a container registry with the specified parameters.
the container registry belongs. to the HTTP request.
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1065 def begin_create_async(resource_group_name, registry_name, registry, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, 'registry is nil' if registry.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() request_content = @client.serialize(request_mapper, registry) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:put, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_create_with_http_info(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Creates a container registry with the specified parameters.
the container registry belongs. will be added to the HTTP request.
1049 1050 1051 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1049 def begin_create_with_http_info(resource_group_name, registry_name, registry, custom_headers:nil) begin_create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers).value! end |
#begin_delete(resource_group_name, registry_name, custom_headers: nil) ⇒ Object
Deletes a container registry.
the container registry belongs. will be added to the HTTP request.
1152 1153 1154 1155 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1152 def begin_delete(resource_group_name, registry_name, custom_headers:nil) response = begin_delete_async(resource_group_name, registry_name, custom_headers:custom_headers).value! nil end |
#begin_delete_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Deletes a container registry.
the container registry belongs. to the HTTP request.
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1183 def begin_delete_async(resource_group_name, registry_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:delete, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 || status_code == 204 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_delete_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Deletes a container registry.
the container registry belongs. will be added to the HTTP request.
1168 1169 1170 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1168 def begin_delete_with_http_info(resource_group_name, registry_name, custom_headers:nil) begin_delete_async(resource_group_name, registry_name, custom_headers:custom_headers).value! end |
#begin_import_image(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Object
Copies an image to this container registry from the specified container registry.
the container registry belongs. to copy and the source container registry. will be added to the HTTP request.
926 927 928 929 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 926 def begin_import_image(resource_group_name, registry_name, parameters, custom_headers:nil) response = begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers).value! nil end |
#begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
Copies an image to this container registry from the specified container registry.
the container registry belongs. to copy and the source container registry. to the HTTP request.
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 963 def begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, 'parameters is nil' if parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::ImportImageParameters.mapper() request_content = @client.serialize(request_mapper, parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 202 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? result end promise.execute end |
#begin_import_image_with_http_info(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Copies an image to this container registry from the specified container registry.
the container registry belongs. to copy and the source container registry. will be added to the HTTP request.
945 946 947 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 945 def begin_import_image_with_http_info(resource_group_name, registry_name, parameters, custom_headers:nil) begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers).value! end |
#begin_update(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Registry
Updates a container registry with the specified parameters.
the container registry belongs. for updating a container registry. will be added to the HTTP request.
1245 1246 1247 1248 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1245 def begin_update(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil) response = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Updates a container registry with the specified parameters.
the container registry belongs. for updating a container registry. to the HTTP request.
1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1280 def begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, 'registry_update_parameters is nil' if registry_update_parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryUpdateParameters.mapper() request_content = @client.serialize(request_mapper, registry_update_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:patch, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 || status_code == 201 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end # Deserialize Response if status_code == 201 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#begin_update_with_http_info(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Updates a container registry with the specified parameters.
the container registry belongs. for updating a container registry. will be added to the HTTP request.
1263 1264 1265 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1263 def begin_update_with_http_info(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil) begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value! end |
#check_name_availability(registry_name_check_request, custom_headers: nil) ⇒ RegistryNameStatus
Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length.
containing information for the availability request. will be added to the HTTP request.
81 82 83 84 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 81 def check_name_availability(registry_name_check_request, custom_headers:nil) response = check_name_availability_async(registry_name_check_request, custom_headers:custom_headers).value! response.body unless response.nil? end |
#check_name_availability_async(registry_name_check_request, custom_headers: nil) ⇒ Concurrent::Promise
Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length.
containing information for the availability request. to the HTTP request.
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 114 def check_name_availability_async(registry_name_check_request, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'registry_name_check_request is nil' if registry_name_check_request.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryNameCheckRequest.mapper() request_content = @client.serialize(request_mapper, registry_name_check_request) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryNameStatus.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#check_name_availability_with_http_info(registry_name_check_request, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length.
containing information for the availability request. will be added to the HTTP request.
98 99 100 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 98 def check_name_availability_with_http_info(registry_name_check_request, custom_headers:nil) check_name_availability_async(registry_name_check_request, custom_headers:custom_headers).value! end |
#create(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Registry
Creates a container registry with the specified parameters.
the container registry belongs. will be added to the HTTP request.
288 289 290 291 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 288 def create(resource_group_name, registry_name, registry, custom_headers:nil) response = create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers).value! response.body unless response.nil? end |
#create_async(resource_group_name, registry_name, registry, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs. will be added to the HTTP request.
response.
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 304 def create_async(resource_group_name, registry_name, registry, custom_headers:nil) # Send request promise = begin_create_async(resource_group_name, registry_name, registry, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#delete(resource_group_name, registry_name, custom_headers: nil) ⇒ Object
Deletes a container registry.
the container registry belongs. will be added to the HTTP request.
331 332 333 334 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 331 def delete(resource_group_name, registry_name, custom_headers:nil) response = delete_async(resource_group_name, registry_name, custom_headers:custom_headers).value! nil end |
#delete_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs. will be added to the HTTP request.
response.
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 346 def delete_async(resource_group_name, registry_name, custom_headers:nil) # Send request promise = begin_delete_async(resource_group_name, registry_name, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#get(resource_group_name, registry_name, custom_headers: nil) ⇒ Registry
Gets the properties of the specified container registry.
the container registry belongs. will be added to the HTTP request.
186 187 188 189 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 186 def get(resource_group_name, registry_name, custom_headers:nil) response = get_async(resource_group_name, registry_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#get_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the properties of the specified container registry.
the container registry belongs. to the HTTP request.
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 217 def get_async(resource_group_name, registry_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#get_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the properties of the specified container registry.
the container registry belongs. will be added to the HTTP request.
202 203 204 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 202 def get_with_http_info(resource_group_name, registry_name, custom_headers:nil) get_async(resource_group_name, registry_name, custom_headers:custom_headers).value! end |
#import_image(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Object
Copies an image to this container registry from the specified container registry.
the container registry belongs. to copy and the source container registry. will be added to the HTTP request.
36 37 38 39 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 36 def import_image(resource_group_name, registry_name, parameters, custom_headers:nil) response = import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers).value! nil end |
#import_image_async(resource_group_name, registry_name, parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs. to copy and the source container registry. will be added to the HTTP request.
response.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 53 def import_image_async(resource_group_name, registry_name, parameters, custom_headers:nil) # Send request promise = begin_import_image_async(resource_group_name, registry_name, parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |
#list(custom_headers: nil) ⇒ Array<Registry>
Lists all the container registries under the specified subscription.
will be added to the HTTP request.
512 513 514 515 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 512 def list(custom_headers:nil) first_page = list_as_lazy(custom_headers:custom_headers) first_page.get_all_items end |
#list_as_lazy(custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified subscription.
will be added to the HTTP request.
response.
1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1568 def list_as_lazy(custom_headers:nil) response = list_async(custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_async(custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified subscription.
to the HTTP request.
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 537 def list_async(custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group(resource_group_name, custom_headers: nil) ⇒ Array<Registry>
Lists all the container registries under the specified resource group.
the container registry belongs. will be added to the HTTP request.
420 421 422 423 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 420 def list_by_resource_group(resource_group_name, custom_headers:nil) first_page = list_by_resource_group_as_lazy(resource_group_name, custom_headers:custom_headers) first_page.get_all_items end |
#list_by_resource_group_as_lazy(resource_group_name, custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified resource group.
the container registry belongs. will be added to the HTTP request.
response.
1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1548 def list_by_resource_group_as_lazy(resource_group_name, custom_headers:nil) response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! unless response.nil? page = response.body page.next_method = Proc.new do |next_page_link| list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers) end page end end |
#list_by_resource_group_async(resource_group_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified resource group.
the container registry belongs. to the HTTP request.
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 449 def list_by_resource_group_async(resource_group_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next(next_page_link, custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified resource group.
to List operation. will be added to the HTTP request.
1367 1368 1369 1370 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1367 def list_by_resource_group_next(next_page_link, custom_headers:nil) response = list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_by_resource_group_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified resource group.
to List operation. to the HTTP request.
1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1396 def list_by_resource_group_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_by_resource_group_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified resource group.
to List operation. will be added to the HTTP request.
1382 1383 1384 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1382 def list_by_resource_group_next_with_http_info(next_page_link, custom_headers:nil) list_by_resource_group_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_by_resource_group_with_http_info(resource_group_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified resource group.
the container registry belongs. will be added to the HTTP request.
435 436 437 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 435 def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil) list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value! end |
#list_credentials(resource_group_name, registry_name, custom_headers: nil) ⇒ RegistryListCredentialsResult
Lists the login credentials for the specified container registry.
the container registry belongs. will be added to the HTTP request.
601 602 603 604 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 601 def list_credentials(resource_group_name, registry_name, custom_headers:nil) response = list_credentials_async(resource_group_name, registry_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_credentials_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Lists the login credentials for the specified container registry.
the container registry belongs. to the HTTP request.
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 632 def list_credentials_async(resource_group_name, registry_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListCredentialsResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_credentials_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists the login credentials for the specified container registry.
the container registry belongs. will be added to the HTTP request.
617 618 619 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 617 def list_credentials_with_http_info(resource_group_name, registry_name, custom_headers:nil) list_credentials_async(resource_group_name, registry_name, custom_headers:custom_headers).value! end |
#list_next(next_page_link, custom_headers: nil) ⇒ RegistryListResult
Lists all the container registries under the specified subscription.
to List operation. will be added to the HTTP request.
1457 1458 1459 1460 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1457 def list_next(next_page_link, custom_headers:nil) response = list_next_async(next_page_link, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_next_async(next_page_link, custom_headers: nil) ⇒ Concurrent::Promise
Lists all the container registries under the specified subscription.
to List operation. to the HTTP request.
1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1486 def list_next_async(next_page_link, custom_headers:nil) fail ArgumentError, 'next_page_link is nil' if next_page_link.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = '{nextLink}' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], skip_encoding_path_params: {'nextLink' => next_page_link}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_next_with_http_info(next_page_link, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified subscription.
to List operation. will be added to the HTTP request.
1472 1473 1474 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 1472 def list_next_with_http_info(next_page_link, custom_headers:nil) list_next_async(next_page_link, custom_headers:custom_headers).value! end |
#list_usages(resource_group_name, registry_name, custom_headers: nil) ⇒ RegistryUsageListResult
Gets the quota usages for the specified container registry.
the container registry belongs. will be added to the HTTP request.
823 824 825 826 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 823 def list_usages(resource_group_name, registry_name, custom_headers:nil) response = list_usages_async(resource_group_name, registry_name, custom_headers:custom_headers).value! response.body unless response.nil? end |
#list_usages_async(resource_group_name, registry_name, custom_headers: nil) ⇒ Concurrent::Promise
Gets the quota usages for the specified container registry.
the container registry belongs. to the HTTP request.
854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 854 def list_usages_async(resource_group_name, registry_name, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:get, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryUsageListResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#list_usages_with_http_info(resource_group_name, registry_name, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Gets the quota usages for the specified container registry.
the container registry belongs. will be added to the HTTP request.
839 840 841 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 839 def list_usages_with_http_info(resource_group_name, registry_name, custom_headers:nil) list_usages_async(resource_group_name, registry_name, custom_headers:custom_headers).value! end |
#list_with_http_info(custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Lists all the container registries under the specified subscription.
will be added to the HTTP request.
525 526 527 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 525 def list_with_http_info(custom_headers:nil) list_async(custom_headers:custom_headers).value! end |
#regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers: nil) ⇒ RegistryListCredentialsResult
Regenerates one of the login credentials for the specified container registry.
the container registry belongs. Specifies name of the password which should be regenerated – password or password2. will be added to the HTTP request.
706 707 708 709 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 706 def regenerate_credential(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil) response = regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers: nil) ⇒ Concurrent::Promise
Regenerates one of the login credentials for the specified container registry.
the container registry belongs. Specifies name of the password which should be regenerated – password or password2. to the HTTP request.
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 745 def regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil) fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil? fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil? fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil? fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1 fail ArgumentError, 'registry_name is nil' if registry_name.nil? fail ArgumentError, "'registry_name' should satisfy the constraint - 'MaxLength': '50'" if !registry_name.nil? && registry_name.length > 50 fail ArgumentError, "'registry_name' should satisfy the constraint - 'MinLength': '5'" if !registry_name.nil? && registry_name.length < 5 fail ArgumentError, "'registry_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]*$'" if !registry_name.nil? && registry_name.match(Regexp.new('^^[a-zA-Z0-9]*$$')).nil? fail ArgumentError, 'regenerate_credential_parameters is nil' if regenerate_credential_parameters.nil? request_headers = {} request_headers['Content-Type'] = 'application/json; charset=utf-8' # Set Headers request_headers['x-ms-client-request-id'] = SecureRandom.uuid request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil? # Serialize Request request_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegenerateCredentialParameters.mapper() request_content = @client.serialize(request_mapper, regenerate_credential_parameters) request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential' request_url = @base_url || @client.base_url = { middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]], path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'registryName' => registry_name}, query_params: {'api-version' => @client.api_version}, body: request_content, headers: request_headers.merge(custom_headers || {}), base_url: request_url } promise = @client.make_request_async(:post, path_template, ) promise = promise.then do |result| http_response = result.response status_code = http_response.status response_content = http_response.body unless status_code == 200 error_model = JSON.load(response_content) fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model) end result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil? result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil? result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil? # Deserialize Response if status_code == 200 begin parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content) result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::RegistryListCredentialsResult.mapper() result.body = @client.deserialize(result_mapper, parsed_response) rescue Exception => e fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e., e.backtrace, result) end end result end promise.execute end |
#regenerate_credential_with_http_info(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers: nil) ⇒ MsRestAzure::AzureOperationResponse
Regenerates one of the login credentials for the specified container registry.
the container registry belongs. Specifies name of the password which should be regenerated – password or password2. will be added to the HTTP request.
726 727 728 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 726 def regenerate_credential_with_http_info(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:nil) regenerate_credential_async(resource_group_name, registry_name, regenerate_credential_parameters, custom_headers:custom_headers).value! end |
#update(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Registry
Updates a container registry with the specified parameters.
the container registry belongs. for updating a container registry. will be added to the HTTP request.
375 376 377 378 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 375 def update(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil) response = update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers).value! response.body unless response.nil? end |
#update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers: nil) ⇒ Concurrent::Promise
the container registry belongs. for updating a container registry. will be added to the HTTP request.
response.
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/2019-05-01/generated/azure_mgmt_container_registry/registries.rb', line 392 def update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:nil) # Send request promise = begin_update_async(resource_group_name, registry_name, registry_update_parameters, custom_headers:custom_headers) promise = promise.then do |response| # Defining deserialization method. deserialize_method = lambda do |parsed_response| result_mapper = Azure::ContainerRegistry::Mgmt::V2019_05_01::Models::Registry.mapper() parsed_response = @client.deserialize(result_mapper, parsed_response) end # Waiting for response. @client.get_long_running_operation_result(response, deserialize_method) end promise end |