azure_mgmt_container_service 0.20.2 → 0.20.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2016-03-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  3. data/lib/2016-09-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  4. data/lib/2017-01-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  5. data/lib/2017-07-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  6. data/lib/2017-08-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  7. data/lib/2017-09-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  8. data/lib/2018-03-31/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  9. data/lib/2018-08-01-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  10. data/lib/2018-09-30-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  11. data/lib/2019-02-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  12. data/lib/2019-04-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  13. data/lib/2019-04-30/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  14. data/lib/2019-06-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  15. data/lib/2019-08-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  16. data/lib/2019-09-30-preview/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  17. data/lib/2019-10-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  18. data/lib/2020-02-01/generated/azure_mgmt_container_service/container_service_client.rb +1 -1
  19. data/lib/2020-06-01/generated/azure_mgmt_container_service.rb +98 -0
  20. data/lib/2020-06-01/generated/azure_mgmt_container_service/agent_pools.rb +900 -0
  21. data/lib/2020-06-01/generated/azure_mgmt_container_service/container_service_client.rb +145 -0
  22. data/lib/2020-06-01/generated/azure_mgmt_container_service/managed_clusters.rb +2043 -0
  23. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool.rb +440 -0
  24. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions.rb +93 -0
  25. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_available_versions_properties_agent_pool_versions_item.rb +71 -0
  26. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_list_result.rb +99 -0
  27. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_mode.rb +16 -0
  28. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_type.rb +16 -0
  29. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile.rb +129 -0
  30. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_profile_properties_upgrades_item.rb +59 -0
  31. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/agent_pool_upgrade_settings.rb +47 -0
  32. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/connection_status.rb +18 -0
  33. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_diagnostics_profile.rb +48 -0
  34. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_linux_profile.rb +62 -0
  35. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_master_profile.rb +188 -0
  36. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_network_profile.rb +179 -0
  37. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_ssh_configuration.rb +57 -0
  38. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_ssh_public_key.rb +48 -0
  39. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_storage_profile_types.rb +16 -0
  40. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_vmdiagnostics.rb +60 -0
  41. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/container_service_vmsize_types.rb +188 -0
  42. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/credential_result.rb +59 -0
  43. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/credential_results.rb +57 -0
  44. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/load_balancer_sku.rb +16 -0
  45. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster.rb +388 -0
  46. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_aadprofile.rb +123 -0
  47. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_access_profile.rb +97 -0
  48. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile.rb +80 -0
  49. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_addon_profile_identity.rb +59 -0
  50. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile.rb +279 -0
  51. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_agent_pool_profile_properties.rb +413 -0
  52. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_apiserver_access_profile.rb +66 -0
  53. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_identity.rb +104 -0
  54. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_identity_user_assigned_identities_value.rb +61 -0
  55. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_list_result.rb +100 -0
  56. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile.rb +132 -0
  57. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_managed_outbound_ips.rb +55 -0
  58. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ipprefixes.rb +57 -0
  59. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_load_balancer_profile_outbound_ips.rb +56 -0
  60. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile.rb +92 -0
  61. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_pool_upgrade_profile_upgrades_item.rb +59 -0
  62. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_auto_scaler_profile.rb +135 -0
  63. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_properties_identity_profile_value.rb +61 -0
  64. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_service_principal_profile.rb +59 -0
  65. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_sku.rb +60 -0
  66. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_skuname.rb +15 -0
  67. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_skutier.rb +16 -0
  68. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_upgrade_profile.rb +105 -0
  69. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/managed_cluster_windows_profile.rb +63 -0
  70. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/network_mode.rb +16 -0
  71. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/network_plugin.rb +16 -0
  72. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/network_policy.rb +16 -0
  73. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/operation_list_result.rb +56 -0
  74. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/operation_value.rb +108 -0
  75. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/ostype.rb +16 -0
  76. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/outbound_type.rb +16 -0
  77. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/private_endpoint.rb +46 -0
  78. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/private_endpoint_connection.rb +111 -0
  79. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_list_result.rb +55 -0
  80. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/private_endpoint_connection_provisioning_state.rb +18 -0
  81. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/private_link_service_connection_state.rb +59 -0
  82. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/resource.rb +110 -0
  83. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/resource_identity_type.rb +17 -0
  84. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/resource_reference.rb +46 -0
  85. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/scale_set_eviction_policy.rb +16 -0
  86. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/scale_set_priority.rb +16 -0
  87. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/sub_resource.rb +72 -0
  88. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/tags_object.rb +54 -0
  89. data/lib/2020-06-01/generated/azure_mgmt_container_service/models/user_assigned_identity.rb +69 -0
  90. data/lib/2020-06-01/generated/azure_mgmt_container_service/module_definition.rb +9 -0
  91. data/lib/2020-06-01/generated/azure_mgmt_container_service/operations.rb +109 -0
  92. data/lib/2020-06-01/generated/azure_mgmt_container_service/private_endpoint_connections.rb +515 -0
  93. data/lib/azure_mgmt_container_service.rb +1 -0
  94. data/lib/profiles/latest/modules/containerservice_profile_module.rb +189 -139
  95. data/lib/version.rb +1 -1
  96. metadata +76 -2
@@ -0,0 +1,46 @@
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::ContainerService::Mgmt::V2020_06_01
7
+ module Models
8
+ #
9
+ # A reference to an Azure resource.
10
+ #
11
+ class ResourceReference
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The fully qualified Azure resource id.
16
+ attr_accessor :id
17
+
18
+
19
+ #
20
+ # Mapper for ResourceReference class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'ResourceReference',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'ResourceReference',
31
+ model_properties: {
32
+ id: {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'id',
36
+ type: {
37
+ name: 'String'
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerService::Mgmt::V2020_06_01
7
+ module Models
8
+ #
9
+ # Defines values for ScaleSetEvictionPolicy
10
+ #
11
+ module ScaleSetEvictionPolicy
12
+ Delete = "Delete"
13
+ Deallocate = "Deallocate"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerService::Mgmt::V2020_06_01
7
+ module Models
8
+ #
9
+ # Defines values for ScaleSetPriority
10
+ #
11
+ module ScaleSetPriority
12
+ Spot = "Spot"
13
+ Regular = "Regular"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,72 @@
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::ContainerService::Mgmt::V2020_06_01
7
+ module Models
8
+ #
9
+ # Reference to another subresource.
10
+ #
11
+ class SubResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Resource ID.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The name of the resource that is unique within a
19
+ # resource group. This name can be used to access the resource.
20
+ attr_accessor :name
21
+
22
+ # @return [String] Resource type
23
+ attr_accessor :type
24
+
25
+
26
+ #
27
+ # Mapper for SubResource class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'SubResource',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'SubResource',
38
+ model_properties: {
39
+ id: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ read_only: true,
43
+ serialized_name: 'id',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ name: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'name',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ type: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'type',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,54 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerService::Mgmt::V2020_06_01
7
+ module Models
8
+ #
9
+ # Tags object for patch operations.
10
+ #
11
+ class TagsObject
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Hash{String => String}] Resource tags.
16
+ attr_accessor :tags
17
+
18
+
19
+ #
20
+ # Mapper for TagsObject class as Ruby Hash.
21
+ # This will be used for serialization/deserialization.
22
+ #
23
+ def self.mapper()
24
+ {
25
+ client_side_validation: true,
26
+ required: false,
27
+ serialized_name: 'TagsObject',
28
+ type: {
29
+ name: 'Composite',
30
+ class_name: 'TagsObject',
31
+ model_properties: {
32
+ tags: {
33
+ client_side_validation: true,
34
+ required: false,
35
+ serialized_name: 'tags',
36
+ type: {
37
+ name: 'Dictionary',
38
+ value: {
39
+ client_side_validation: true,
40
+ required: false,
41
+ serialized_name: 'StringElementType',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,69 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ContainerService::Mgmt::V2020_06_01
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class UserAssignedIdentity
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] The resource id of the user assigned identity.
17
+ attr_accessor :resource_id
18
+
19
+ # @return [String] The client id of the user assigned identity.
20
+ attr_accessor :client_id
21
+
22
+ # @return [String] The object id of the user assigned identity.
23
+ attr_accessor :object_id
24
+
25
+
26
+ #
27
+ # Mapper for UserAssignedIdentity class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'UserAssignedIdentity',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'UserAssignedIdentity',
38
+ model_properties: {
39
+ resource_id: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'resourceId',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ client_id: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'clientId',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ },
55
+ object_id: {
56
+ client_side_validation: true,
57
+ required: false,
58
+ serialized_name: 'objectId',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::ContainerService end
8
+ module Azure::ContainerService::Mgmt end
9
+ module Azure::ContainerService::Mgmt::V2020_06_01 end
@@ -0,0 +1,109 @@
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::ContainerService::Mgmt::V2020_06_01
7
+ #
8
+ # The Container Service Client.
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerServiceClient] reference to the ContainerServiceClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of compute operations.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [OperationListResult] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ response = list_async(custom_headers:custom_headers).value!
34
+ response.body unless response.nil?
35
+ end
36
+
37
+ #
38
+ # Gets a list of compute operations.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Gets a list of compute operations.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+
60
+
61
+ request_headers = {}
62
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
63
+
64
+ # Set Headers
65
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
66
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
67
+ path_template = 'providers/Microsoft.ContainerService/operations'
68
+
69
+ request_url = @base_url || @client.base_url
70
+
71
+ options = {
72
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
73
+ query_params: {'api-version' => @client.api_version},
74
+ headers: request_headers.merge(custom_headers || {}),
75
+ base_url: request_url
76
+ }
77
+ promise = @client.make_request_async(:get, path_template, options)
78
+
79
+ promise = promise.then do |result|
80
+ http_response = result.response
81
+ status_code = http_response.status
82
+ response_content = http_response.body
83
+ unless status_code == 200
84
+ error_model = JSON.load(response_content)
85
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
86
+ end
87
+
88
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
91
+ # Deserialize Response
92
+ if status_code == 200
93
+ begin
94
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
95
+ result_mapper = Azure::ContainerService::Mgmt::V2020_06_01::Models::OperationListResult.mapper()
96
+ result.body = @client.deserialize(result_mapper, parsed_response)
97
+ rescue Exception => e
98
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
99
+ end
100
+ end
101
+
102
+ result
103
+ end
104
+
105
+ promise.execute
106
+ end
107
+
108
+ end
109
+ end
@@ -0,0 +1,515 @@
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::ContainerService::Mgmt::V2020_06_01
7
+ #
8
+ # The Container Service Client.
9
+ #
10
+ class PrivateEndpointConnections
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PrivateEndpointConnections class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [ContainerServiceClient] reference to the ContainerServiceClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of private endpoint connections in the specified managed cluster.
26
+ #
27
+ # Gets a list of private endpoint connections in the specified managed cluster.
28
+ # The operation returns properties of each private endpoint connection.
29
+ #
30
+ # @param resource_group_name [String] The name of the resource group.
31
+ # @param resource_name [String] The name of the managed cluster resource.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [PrivateEndpointConnectionListResult] operation results.
36
+ #
37
+ def list(resource_group_name, resource_name, custom_headers:nil)
38
+ response = list_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Gets a list of private endpoint connections in the specified managed cluster.
44
+ #
45
+ # Gets a list of private endpoint connections in the specified managed cluster.
46
+ # The operation returns properties of each private endpoint connection.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group.
49
+ # @param resource_name [String] The name of the managed cluster resource.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(resource_group_name, resource_name, custom_headers:nil)
56
+ list_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Gets a list of private endpoint connections in the specified managed cluster.
61
+ #
62
+ # Gets a list of private endpoint connections in the specified managed cluster.
63
+ # The operation returns properties of each private endpoint connection.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group.
66
+ # @param resource_name [String] The name of the managed cluster resource.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(resource_group_name, resource_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
76
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
77
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
78
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
79
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
80
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
81
+
82
+
83
+ request_headers = {}
84
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
85
+
86
+ # Set Headers
87
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
88
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
89
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'
90
+
91
+ request_url = @base_url || @client.base_url
92
+
93
+ options = {
94
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
95
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name},
96
+ query_params: {'api-version' => @client.api_version},
97
+ headers: request_headers.merge(custom_headers || {}),
98
+ base_url: request_url
99
+ }
100
+ promise = @client.make_request_async(:get, path_template, options)
101
+
102
+ promise = promise.then do |result|
103
+ http_response = result.response
104
+ status_code = http_response.status
105
+ response_content = http_response.body
106
+ unless status_code == 200
107
+ error_model = JSON.load(response_content)
108
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
109
+ end
110
+
111
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
112
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
113
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 200
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = Azure::ContainerService::Mgmt::V2020_06_01::Models::PrivateEndpointConnectionListResult.mapper()
119
+ result.body = @client.deserialize(result_mapper, parsed_response)
120
+ rescue Exception => e
121
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
122
+ end
123
+ end
124
+
125
+ result
126
+ end
127
+
128
+ promise.execute
129
+ end
130
+
131
+ #
132
+ # Gets the private endpoint connection.
133
+ #
134
+ # Gets the details of the private endpoint connection by managed cluster and
135
+ # resource group.
136
+ #
137
+ # @param resource_group_name [String] The name of the resource group.
138
+ # @param resource_name [String] The name of the managed cluster resource.
139
+ # @param private_endpoint_connection_name [String] The name of the private
140
+ # endpoint connection.
141
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
142
+ # will be added to the HTTP request.
143
+ #
144
+ # @return [PrivateEndpointConnection] operation results.
145
+ #
146
+ def get(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
147
+ response = get_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
148
+ response.body unless response.nil?
149
+ end
150
+
151
+ #
152
+ # Gets the private endpoint connection.
153
+ #
154
+ # Gets the details of the private endpoint connection by managed cluster and
155
+ # resource group.
156
+ #
157
+ # @param resource_group_name [String] The name of the resource group.
158
+ # @param resource_name [String] The name of the managed cluster resource.
159
+ # @param private_endpoint_connection_name [String] The name of the private
160
+ # endpoint connection.
161
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
162
+ # will be added to the HTTP request.
163
+ #
164
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
165
+ #
166
+ def get_with_http_info(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
167
+ get_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
168
+ end
169
+
170
+ #
171
+ # Gets the private endpoint connection.
172
+ #
173
+ # Gets the details of the private endpoint connection by managed cluster and
174
+ # resource group.
175
+ #
176
+ # @param resource_group_name [String] The name of the resource group.
177
+ # @param resource_name [String] The name of the managed cluster resource.
178
+ # @param private_endpoint_connection_name [String] The name of the private
179
+ # endpoint connection.
180
+ # @param [Hash{String => String}] A hash of custom headers that will be added
181
+ # to the HTTP request.
182
+ #
183
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
184
+ #
185
+ def get_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
186
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
187
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
188
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
189
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
190
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
191
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
192
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
193
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
194
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
195
+
196
+
197
+ request_headers = {}
198
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
199
+
200
+ # Set Headers
201
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
202
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
203
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
204
+
205
+ request_url = @base_url || @client.base_url
206
+
207
+ options = {
208
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
209
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
210
+ query_params: {'api-version' => @client.api_version},
211
+ headers: request_headers.merge(custom_headers || {}),
212
+ base_url: request_url
213
+ }
214
+ promise = @client.make_request_async(:get, path_template, options)
215
+
216
+ promise = promise.then do |result|
217
+ http_response = result.response
218
+ status_code = http_response.status
219
+ response_content = http_response.body
220
+ unless status_code == 200
221
+ error_model = JSON.load(response_content)
222
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
223
+ end
224
+
225
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
226
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
227
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
228
+ # Deserialize Response
229
+ if status_code == 200
230
+ begin
231
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
232
+ result_mapper = Azure::ContainerService::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
233
+ result.body = @client.deserialize(result_mapper, parsed_response)
234
+ rescue Exception => e
235
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
236
+ end
237
+ end
238
+
239
+ result
240
+ end
241
+
242
+ promise.execute
243
+ end
244
+
245
+ #
246
+ # Updates a private endpoint connection.
247
+ #
248
+ # Updates a private endpoint connection in the specified managed cluster.
249
+ #
250
+ # @param resource_group_name [String] The name of the resource group.
251
+ # @param resource_name [String] The name of the managed cluster resource.
252
+ # @param private_endpoint_connection_name [String] The name of the private
253
+ # endpoint connection.
254
+ # @param parameters [PrivateEndpointConnection] Parameters supplied to the
255
+ # Update a private endpoint connection operation.
256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
257
+ # will be added to the HTTP request.
258
+ #
259
+ # @return [PrivateEndpointConnection] operation results.
260
+ #
261
+ def update(resource_group_name, resource_name, private_endpoint_connection_name, parameters, custom_headers:nil)
262
+ response = update_async(resource_group_name, resource_name, private_endpoint_connection_name, parameters, custom_headers:custom_headers).value!
263
+ response.body unless response.nil?
264
+ end
265
+
266
+ #
267
+ # Updates a private endpoint connection.
268
+ #
269
+ # Updates a private endpoint connection in the specified managed cluster.
270
+ #
271
+ # @param resource_group_name [String] The name of the resource group.
272
+ # @param resource_name [String] The name of the managed cluster resource.
273
+ # @param private_endpoint_connection_name [String] The name of the private
274
+ # endpoint connection.
275
+ # @param parameters [PrivateEndpointConnection] Parameters supplied to the
276
+ # Update a private endpoint connection operation.
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
281
+ #
282
+ def update_with_http_info(resource_group_name, resource_name, private_endpoint_connection_name, parameters, custom_headers:nil)
283
+ update_async(resource_group_name, resource_name, private_endpoint_connection_name, parameters, custom_headers:custom_headers).value!
284
+ end
285
+
286
+ #
287
+ # Updates a private endpoint connection.
288
+ #
289
+ # Updates a private endpoint connection in the specified managed cluster.
290
+ #
291
+ # @param resource_group_name [String] The name of the resource group.
292
+ # @param resource_name [String] The name of the managed cluster resource.
293
+ # @param private_endpoint_connection_name [String] The name of the private
294
+ # endpoint connection.
295
+ # @param parameters [PrivateEndpointConnection] Parameters supplied to the
296
+ # Update a private endpoint connection operation.
297
+ # @param [Hash{String => String}] A hash of custom headers that will be added
298
+ # to the HTTP request.
299
+ #
300
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
301
+ #
302
+ def update_async(resource_group_name, resource_name, private_endpoint_connection_name, parameters, custom_headers:nil)
303
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
304
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
305
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
306
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
307
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
308
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
309
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
310
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
311
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
312
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
313
+
314
+
315
+ request_headers = {}
316
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
317
+
318
+ # Set Headers
319
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
320
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
321
+
322
+ # Serialize Request
323
+ request_mapper = Azure::ContainerService::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
324
+ request_content = @client.serialize(request_mapper, parameters)
325
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
326
+
327
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
328
+
329
+ request_url = @base_url || @client.base_url
330
+
331
+ options = {
332
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
333
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
334
+ query_params: {'api-version' => @client.api_version},
335
+ body: request_content,
336
+ headers: request_headers.merge(custom_headers || {}),
337
+ base_url: request_url
338
+ }
339
+ promise = @client.make_request_async(:put, path_template, options)
340
+
341
+ promise = promise.then do |result|
342
+ http_response = result.response
343
+ status_code = http_response.status
344
+ response_content = http_response.body
345
+ unless status_code == 200
346
+ error_model = JSON.load(response_content)
347
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
348
+ end
349
+
350
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
351
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
352
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
353
+ # Deserialize Response
354
+ if status_code == 200
355
+ begin
356
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
357
+ result_mapper = Azure::ContainerService::Mgmt::V2020_06_01::Models::PrivateEndpointConnection.mapper()
358
+ result.body = @client.deserialize(result_mapper, parsed_response)
359
+ rescue Exception => e
360
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
361
+ end
362
+ end
363
+
364
+ result
365
+ end
366
+
367
+ promise.execute
368
+ end
369
+
370
+ #
371
+ # Deletes a private endpoint connection.
372
+ #
373
+ # Deletes the private endpoint connection in the specified managed cluster.
374
+ #
375
+ # @param resource_group_name [String] The name of the resource group.
376
+ # @param resource_name [String] The name of the managed cluster resource.
377
+ # @param private_endpoint_connection_name [String] The name of the private
378
+ # endpoint connection.
379
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
380
+ # will be added to the HTTP request.
381
+ #
382
+ def delete(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
383
+ response = delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
384
+ nil
385
+ end
386
+
387
+ #
388
+ # @param resource_group_name [String] The name of the resource group.
389
+ # @param resource_name [String] The name of the managed cluster resource.
390
+ # @param private_endpoint_connection_name [String] The name of the private
391
+ # endpoint connection.
392
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
393
+ # will be added to the HTTP request.
394
+ #
395
+ # @return [Concurrent::Promise] promise which provides async access to http
396
+ # response.
397
+ #
398
+ def delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
399
+ # Send request
400
+ promise = begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers)
401
+
402
+ promise = promise.then do |response|
403
+ # Defining deserialization method.
404
+ deserialize_method = lambda do |parsed_response|
405
+ end
406
+
407
+ # Waiting for response.
408
+ @client.get_long_running_operation_result(response, deserialize_method)
409
+ end
410
+
411
+ promise
412
+ end
413
+
414
+ #
415
+ # Deletes a private endpoint connection.
416
+ #
417
+ # Deletes the private endpoint connection in the specified managed cluster.
418
+ #
419
+ # @param resource_group_name [String] The name of the resource group.
420
+ # @param resource_name [String] The name of the managed cluster resource.
421
+ # @param private_endpoint_connection_name [String] The name of the private
422
+ # endpoint connection.
423
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
424
+ # will be added to the HTTP request.
425
+ #
426
+ #
427
+ def begin_delete(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
428
+ response = begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
429
+ nil
430
+ end
431
+
432
+ #
433
+ # Deletes a private endpoint connection.
434
+ #
435
+ # Deletes the private endpoint connection in the specified managed cluster.
436
+ #
437
+ # @param resource_group_name [String] The name of the resource group.
438
+ # @param resource_name [String] The name of the managed cluster resource.
439
+ # @param private_endpoint_connection_name [String] The name of the private
440
+ # endpoint connection.
441
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
442
+ # will be added to the HTTP request.
443
+ #
444
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
445
+ #
446
+ def begin_delete_with_http_info(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
447
+ begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
448
+ end
449
+
450
+ #
451
+ # Deletes a private endpoint connection.
452
+ #
453
+ # Deletes the private endpoint connection in the specified managed cluster.
454
+ #
455
+ # @param resource_group_name [String] The name of the resource group.
456
+ # @param resource_name [String] The name of the managed cluster resource.
457
+ # @param private_endpoint_connection_name [String] The name of the private
458
+ # endpoint connection.
459
+ # @param [Hash{String => String}] A hash of custom headers that will be added
460
+ # to the HTTP request.
461
+ #
462
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
463
+ #
464
+ def begin_delete_async(resource_group_name, resource_name, private_endpoint_connection_name, custom_headers:nil)
465
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
466
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
467
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
468
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
469
+ fail ArgumentError, 'resource_name is nil' if resource_name.nil?
470
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '63'" if !resource_name.nil? && resource_name.length > 63
471
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '1'" if !resource_name.nil? && resource_name.length < 1
472
+ fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$$')).nil?
473
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
474
+
475
+
476
+ request_headers = {}
477
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
478
+
479
+ # Set Headers
480
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
481
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
482
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'
483
+
484
+ request_url = @base_url || @client.base_url
485
+
486
+ options = {
487
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
488
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
489
+ query_params: {'api-version' => @client.api_version},
490
+ headers: request_headers.merge(custom_headers || {}),
491
+ base_url: request_url
492
+ }
493
+ promise = @client.make_request_async(:delete, path_template, options)
494
+
495
+ promise = promise.then do |result|
496
+ http_response = result.response
497
+ status_code = http_response.status
498
+ response_content = http_response.body
499
+ unless status_code == 200 || status_code == 204
500
+ error_model = JSON.load(response_content)
501
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
502
+ end
503
+
504
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
505
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
506
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
507
+
508
+ result
509
+ end
510
+
511
+ promise.execute
512
+ end
513
+
514
+ end
515
+ end