azure_mgmt_container_instance 0.17.6 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2017-08-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2017-10-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2017-12-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-02-01-preview/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-04-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-06-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-09-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2018-10-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2019-12-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +1 -1
- data/lib/2020-11-01/generated/azure_mgmt_container_instance.rb +92 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/container_groups.rb +1404 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/container_instance_management_client.rb +145 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/containers.rb +375 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/location.rb +552 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/azure_file_volume.rb +84 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/cached_images.rb +57 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/cached_images_list_result.rb +98 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/capabilities.rb +108 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/capabilities_capabilities.rb +71 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/capabilities_list_result.rb +98 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container.rb +192 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_attach_response.rb +59 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_exec.rb +54 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_exec_request.rb +58 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_exec_request_terminal_size.rb +57 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_exec_response.rb +57 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group.rb +314 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_diagnostics.rb +47 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_identity.rb +102 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_identity_user_assigned_identities_value.rb +61 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_ip_address_type.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_list_result.rb +99 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_network_profile.rb +46 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_network_protocol.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_properties_instance_view.rb +69 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_restart_policy.rb +17 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_group_sku.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_http_get.rb +80 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_instance_operations_origin.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_network_protocol.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_port.rb +58 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_probe.rb +114 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_properties_instance_view.rb +95 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/container_state.rb +99 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/dns_configuration.rb +77 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/encryption_properties.rb +68 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/environment_variable.rb +68 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/event.rb +107 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/git_repo_volume.rb +72 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/gpu_resource.rb +58 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/gpu_sku.rb +17 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/http_headers.rb +57 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/image_registry_credential.rb +69 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/init_container_definition.rb +133 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/init_container_properties_definition_instance_view.rb +96 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/ip_address.rb +102 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/log_analytics.rb +108 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/log_analytics_log_type.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/logs.rb +46 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/operating_system_types.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/operation.rb +81 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/operation_display.rb +79 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/operation_list_result.rb +99 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/port.rb +58 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/resource.rb +110 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/resource_identity_type.rb +18 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/resource_limits.rb +69 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/resource_requests.rb +69 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/resource_requirements.rb +61 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/scheme.rb +16 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/usage.rb +84 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/usage_list_result.rb +56 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/usage_name.rb +59 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/volume.rb +100 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/models/volume_mount.rb +70 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/module_definition.rb +9 -0
- data/lib/2020-11-01/generated/azure_mgmt_container_instance/operations.rb +219 -0
- data/lib/azure_mgmt_container_instance.rb +6 -5
- data/lib/profiles/latest/modules/containerinstance_profile_module.rb +149 -141
- data/lib/version.rb +1 -1
- metadata +71 -3
@@ -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::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for LogAnalyticsLogType
|
10
|
+
#
|
11
|
+
module LogAnalyticsLogType
|
12
|
+
ContainerInsights = "ContainerInsights"
|
13
|
+
ContainerInstanceLogs = "ContainerInstanceLogs"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -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::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The logs.
|
10
|
+
#
|
11
|
+
class Logs
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The content of the log.
|
16
|
+
attr_accessor :content
|
17
|
+
|
18
|
+
|
19
|
+
#
|
20
|
+
# Mapper for Logs 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: 'Logs',
|
28
|
+
type: {
|
29
|
+
name: 'Composite',
|
30
|
+
class_name: 'Logs',
|
31
|
+
model_properties: {
|
32
|
+
content: {
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'content',
|
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::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for OperatingSystemTypes
|
10
|
+
#
|
11
|
+
module OperatingSystemTypes
|
12
|
+
Windows = "Windows"
|
13
|
+
Linux = "Linux"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,81 @@
|
|
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::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# An operation for Azure Container Instance service.
|
10
|
+
#
|
11
|
+
class Operation
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The name of the operation.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [OperationDisplay] The display information of the operation.
|
19
|
+
attr_accessor :display
|
20
|
+
|
21
|
+
# @return The additional properties.
|
22
|
+
attr_accessor :properties
|
23
|
+
|
24
|
+
# @return [ContainerInstanceOperationsOrigin] The intended executor of
|
25
|
+
# the operation. Possible values include: 'User', 'System'
|
26
|
+
attr_accessor :origin
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# Mapper for Operation class as Ruby Hash.
|
31
|
+
# This will be used for serialization/deserialization.
|
32
|
+
#
|
33
|
+
def self.mapper()
|
34
|
+
{
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'Operation',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'Operation',
|
41
|
+
model_properties: {
|
42
|
+
name: {
|
43
|
+
client_side_validation: true,
|
44
|
+
required: true,
|
45
|
+
serialized_name: 'name',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
display: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: true,
|
53
|
+
serialized_name: 'display',
|
54
|
+
type: {
|
55
|
+
name: 'Composite',
|
56
|
+
class_name: 'OperationDisplay'
|
57
|
+
}
|
58
|
+
},
|
59
|
+
properties: {
|
60
|
+
client_side_validation: true,
|
61
|
+
required: false,
|
62
|
+
serialized_name: 'properties',
|
63
|
+
type: {
|
64
|
+
name: 'Object'
|
65
|
+
}
|
66
|
+
},
|
67
|
+
origin: {
|
68
|
+
client_side_validation: true,
|
69
|
+
required: false,
|
70
|
+
serialized_name: 'origin',
|
71
|
+
type: {
|
72
|
+
name: 'String'
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,79 @@
|
|
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::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The display information of the operation.
|
10
|
+
#
|
11
|
+
class OperationDisplay
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The name of the provider of the operation.
|
16
|
+
attr_accessor :provider
|
17
|
+
|
18
|
+
# @return [String] The name of the resource type of the operation.
|
19
|
+
attr_accessor :resource
|
20
|
+
|
21
|
+
# @return [String] The friendly name of the operation.
|
22
|
+
attr_accessor :operation
|
23
|
+
|
24
|
+
# @return [String] The description of the operation.
|
25
|
+
attr_accessor :description
|
26
|
+
|
27
|
+
|
28
|
+
#
|
29
|
+
# Mapper for OperationDisplay class as Ruby Hash.
|
30
|
+
# This will be used for serialization/deserialization.
|
31
|
+
#
|
32
|
+
def self.mapper()
|
33
|
+
{
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'Operation_display',
|
37
|
+
type: {
|
38
|
+
name: 'Composite',
|
39
|
+
class_name: 'OperationDisplay',
|
40
|
+
model_properties: {
|
41
|
+
provider: {
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'provider',
|
45
|
+
type: {
|
46
|
+
name: 'String'
|
47
|
+
}
|
48
|
+
},
|
49
|
+
resource: {
|
50
|
+
client_side_validation: true,
|
51
|
+
required: false,
|
52
|
+
serialized_name: 'resource',
|
53
|
+
type: {
|
54
|
+
name: 'String'
|
55
|
+
}
|
56
|
+
},
|
57
|
+
operation: {
|
58
|
+
client_side_validation: true,
|
59
|
+
required: false,
|
60
|
+
serialized_name: 'operation',
|
61
|
+
type: {
|
62
|
+
name: 'String'
|
63
|
+
}
|
64
|
+
},
|
65
|
+
description: {
|
66
|
+
client_side_validation: true,
|
67
|
+
required: false,
|
68
|
+
serialized_name: 'description',
|
69
|
+
type: {
|
70
|
+
name: 'String'
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,99 @@
|
|
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::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The operation list response that contains all operations for Azure
|
10
|
+
# Container Instance service.
|
11
|
+
#
|
12
|
+
class OperationListResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
include MsRest::JSONable
|
17
|
+
# @return [Array<Operation>] The list of operations.
|
18
|
+
attr_accessor :value
|
19
|
+
|
20
|
+
# @return [String] The URI to fetch the next page of operations.
|
21
|
+
attr_accessor :next_link
|
22
|
+
|
23
|
+
# return [Proc] with next page method call.
|
24
|
+
attr_accessor :next_method
|
25
|
+
|
26
|
+
#
|
27
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
28
|
+
#
|
29
|
+
# @return [Array<Operation>] operation results.
|
30
|
+
#
|
31
|
+
def get_all_items
|
32
|
+
items = @value
|
33
|
+
page = self
|
34
|
+
while page.next_link != nil && !page.next_link.strip.empty? do
|
35
|
+
page = page.get_next_page
|
36
|
+
items.concat(page.value)
|
37
|
+
end
|
38
|
+
items
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Gets the next page of results.
|
43
|
+
#
|
44
|
+
# @return [OperationListResult] with next page content.
|
45
|
+
#
|
46
|
+
def get_next_page
|
47
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
48
|
+
unless response.nil?
|
49
|
+
@next_link = response.body.next_link
|
50
|
+
@value = response.body.value
|
51
|
+
self
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Mapper for OperationListResult class as Ruby Hash.
|
57
|
+
# This will be used for serialization/deserialization.
|
58
|
+
#
|
59
|
+
def self.mapper()
|
60
|
+
{
|
61
|
+
client_side_validation: true,
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'OperationListResult',
|
64
|
+
type: {
|
65
|
+
name: 'Composite',
|
66
|
+
class_name: 'OperationListResult',
|
67
|
+
model_properties: {
|
68
|
+
value: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'value',
|
72
|
+
type: {
|
73
|
+
name: 'Sequence',
|
74
|
+
element: {
|
75
|
+
client_side_validation: true,
|
76
|
+
required: false,
|
77
|
+
serialized_name: 'OperationElementType',
|
78
|
+
type: {
|
79
|
+
name: 'Composite',
|
80
|
+
class_name: 'Operation'
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
next_link: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
serialized_name: 'nextLink',
|
89
|
+
type: {
|
90
|
+
name: 'String'
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,58 @@
|
|
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::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The port exposed on the container group.
|
10
|
+
#
|
11
|
+
class Port
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [ContainerGroupNetworkProtocol] The protocol associated with
|
16
|
+
# the port. Possible values include: 'TCP', 'UDP'
|
17
|
+
attr_accessor :protocol
|
18
|
+
|
19
|
+
# @return [Integer] The port number.
|
20
|
+
attr_accessor :port
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for Port class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'Port',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'Port',
|
35
|
+
model_properties: {
|
36
|
+
protocol: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'protocol',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
port: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: true,
|
47
|
+
serialized_name: 'port',
|
48
|
+
type: {
|
49
|
+
name: 'Number'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ContainerInstance::Mgmt::V2020_11_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Resource model definition.
|
10
|
+
#
|
11
|
+
class Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The resource id.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] The resource name.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] The resource type.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# @return [String] The resource location.
|
25
|
+
attr_accessor :location
|
26
|
+
|
27
|
+
# @return [Hash{String => String}] The resource tags.
|
28
|
+
attr_accessor :tags
|
29
|
+
|
30
|
+
|
31
|
+
# @return [String] the name of the resource group of the resource.
|
32
|
+
def resource_group
|
33
|
+
unless self.id.nil?
|
34
|
+
groups = self.id.match(/.+\/resourceGroups\/([^\/]+)\/.+/)
|
35
|
+
groups.captures[0].strip if groups
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
#
|
41
|
+
# Mapper for Resource class as Ruby Hash.
|
42
|
+
# This will be used for serialization/deserialization.
|
43
|
+
#
|
44
|
+
def self.mapper()
|
45
|
+
{
|
46
|
+
client_side_validation: true,
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'Resource',
|
49
|
+
type: {
|
50
|
+
name: 'Composite',
|
51
|
+
class_name: 'Resource',
|
52
|
+
model_properties: {
|
53
|
+
id: {
|
54
|
+
client_side_validation: true,
|
55
|
+
required: false,
|
56
|
+
read_only: true,
|
57
|
+
serialized_name: 'id',
|
58
|
+
type: {
|
59
|
+
name: 'String'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
name: {
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
read_only: true,
|
66
|
+
serialized_name: 'name',
|
67
|
+
type: {
|
68
|
+
name: 'String'
|
69
|
+
}
|
70
|
+
},
|
71
|
+
type: {
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
read_only: true,
|
75
|
+
serialized_name: 'type',
|
76
|
+
type: {
|
77
|
+
name: 'String'
|
78
|
+
}
|
79
|
+
},
|
80
|
+
location: {
|
81
|
+
client_side_validation: true,
|
82
|
+
required: false,
|
83
|
+
serialized_name: 'location',
|
84
|
+
type: {
|
85
|
+
name: 'String'
|
86
|
+
}
|
87
|
+
},
|
88
|
+
tags: {
|
89
|
+
client_side_validation: true,
|
90
|
+
required: false,
|
91
|
+
serialized_name: 'tags',
|
92
|
+
type: {
|
93
|
+
name: 'Dictionary',
|
94
|
+
value: {
|
95
|
+
client_side_validation: true,
|
96
|
+
required: false,
|
97
|
+
serialized_name: 'StringElementType',
|
98
|
+
type: {
|
99
|
+
name: 'String'
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|