oci 2.5.0 → 2.5.1
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/README.md +5 -1
- data/lib/oci.rb +4 -0
- data/lib/oci/auth/federation_client.rb +4 -4
- data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +22 -16
- data/lib/oci/autoscaling/auto_scaling_client.rb +774 -0
- data/lib/oci/autoscaling/auto_scaling_client_composite_operations.rb +24 -0
- data/lib/oci/autoscaling/autoscaling.rb +38 -0
- data/lib/oci/autoscaling/models/action.rb +182 -0
- data/lib/oci/autoscaling/models/auto_scaling_configuration.rb +282 -0
- data/lib/oci/autoscaling/models/auto_scaling_configuration_summary.rb +234 -0
- data/lib/oci/autoscaling/models/auto_scaling_policy.rb +222 -0
- data/lib/oci/autoscaling/models/auto_scaling_policy_summary.rb +179 -0
- data/lib/oci/autoscaling/models/capacity.rb +170 -0
- data/lib/oci/autoscaling/models/condition.rb +186 -0
- data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +256 -0
- data/lib/oci/autoscaling/models/create_auto_scaling_policy_details.rb +196 -0
- data/lib/oci/autoscaling/models/create_condition_details.rb +176 -0
- data/lib/oci/autoscaling/models/create_threshold_policy_details.rb +166 -0
- data/lib/oci/autoscaling/models/instance_pool_resource.rb +148 -0
- data/lib/oci/autoscaling/models/metric.rb +186 -0
- data/lib/oci/autoscaling/models/resource.rb +177 -0
- data/lib/oci/autoscaling/models/threshold.rb +188 -0
- data/lib/oci/autoscaling/models/threshold_policy.rb +173 -0
- data/lib/oci/autoscaling/models/update_auto_scaling_configuration_details.rb +219 -0
- data/lib/oci/autoscaling/models/update_auto_scaling_policy_details.rb +194 -0
- data/lib/oci/autoscaling/models/update_condition_details.rb +176 -0
- data/lib/oci/autoscaling/models/update_threshold_policy_details.rb +164 -0
- data/lib/oci/autoscaling/util.rb +2 -0
- data/lib/oci/core/blockstorage_client.rb +1 -1
- data/lib/oci/core/compute_client.rb +1 -1
- data/lib/oci/core/compute_management_client.rb +135 -1
- data/lib/oci/core/compute_management_client_composite_operations.rb +80 -0
- data/lib/oci/core/core.rb +8 -0
- data/lib/oci/core/models/attach_load_balancer_details.rb +191 -0
- data/lib/oci/core/models/create_instance_pool_details.rb +19 -4
- data/lib/oci/core/models/detach_load_balancer_details.rb +167 -0
- data/lib/oci/core/models/image.rb +14 -1
- data/lib/oci/core/models/instance.rb +18 -2
- data/lib/oci/core/models/instance_agent_config.rb +154 -0
- data/lib/oci/core/models/instance_agent_features.rb +154 -0
- data/lib/oci/core/models/instance_pool.rb +19 -4
- data/lib/oci/core/models/instance_pool_instance_load_balancer_backend.rb +219 -0
- data/lib/oci/core/models/instance_pool_load_balancer_attachment.rb +253 -0
- data/lib/oci/core/models/instance_summary.rb +19 -4
- data/lib/oci/core/models/launch_instance_agent_config_details.rb +155 -0
- data/lib/oci/core/models/launch_instance_details.rb +14 -1
- data/lib/oci/core/models/update_instance_agent_config_details.rb +154 -0
- data/lib/oci/core/models/update_instance_details.rb +16 -1
- data/lib/oci/core/virtual_network_client.rb +1 -1
- data/lib/oci/database/database_client.rb +12 -14
- data/lib/oci/database/models/autonomous_data_warehouse_connection_strings.rb +3 -1
- data/lib/oci/database/models/autonomous_database_connection_strings.rb +3 -1
- data/lib/oci/database/models/create_data_guard_association_details.rb +2 -7
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +5 -1
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +4 -1
- data/lib/oci/database/models/database_summary.rb +1 -1
- data/lib/oci/database/models/db_node.rb +15 -1
- data/lib/oci/database/models/db_node_summary.rb +15 -1
- data/lib/oci/database/models/db_system.rb +15 -1
- data/lib/oci/database/models/db_system_summary.rb +15 -1
- data/lib/oci/database/models/db_version_summary.rb +1 -1
- data/lib/oci/database/models/launch_db_system_base.rb +33 -2
- data/lib/oci/database/models/launch_db_system_details.rb +5 -1
- data/lib/oci/database/models/launch_db_system_from_backup_details.rb +5 -1
- data/lib/oci/database/models/update_db_system_details.rb +1 -1
- data/lib/oci/identity/identity.rb +4 -0
- data/lib/oci/identity/identity_client.rb +468 -12
- data/lib/oci/identity/identity_client_composite_operations.rb +79 -0
- data/lib/oci/identity/models/change_tag_namespace_compartment_detail.rb +154 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +2 -1
- data/lib/oci/identity/models/mfa_totp_device.rb +279 -0
- data/lib/oci/identity/models/mfa_totp_device_summary.rb +267 -0
- data/lib/oci/identity/models/mfa_totp_token.rb +155 -0
- data/lib/oci/identity/models/tag_namespace_summary.rb +1 -1
- data/lib/oci/identity/models/user.rb +18 -4
- data/lib/oci/monitoring/models/aggregated_datapoint.rb +166 -0
- data/lib/oci/monitoring/models/alarm.rb +538 -0
- data/lib/oci/monitoring/models/alarm_history_collection.rb +183 -0
- data/lib/oci/monitoring/models/alarm_history_entry.rb +187 -0
- data/lib/oci/monitoring/models/alarm_status_summary.rb +277 -0
- data/lib/oci/monitoring/models/alarm_summary.rb +386 -0
- data/lib/oci/monitoring/models/create_alarm_details.rb +423 -0
- data/lib/oci/monitoring/models/datapoint.rb +179 -0
- data/lib/oci/monitoring/models/failed_metric_record.rb +166 -0
- data/lib/oci/monitoring/models/list_metrics_details.rb +271 -0
- data/lib/oci/monitoring/models/metric.rb +197 -0
- data/lib/oci/monitoring/models/metric_data.rb +243 -0
- data/lib/oci/monitoring/models/metric_data_details.rb +227 -0
- data/lib/oci/monitoring/models/post_metric_data_details.rb +194 -0
- data/lib/oci/monitoring/models/post_metric_data_response_details.rb +170 -0
- data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +229 -0
- data/lib/oci/monitoring/models/suppression.rb +196 -0
- data/lib/oci/monitoring/models/update_alarm_details.rb +423 -0
- data/lib/oci/monitoring/monitoring.rb +37 -0
- data/lib/oci/monitoring/monitoring_client.rb +923 -0
- data/lib/oci/monitoring/monitoring_client_composite_operations.rb +145 -0
- data/lib/oci/monitoring/util.rb +2 -0
- data/lib/oci/ons/models/backoff_retry_policy.rb +192 -0
- data/lib/oci/ons/models/confirmation_result.rb +221 -0
- data/lib/oci/ons/models/create_subscription_details.rb +238 -0
- data/lib/oci/ons/models/create_topic_details.rb +209 -0
- data/lib/oci/ons/models/delivery_policy.rb +153 -0
- data/lib/oci/ons/models/message_details.rb +163 -0
- data/lib/oci/ons/models/notification_topic.rb +302 -0
- data/lib/oci/ons/models/notification_topic_summary.rb +303 -0
- data/lib/oci/ons/models/publish_result.rb +168 -0
- data/lib/oci/ons/models/subscription.rb +273 -0
- data/lib/oci/ons/models/subscription_summary.rb +300 -0
- data/lib/oci/ons/models/topic_attributes_details.rb +184 -0
- data/lib/oci/ons/models/update_subscription_details.rb +188 -0
- data/lib/oci/ons/notification_control_plane_client.rb +463 -0
- data/lib/oci/ons/notification_control_plane_client_composite_operations.rb +24 -0
- data/lib/oci/ons/notification_data_plane_client.rb +680 -0
- data/lib/oci/ons/notification_data_plane_client_composite_operations.rb +104 -0
- data/lib/oci/ons/ons.rb +33 -0
- data/lib/oci/ons/util.rb +2 -0
- data/lib/oci/regions.rb +5 -0
- data/lib/oci/resource_manager/models/apply_job_plan_resolution.rb +189 -0
- data/lib/oci/resource_manager/models/config_source.rb +208 -0
- data/lib/oci/resource_manager/models/create_config_source_details.rb +187 -0
- data/lib/oci/resource_manager/models/create_job_details.rb +225 -0
- data/lib/oci/resource_manager/models/create_stack_details.rb +239 -0
- data/lib/oci/resource_manager/models/create_zip_upload_config_source_details.rb +166 -0
- data/lib/oci/resource_manager/models/failure_details.rb +185 -0
- data/lib/oci/resource_manager/models/job.rb +399 -0
- data/lib/oci/resource_manager/models/job_summary.rb +311 -0
- data/lib/oci/resource_manager/models/log_entry.rb +225 -0
- data/lib/oci/resource_manager/models/stack.rb +305 -0
- data/lib/oci/resource_manager/models/stack_summary.rb +249 -0
- data/lib/oci/resource_manager/models/update_config_source_details.rb +184 -0
- data/lib/oci/resource_manager/models/update_job_details.rb +188 -0
- data/lib/oci/resource_manager/models/update_stack_details.rb +225 -0
- data/lib/oci/resource_manager/models/update_zip_upload_config_source_details.rb +164 -0
- data/lib/oci/resource_manager/models/zip_upload_config_source.rb +149 -0
- data/lib/oci/resource_manager/resource_manager.rb +36 -0
- data/lib/oci/resource_manager/resource_manager_client.rb +1264 -0
- data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +263 -0
- data/lib/oci/resource_manager/util.rb +2 -0
- data/lib/oci/version.rb +1 -1
- metadata +100 -2
@@ -0,0 +1,164 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require_relative 'update_config_source_details'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
7
|
+
module OCI
|
8
|
+
# Updates property details for the configuration .zip file.
|
9
|
+
class ResourceManager::Models::UpdateZipUploadConfigSourceDetails < ResourceManager::Models::UpdateConfigSourceDetails # rubocop:disable Metrics/LineLength
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :zip_file_base64_encoded
|
12
|
+
|
13
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
14
|
+
def self.attribute_map
|
15
|
+
{
|
16
|
+
# rubocop:disable Style/SymbolLiteral
|
17
|
+
'config_source_type': :'configSourceType',
|
18
|
+
'working_directory': :'workingDirectory',
|
19
|
+
'zip_file_base64_encoded': :'zipFileBase64Encoded'
|
20
|
+
# rubocop:enable Style/SymbolLiteral
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# Attribute type mapping.
|
25
|
+
def self.swagger_types
|
26
|
+
{
|
27
|
+
# rubocop:disable Style/SymbolLiteral
|
28
|
+
'config_source_type': :'String',
|
29
|
+
'working_directory': :'String',
|
30
|
+
'zip_file_base64_encoded': :'String'
|
31
|
+
# rubocop:enable Style/SymbolLiteral
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
36
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
37
|
+
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
# @option attributes [String] :working_directory The value to assign to the {OCI::ResourceManager::Models::UpdateConfigSourceDetails#working_directory #working_directory} proprety
|
42
|
+
# @option attributes [String] :zip_file_base64_encoded The value to assign to the {#zip_file_base64_encoded} property
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
attributes['configSourceType'] = 'ZIP_UPLOAD'
|
47
|
+
|
48
|
+
super(attributes)
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
52
|
+
|
53
|
+
self.zip_file_base64_encoded = attributes[:'zipFileBase64Encoded'] if attributes[:'zipFileBase64Encoded']
|
54
|
+
|
55
|
+
raise 'You cannot provide both :zipFileBase64Encoded and :zip_file_base64_encoded' if attributes.key?(:'zipFileBase64Encoded') && attributes.key?(:'zip_file_base64_encoded')
|
56
|
+
|
57
|
+
self.zip_file_base64_encoded = attributes[:'zip_file_base64_encoded'] if attributes[:'zip_file_base64_encoded']
|
58
|
+
end
|
59
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
60
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
61
|
+
|
62
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
63
|
+
|
64
|
+
|
65
|
+
# Checks equality by comparing each attribute.
|
66
|
+
# @param [Object] other the other object to be compared
|
67
|
+
def ==(other)
|
68
|
+
return true if equal?(other)
|
69
|
+
|
70
|
+
self.class == other.class &&
|
71
|
+
config_source_type == other.config_source_type &&
|
72
|
+
working_directory == other.working_directory &&
|
73
|
+
zip_file_base64_encoded == other.zip_file_base64_encoded
|
74
|
+
end
|
75
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
76
|
+
|
77
|
+
# @see the `==` method
|
78
|
+
# @param [Object] other the other object to be compared
|
79
|
+
def eql?(other)
|
80
|
+
self == other
|
81
|
+
end
|
82
|
+
|
83
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
84
|
+
|
85
|
+
|
86
|
+
# Calculates hash code according to all attributes.
|
87
|
+
# @return [Fixnum] Hash code
|
88
|
+
def hash
|
89
|
+
[config_source_type, working_directory, zip_file_base64_encoded].hash
|
90
|
+
end
|
91
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
92
|
+
|
93
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
94
|
+
|
95
|
+
|
96
|
+
# Builds the object from hash
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
# @return [Object] Returns the model itself
|
99
|
+
def build_from_hash(attributes)
|
100
|
+
return nil unless attributes.is_a?(Hash)
|
101
|
+
|
102
|
+
self.class.swagger_types.each_pair do |key, type|
|
103
|
+
if type =~ /^Array<(.*)>/i
|
104
|
+
# check to ensure the input is an array given that the the attribute
|
105
|
+
# is documented as an array but the input is not
|
106
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
107
|
+
public_method("#{key}=").call(
|
108
|
+
attributes[self.class.attribute_map[key]]
|
109
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
110
|
+
)
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
public_method("#{key}=").call(
|
114
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
115
|
+
)
|
116
|
+
end
|
117
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
118
|
+
end
|
119
|
+
|
120
|
+
self
|
121
|
+
end
|
122
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
123
|
+
|
124
|
+
# Returns the string representation of the object
|
125
|
+
# @return [String] String presentation of the object
|
126
|
+
def to_s
|
127
|
+
to_hash.to_s
|
128
|
+
end
|
129
|
+
|
130
|
+
# Returns the object in the form of hash
|
131
|
+
# @return [Hash] Returns the object in the form of hash
|
132
|
+
def to_hash
|
133
|
+
hash = {}
|
134
|
+
self.class.attribute_map.each_pair do |attr, param|
|
135
|
+
value = public_method(attr).call
|
136
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
137
|
+
|
138
|
+
hash[param] = _to_hash(value)
|
139
|
+
end
|
140
|
+
hash
|
141
|
+
end
|
142
|
+
|
143
|
+
private
|
144
|
+
|
145
|
+
# Outputs non-array value in the form of hash
|
146
|
+
# For object, use to_hash. Otherwise, just return the value
|
147
|
+
# @param [Object] value Any valid value
|
148
|
+
# @return [Hash] Returns the value in the form of hash
|
149
|
+
def _to_hash(value)
|
150
|
+
if value.is_a?(Array)
|
151
|
+
value.compact.map { |v| _to_hash(v) }
|
152
|
+
elsif value.is_a?(Hash)
|
153
|
+
{}.tap do |hash|
|
154
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
155
|
+
end
|
156
|
+
elsif value.respond_to? :to_hash
|
157
|
+
value.to_hash
|
158
|
+
else
|
159
|
+
value
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -0,0 +1,149 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require_relative 'config_source'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
7
|
+
module OCI
|
8
|
+
# File path to the location of the zip file that contains the Terraform configuration.
|
9
|
+
#
|
10
|
+
class ResourceManager::Models::ZipUploadConfigSource < ResourceManager::Models::ConfigSource # rubocop:disable Metrics/LineLength
|
11
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
12
|
+
def self.attribute_map
|
13
|
+
{
|
14
|
+
# rubocop:disable Style/SymbolLiteral
|
15
|
+
'config_source_type': :'configSourceType',
|
16
|
+
'working_directory': :'workingDirectory'
|
17
|
+
# rubocop:enable Style/SymbolLiteral
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# Attribute type mapping.
|
22
|
+
def self.swagger_types
|
23
|
+
{
|
24
|
+
# rubocop:disable Style/SymbolLiteral
|
25
|
+
'config_source_type': :'String',
|
26
|
+
'working_directory': :'String'
|
27
|
+
# rubocop:enable Style/SymbolLiteral
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
32
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
33
|
+
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
# @option attributes [String] :working_directory The value to assign to the {OCI::ResourceManager::Models::ConfigSource#working_directory #working_directory} proprety
|
38
|
+
def initialize(attributes = {})
|
39
|
+
return unless attributes.is_a?(Hash)
|
40
|
+
|
41
|
+
attributes['configSourceType'] = 'ZIP_UPLOAD'
|
42
|
+
|
43
|
+
super(attributes)
|
44
|
+
end
|
45
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
46
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
47
|
+
|
48
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
49
|
+
|
50
|
+
|
51
|
+
# Checks equality by comparing each attribute.
|
52
|
+
# @param [Object] other the other object to be compared
|
53
|
+
def ==(other)
|
54
|
+
return true if equal?(other)
|
55
|
+
|
56
|
+
self.class == other.class &&
|
57
|
+
config_source_type == other.config_source_type &&
|
58
|
+
working_directory == other.working_directory
|
59
|
+
end
|
60
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
61
|
+
|
62
|
+
# @see the `==` method
|
63
|
+
# @param [Object] other the other object to be compared
|
64
|
+
def eql?(other)
|
65
|
+
self == other
|
66
|
+
end
|
67
|
+
|
68
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
69
|
+
|
70
|
+
|
71
|
+
# Calculates hash code according to all attributes.
|
72
|
+
# @return [Fixnum] Hash code
|
73
|
+
def hash
|
74
|
+
[config_source_type, working_directory].hash
|
75
|
+
end
|
76
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
77
|
+
|
78
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
79
|
+
|
80
|
+
|
81
|
+
# Builds the object from hash
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
# @return [Object] Returns the model itself
|
84
|
+
def build_from_hash(attributes)
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
86
|
+
|
87
|
+
self.class.swagger_types.each_pair do |key, type|
|
88
|
+
if type =~ /^Array<(.*)>/i
|
89
|
+
# check to ensure the input is an array given that the the attribute
|
90
|
+
# is documented as an array but the input is not
|
91
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
92
|
+
public_method("#{key}=").call(
|
93
|
+
attributes[self.class.attribute_map[key]]
|
94
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
95
|
+
)
|
96
|
+
end
|
97
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
98
|
+
public_method("#{key}=").call(
|
99
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
100
|
+
)
|
101
|
+
end
|
102
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
103
|
+
end
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
108
|
+
|
109
|
+
# Returns the string representation of the object
|
110
|
+
# @return [String] String presentation of the object
|
111
|
+
def to_s
|
112
|
+
to_hash.to_s
|
113
|
+
end
|
114
|
+
|
115
|
+
# Returns the object in the form of hash
|
116
|
+
# @return [Hash] Returns the object in the form of hash
|
117
|
+
def to_hash
|
118
|
+
hash = {}
|
119
|
+
self.class.attribute_map.each_pair do |attr, param|
|
120
|
+
value = public_method(attr).call
|
121
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
122
|
+
|
123
|
+
hash[param] = _to_hash(value)
|
124
|
+
end
|
125
|
+
hash
|
126
|
+
end
|
127
|
+
|
128
|
+
private
|
129
|
+
|
130
|
+
# Outputs non-array value in the form of hash
|
131
|
+
# For object, use to_hash. Otherwise, just return the value
|
132
|
+
# @param [Object] value Any valid value
|
133
|
+
# @return [Hash] Returns the value in the form of hash
|
134
|
+
def _to_hash(value)
|
135
|
+
if value.is_a?(Array)
|
136
|
+
value.compact.map { |v| _to_hash(v) }
|
137
|
+
elsif value.is_a?(Hash)
|
138
|
+
{}.tap do |hash|
|
139
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
140
|
+
end
|
141
|
+
elsif value.respond_to? :to_hash
|
142
|
+
value.to_hash
|
143
|
+
else
|
144
|
+
value
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
module OCI
|
4
|
+
module ResourceManager
|
5
|
+
# Module containing models for requests made to, and responses received from,
|
6
|
+
# OCI ResourceManager services
|
7
|
+
module Models
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Require models
|
13
|
+
require 'oci/resource_manager/models/apply_job_plan_resolution'
|
14
|
+
require 'oci/resource_manager/models/config_source'
|
15
|
+
require 'oci/resource_manager/models/create_config_source_details'
|
16
|
+
require 'oci/resource_manager/models/create_job_details'
|
17
|
+
require 'oci/resource_manager/models/create_stack_details'
|
18
|
+
require 'oci/resource_manager/models/create_zip_upload_config_source_details'
|
19
|
+
require 'oci/resource_manager/models/failure_details'
|
20
|
+
require 'oci/resource_manager/models/job'
|
21
|
+
require 'oci/resource_manager/models/job_summary'
|
22
|
+
require 'oci/resource_manager/models/log_entry'
|
23
|
+
require 'oci/resource_manager/models/stack'
|
24
|
+
require 'oci/resource_manager/models/stack_summary'
|
25
|
+
require 'oci/resource_manager/models/update_config_source_details'
|
26
|
+
require 'oci/resource_manager/models/update_job_details'
|
27
|
+
require 'oci/resource_manager/models/update_stack_details'
|
28
|
+
require 'oci/resource_manager/models/update_zip_upload_config_source_details'
|
29
|
+
require 'oci/resource_manager/models/zip_upload_config_source'
|
30
|
+
|
31
|
+
# Require generated clients
|
32
|
+
require 'oci/resource_manager/resource_manager_client'
|
33
|
+
require 'oci/resource_manager/resource_manager_client_composite_operations'
|
34
|
+
|
35
|
+
# Require service utilities
|
36
|
+
require 'oci/resource_manager/util'
|
@@ -0,0 +1,1264 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'uri'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
|
+
module OCI
|
8
|
+
# Oracle Resource Manager API.
|
9
|
+
class ResourceManager::ResourceManagerClient
|
10
|
+
# Client used to make HTTP requests.
|
11
|
+
# @return [OCI::ApiClient]
|
12
|
+
attr_reader :api_client
|
13
|
+
|
14
|
+
# Fully qualified endpoint URL
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :endpoint
|
17
|
+
|
18
|
+
# The default retry configuration to apply to all operations in this service client. This can be overridden
|
19
|
+
# on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
20
|
+
# will not perform any retries
|
21
|
+
# @return [OCI::Retry::RetryConfig]
|
22
|
+
attr_reader :retry_config
|
23
|
+
|
24
|
+
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :region
|
27
|
+
|
28
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
29
|
+
|
30
|
+
|
31
|
+
# Creates a new ResourceManagerClient.
|
32
|
+
# Notes:
|
33
|
+
# If a config is not specified, then the global OCI.config will be used.
|
34
|
+
#
|
35
|
+
# This client is not thread-safe
|
36
|
+
#
|
37
|
+
# Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the
|
38
|
+
# region. A region may be specified in the config or via or the region parameter. If specified in both, then the
|
39
|
+
# region parameter will be used.
|
40
|
+
# @param [Config] config A Config object.
|
41
|
+
# @param [String] region A region used to determine the service endpoint. This will usually
|
42
|
+
# correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
43
|
+
# @param [String] endpoint The fully qualified endpoint URL
|
44
|
+
# @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
|
45
|
+
# a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
|
46
|
+
# so that the instance principals signer can be provided to the client
|
47
|
+
# @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
|
48
|
+
# the details for the proxy can be provided in this parameter
|
49
|
+
# @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
|
50
|
+
# apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
51
|
+
# will not perform any retries
|
52
|
+
def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
53
|
+
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
54
|
+
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
55
|
+
# and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
|
56
|
+
# pass it to this constructor.
|
57
|
+
#
|
58
|
+
# If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
|
59
|
+
# so try and load the config from the default file.
|
60
|
+
config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
61
|
+
config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
62
|
+
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
63
|
+
|
64
|
+
if signer.nil?
|
65
|
+
signer = OCI::Signer.new(
|
66
|
+
config.user,
|
67
|
+
config.fingerprint,
|
68
|
+
config.tenancy,
|
69
|
+
config.key_file,
|
70
|
+
pass_phrase: config.pass_phrase,
|
71
|
+
private_key_content: config.key_content
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
75
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
76
|
+
@retry_config = retry_config
|
77
|
+
|
78
|
+
if endpoint
|
79
|
+
@endpoint = endpoint + '/20180917'
|
80
|
+
else
|
81
|
+
region ||= config.region
|
82
|
+
region ||= signer.region if signer.respond_to?(:region)
|
83
|
+
self.region = region
|
84
|
+
end
|
85
|
+
logger.info "ResourceManagerClient endpoint set to '#{@endpoint}'." if logger
|
86
|
+
end
|
87
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
88
|
+
|
89
|
+
# Set the region that will be used to determine the service endpoint.
|
90
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
91
|
+
# but may be an arbitrary string.
|
92
|
+
def region=(new_region)
|
93
|
+
@region = new_region
|
94
|
+
|
95
|
+
raise 'A region must be specified.' unless @region
|
96
|
+
|
97
|
+
@endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://resourcemanager.{region}.{secondLevelDomain}') + '/20180917'
|
98
|
+
logger.info "ResourceManagerClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
|
99
|
+
end
|
100
|
+
|
101
|
+
# @return [Logger] The logger for this client. May be nil.
|
102
|
+
def logger
|
103
|
+
@api_client.config.logger
|
104
|
+
end
|
105
|
+
|
106
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
107
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
108
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
109
|
+
|
110
|
+
|
111
|
+
# Indicates the intention to cancel the specified job.
|
112
|
+
# Cancellation of the job is not immediate, and may be delayed,
|
113
|
+
# or may not happen at all.
|
114
|
+
#
|
115
|
+
# @param [String] job_id The job OCID.
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
118
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
119
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
120
|
+
# particular request, please provide the request ID.
|
121
|
+
#
|
122
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match`
|
123
|
+
# parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource
|
124
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
125
|
+
#
|
126
|
+
# @return [Response] A Response object with data of type nil
|
127
|
+
def cancel_job(job_id, opts = {})
|
128
|
+
logger.debug 'Calling operation ResourceManagerClient#cancel_job.' if logger
|
129
|
+
|
130
|
+
raise "Missing the required parameter 'job_id' when calling cancel_job." if job_id.nil?
|
131
|
+
raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id)
|
132
|
+
|
133
|
+
path = '/jobs/{jobId}'.sub('{jobId}', job_id.to_s)
|
134
|
+
operation_signing_strategy = :standard
|
135
|
+
|
136
|
+
# rubocop:disable Style/NegatedIf
|
137
|
+
# Query Params
|
138
|
+
query_params = {}
|
139
|
+
|
140
|
+
# Header Params
|
141
|
+
header_params = {}
|
142
|
+
header_params[:accept] = 'application/json'
|
143
|
+
header_params[:'content-type'] = 'application/json'
|
144
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
145
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
146
|
+
# rubocop:enable Style/NegatedIf
|
147
|
+
|
148
|
+
post_body = nil
|
149
|
+
|
150
|
+
# rubocop:disable Metrics/BlockLength
|
151
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#cancel_job') do
|
152
|
+
@api_client.call_api(
|
153
|
+
:DELETE,
|
154
|
+
path,
|
155
|
+
endpoint,
|
156
|
+
header_params: header_params,
|
157
|
+
query_params: query_params,
|
158
|
+
operation_signing_strategy: operation_signing_strategy,
|
159
|
+
body: post_body
|
160
|
+
)
|
161
|
+
end
|
162
|
+
# rubocop:enable Metrics/BlockLength
|
163
|
+
end
|
164
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
165
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
166
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
167
|
+
|
168
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
169
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
170
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
171
|
+
|
172
|
+
|
173
|
+
# Creates a job.
|
174
|
+
# @param [OCI::ResourceManager::Models::CreateJobDetails] create_job_details The properties for a request to create a job.
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
177
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
178
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
179
|
+
# particular request, please provide the request ID.
|
180
|
+
#
|
181
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
182
|
+
# server error without risk of retrying the same action. Retry tokens expire after
|
183
|
+
# 24 hours, but can be invalidated before then due to conflicting operations. For example,
|
184
|
+
# if a resource has been deleted and purged from the system, then a retry of the original
|
185
|
+
# creation request may be rejected.
|
186
|
+
#
|
187
|
+
# @return [Response] A Response object with data of type {OCI::ResourceManager::Models::Job Job}
|
188
|
+
def create_job(create_job_details, opts = {})
|
189
|
+
logger.debug 'Calling operation ResourceManagerClient#create_job.' if logger
|
190
|
+
|
191
|
+
raise "Missing the required parameter 'create_job_details' when calling create_job." if create_job_details.nil?
|
192
|
+
|
193
|
+
path = '/jobs'
|
194
|
+
operation_signing_strategy = :standard
|
195
|
+
|
196
|
+
# rubocop:disable Style/NegatedIf
|
197
|
+
# Query Params
|
198
|
+
query_params = {}
|
199
|
+
|
200
|
+
# Header Params
|
201
|
+
header_params = {}
|
202
|
+
header_params[:accept] = 'application/json'
|
203
|
+
header_params[:'content-type'] = 'application/json'
|
204
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
205
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
206
|
+
# rubocop:enable Style/NegatedIf
|
207
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
208
|
+
|
209
|
+
post_body = @api_client.object_to_http_body(create_job_details)
|
210
|
+
|
211
|
+
# rubocop:disable Metrics/BlockLength
|
212
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#create_job') do
|
213
|
+
@api_client.call_api(
|
214
|
+
:POST,
|
215
|
+
path,
|
216
|
+
endpoint,
|
217
|
+
header_params: header_params,
|
218
|
+
query_params: query_params,
|
219
|
+
operation_signing_strategy: operation_signing_strategy,
|
220
|
+
body: post_body,
|
221
|
+
return_type: 'OCI::ResourceManager::Models::Job'
|
222
|
+
)
|
223
|
+
end
|
224
|
+
# rubocop:enable Metrics/BlockLength
|
225
|
+
end
|
226
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
227
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
228
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
229
|
+
|
230
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
231
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
232
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
233
|
+
|
234
|
+
|
235
|
+
# Creates a stack in the specified comparment.
|
236
|
+
# Specify the compartment using the compartment ID.
|
237
|
+
#
|
238
|
+
# @param [OCI::ResourceManager::Models::CreateStackDetails] create_stack_details The properties for creating a stack.
|
239
|
+
# @param [Hash] opts the optional parameters
|
240
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
241
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
242
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
243
|
+
# particular request, please provide the request ID.
|
244
|
+
#
|
245
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
246
|
+
# server error without risk of retrying the same action. Retry tokens expire after
|
247
|
+
# 24 hours, but can be invalidated before then due to conflicting operations. For example,
|
248
|
+
# if a resource has been deleted and purged from the system, then a retry of the original
|
249
|
+
# creation request may be rejected.
|
250
|
+
#
|
251
|
+
# @return [Response] A Response object with data of type {OCI::ResourceManager::Models::Stack Stack}
|
252
|
+
def create_stack(create_stack_details, opts = {})
|
253
|
+
logger.debug 'Calling operation ResourceManagerClient#create_stack.' if logger
|
254
|
+
|
255
|
+
raise "Missing the required parameter 'create_stack_details' when calling create_stack." if create_stack_details.nil?
|
256
|
+
|
257
|
+
path = '/stacks'
|
258
|
+
operation_signing_strategy = :standard
|
259
|
+
|
260
|
+
# rubocop:disable Style/NegatedIf
|
261
|
+
# Query Params
|
262
|
+
query_params = {}
|
263
|
+
|
264
|
+
# Header Params
|
265
|
+
header_params = {}
|
266
|
+
header_params[:accept] = 'application/json'
|
267
|
+
header_params[:'content-type'] = 'application/json'
|
268
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
269
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
270
|
+
# rubocop:enable Style/NegatedIf
|
271
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
272
|
+
|
273
|
+
post_body = @api_client.object_to_http_body(create_stack_details)
|
274
|
+
|
275
|
+
# rubocop:disable Metrics/BlockLength
|
276
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#create_stack') do
|
277
|
+
@api_client.call_api(
|
278
|
+
:POST,
|
279
|
+
path,
|
280
|
+
endpoint,
|
281
|
+
header_params: header_params,
|
282
|
+
query_params: query_params,
|
283
|
+
operation_signing_strategy: operation_signing_strategy,
|
284
|
+
body: post_body,
|
285
|
+
return_type: 'OCI::ResourceManager::Models::Stack'
|
286
|
+
)
|
287
|
+
end
|
288
|
+
# rubocop:enable Metrics/BlockLength
|
289
|
+
end
|
290
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
291
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
292
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
293
|
+
|
294
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
295
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
296
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
297
|
+
|
298
|
+
|
299
|
+
# Deletes the specified stack object.
|
300
|
+
# @param [String] stack_id The stack OCID.
|
301
|
+
# @param [Hash] opts the optional parameters
|
302
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
303
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
304
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
305
|
+
# particular request, please provide the request ID.
|
306
|
+
#
|
307
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match`
|
308
|
+
# parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource
|
309
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
310
|
+
#
|
311
|
+
# @return [Response] A Response object with data of type nil
|
312
|
+
def delete_stack(stack_id, opts = {})
|
313
|
+
logger.debug 'Calling operation ResourceManagerClient#delete_stack.' if logger
|
314
|
+
|
315
|
+
raise "Missing the required parameter 'stack_id' when calling delete_stack." if stack_id.nil?
|
316
|
+
raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id)
|
317
|
+
|
318
|
+
path = '/stacks/{stackId}'.sub('{stackId}', stack_id.to_s)
|
319
|
+
operation_signing_strategy = :standard
|
320
|
+
|
321
|
+
# rubocop:disable Style/NegatedIf
|
322
|
+
# Query Params
|
323
|
+
query_params = {}
|
324
|
+
|
325
|
+
# Header Params
|
326
|
+
header_params = {}
|
327
|
+
header_params[:accept] = 'application/json'
|
328
|
+
header_params[:'content-type'] = 'application/json'
|
329
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
330
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
331
|
+
# rubocop:enable Style/NegatedIf
|
332
|
+
|
333
|
+
post_body = nil
|
334
|
+
|
335
|
+
# rubocop:disable Metrics/BlockLength
|
336
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#delete_stack') do
|
337
|
+
@api_client.call_api(
|
338
|
+
:DELETE,
|
339
|
+
path,
|
340
|
+
endpoint,
|
341
|
+
header_params: header_params,
|
342
|
+
query_params: query_params,
|
343
|
+
operation_signing_strategy: operation_signing_strategy,
|
344
|
+
body: post_body
|
345
|
+
)
|
346
|
+
end
|
347
|
+
# rubocop:enable Metrics/BlockLength
|
348
|
+
end
|
349
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
350
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
351
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
352
|
+
|
353
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
354
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
355
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
356
|
+
|
357
|
+
|
358
|
+
# Returns the specified job along with the job details.
|
359
|
+
# @param [String] job_id The job OCID.
|
360
|
+
# @param [Hash] opts the optional parameters
|
361
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
362
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
363
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
364
|
+
# particular request, please provide the request ID.
|
365
|
+
#
|
366
|
+
# @return [Response] A Response object with data of type {OCI::ResourceManager::Models::Job Job}
|
367
|
+
def get_job(job_id, opts = {})
|
368
|
+
logger.debug 'Calling operation ResourceManagerClient#get_job.' if logger
|
369
|
+
|
370
|
+
raise "Missing the required parameter 'job_id' when calling get_job." if job_id.nil?
|
371
|
+
raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id)
|
372
|
+
|
373
|
+
path = '/jobs/{jobId}'.sub('{jobId}', job_id.to_s)
|
374
|
+
operation_signing_strategy = :standard
|
375
|
+
|
376
|
+
# rubocop:disable Style/NegatedIf
|
377
|
+
# Query Params
|
378
|
+
query_params = {}
|
379
|
+
|
380
|
+
# Header Params
|
381
|
+
header_params = {}
|
382
|
+
header_params[:accept] = 'application/json'
|
383
|
+
header_params[:'content-type'] = 'application/json'
|
384
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
385
|
+
# rubocop:enable Style/NegatedIf
|
386
|
+
|
387
|
+
post_body = nil
|
388
|
+
|
389
|
+
# rubocop:disable Metrics/BlockLength
|
390
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_job') do
|
391
|
+
@api_client.call_api(
|
392
|
+
:GET,
|
393
|
+
path,
|
394
|
+
endpoint,
|
395
|
+
header_params: header_params,
|
396
|
+
query_params: query_params,
|
397
|
+
operation_signing_strategy: operation_signing_strategy,
|
398
|
+
body: post_body,
|
399
|
+
return_type: 'OCI::ResourceManager::Models::Job'
|
400
|
+
)
|
401
|
+
end
|
402
|
+
# rubocop:enable Metrics/BlockLength
|
403
|
+
end
|
404
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
405
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
406
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
407
|
+
|
408
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
409
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
410
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
411
|
+
|
412
|
+
|
413
|
+
# Returns log entries for the specified job in JSON format.
|
414
|
+
#
|
415
|
+
# @param [String] job_id The job OCID.
|
416
|
+
# @param [Hash] opts the optional parameters
|
417
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
418
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
419
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
420
|
+
# particular request, please provide the request ID.
|
421
|
+
#
|
422
|
+
# @option opts [Array<OCI::ResourceManager::Models::OCI::ResourceManager::Models::LogEntryType>] :type A filter that returns only logs of a specified type.
|
423
|
+
#
|
424
|
+
# @option opts [String] :level_greater_than_or_equal_to A filter that returns only log entries that match a given severity level or greater.
|
425
|
+
#
|
426
|
+
# @option opts [String] :sort_order The sort order, either `ASC` (ascending) or `DESC` (descending).
|
427
|
+
#
|
428
|
+
# Allowed values are: ASC, DESC
|
429
|
+
# @option opts [Integer] :limit The number of items returned in a paginated `List` call. For information about pagination, see
|
430
|
+
# [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
431
|
+
#
|
432
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the preceding `List` call.
|
433
|
+
# For information about pagination, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
434
|
+
#
|
435
|
+
# @option opts [DateTime] :timestamp_greater_than_or_equal_to Time stamp specifying the lower time limit for which logs are returned in a query.
|
436
|
+
#
|
437
|
+
# @option opts [DateTime] :timestamp_less_than_or_equal_to Time stamp specifying the upper time limit for which logs are returned in a query.
|
438
|
+
#
|
439
|
+
# @return [Response] A Response object with data of type Array<{OCI::ResourceManager::Models::LogEntry LogEntry}>
|
440
|
+
def get_job_logs(job_id, opts = {})
|
441
|
+
logger.debug 'Calling operation ResourceManagerClient#get_job_logs.' if logger
|
442
|
+
|
443
|
+
raise "Missing the required parameter 'job_id' when calling get_job_logs." if job_id.nil?
|
444
|
+
|
445
|
+
if opts[:level_greater_than_or_equal_to] && !OCI::ResourceManager::Models::LogEntry::LEVEL_ENUM.include?(opts[:level_greater_than_or_equal_to])
|
446
|
+
raise 'Invalid value for "level_greater_than_or_equal_to", must be one of the values in OCI::ResourceManager::Models::LogEntry::LEVEL_ENUM.'
|
447
|
+
end
|
448
|
+
|
449
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
450
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
451
|
+
end
|
452
|
+
raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id)
|
453
|
+
|
454
|
+
path = '/jobs/{jobId}/logs'.sub('{jobId}', job_id.to_s)
|
455
|
+
operation_signing_strategy = :standard
|
456
|
+
|
457
|
+
# rubocop:disable Style/NegatedIf
|
458
|
+
# Query Params
|
459
|
+
query_params = {}
|
460
|
+
query_params[:type] = OCI::ApiClient.build_collection_params(opts[:type], :multi) if opts[:type] && !opts[:type].empty?
|
461
|
+
query_params[:levelGreaterThanOrEqualTo] = opts[:level_greater_than_or_equal_to] if opts[:level_greater_than_or_equal_to]
|
462
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
463
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
464
|
+
query_params[:page] = opts[:page] if opts[:page]
|
465
|
+
query_params[:timestampGreaterThanOrEqualTo] = opts[:timestamp_greater_than_or_equal_to] if opts[:timestamp_greater_than_or_equal_to]
|
466
|
+
query_params[:timestampLessThanOrEqualTo] = opts[:timestamp_less_than_or_equal_to] if opts[:timestamp_less_than_or_equal_to]
|
467
|
+
|
468
|
+
# Header Params
|
469
|
+
header_params = {}
|
470
|
+
header_params[:accept] = 'application/json'
|
471
|
+
header_params[:'content-type'] = 'application/json'
|
472
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
473
|
+
# rubocop:enable Style/NegatedIf
|
474
|
+
|
475
|
+
post_body = nil
|
476
|
+
|
477
|
+
# rubocop:disable Metrics/BlockLength
|
478
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_job_logs') do
|
479
|
+
@api_client.call_api(
|
480
|
+
:GET,
|
481
|
+
path,
|
482
|
+
endpoint,
|
483
|
+
header_params: header_params,
|
484
|
+
query_params: query_params,
|
485
|
+
operation_signing_strategy: operation_signing_strategy,
|
486
|
+
body: post_body,
|
487
|
+
return_type: 'Array<OCI::ResourceManager::Models::LogEntry>'
|
488
|
+
)
|
489
|
+
end
|
490
|
+
# rubocop:enable Metrics/BlockLength
|
491
|
+
end
|
492
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
493
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
494
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
495
|
+
|
496
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
497
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
498
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
499
|
+
|
500
|
+
|
501
|
+
# Returns raw log file for the specified job in text format.
|
502
|
+
# Returns a maximum of 100,000 log entries.
|
503
|
+
#
|
504
|
+
# @param [String] job_id The job OCID.
|
505
|
+
# @param [Hash] opts the optional parameters
|
506
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
507
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
508
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
509
|
+
# particular request, please provide the request ID.
|
510
|
+
#
|
511
|
+
# @return [Response] A Response object with data of type String
|
512
|
+
def get_job_logs_content(job_id, opts = {})
|
513
|
+
logger.debug 'Calling operation ResourceManagerClient#get_job_logs_content.' if logger
|
514
|
+
|
515
|
+
raise "Missing the required parameter 'job_id' when calling get_job_logs_content." if job_id.nil?
|
516
|
+
raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id)
|
517
|
+
|
518
|
+
path = '/jobs/{jobId}/logs/content'.sub('{jobId}', job_id.to_s)
|
519
|
+
operation_signing_strategy = :standard
|
520
|
+
|
521
|
+
# rubocop:disable Style/NegatedIf
|
522
|
+
# Query Params
|
523
|
+
query_params = {}
|
524
|
+
|
525
|
+
# Header Params
|
526
|
+
header_params = {}
|
527
|
+
header_params[:accept] = 'text/plain; charset=utf-8'
|
528
|
+
header_params[:'content-type'] = 'application/json'
|
529
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
530
|
+
# rubocop:enable Style/NegatedIf
|
531
|
+
|
532
|
+
post_body = nil
|
533
|
+
|
534
|
+
# rubocop:disable Metrics/BlockLength
|
535
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_job_logs_content') do
|
536
|
+
@api_client.call_api(
|
537
|
+
:GET,
|
538
|
+
path,
|
539
|
+
endpoint,
|
540
|
+
header_params: header_params,
|
541
|
+
query_params: query_params,
|
542
|
+
operation_signing_strategy: operation_signing_strategy,
|
543
|
+
body: post_body,
|
544
|
+
return_type: 'String'
|
545
|
+
)
|
546
|
+
end
|
547
|
+
# rubocop:enable Metrics/BlockLength
|
548
|
+
end
|
549
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
550
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
551
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
552
|
+
|
553
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
554
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
555
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
556
|
+
|
557
|
+
|
558
|
+
# Returns the Terraform configuration file for the specified job in .zip format.
|
559
|
+
# Returns an error if no zip file is found.
|
560
|
+
#
|
561
|
+
# @param [String] job_id The job OCID.
|
562
|
+
# @param [Hash] opts the optional parameters
|
563
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
564
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
565
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
566
|
+
# particular request, please provide the request ID.
|
567
|
+
#
|
568
|
+
# @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given
|
569
|
+
# @option [Block] &block Streaming http body to the block
|
570
|
+
# @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data
|
571
|
+
def get_job_tf_config(job_id, opts = {}, &block)
|
572
|
+
logger.debug 'Calling operation ResourceManagerClient#get_job_tf_config.' if logger
|
573
|
+
|
574
|
+
raise "Missing the required parameter 'job_id' when calling get_job_tf_config." if job_id.nil?
|
575
|
+
raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id)
|
576
|
+
|
577
|
+
path = '/jobs/{jobId}/tfConfig'.sub('{jobId}', job_id.to_s)
|
578
|
+
operation_signing_strategy = :standard
|
579
|
+
|
580
|
+
# rubocop:disable Style/NegatedIf
|
581
|
+
# Query Params
|
582
|
+
query_params = {}
|
583
|
+
|
584
|
+
# Header Params
|
585
|
+
header_params = {}
|
586
|
+
header_params[:accept] = opts[:accept] if opts[:accept]
|
587
|
+
header_params[:accept] ||= 'application/zip'
|
588
|
+
header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
|
589
|
+
header_params[:'content-type'] = 'application/json'
|
590
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
591
|
+
# rubocop:enable Style/NegatedIf
|
592
|
+
|
593
|
+
post_body = nil
|
594
|
+
|
595
|
+
# rubocop:disable Metrics/BlockLength
|
596
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_job_tf_config') do
|
597
|
+
if !block.nil?
|
598
|
+
@api_client.call_api(
|
599
|
+
:GET,
|
600
|
+
path,
|
601
|
+
endpoint,
|
602
|
+
header_params: header_params,
|
603
|
+
query_params: query_params,
|
604
|
+
operation_signing_strategy: operation_signing_strategy,
|
605
|
+
body: post_body,
|
606
|
+
return_type: 'Stream',
|
607
|
+
&block
|
608
|
+
)
|
609
|
+
elsif opts[:response_target]
|
610
|
+
if opts[:response_target].respond_to? :write
|
611
|
+
@api_client.call_api(
|
612
|
+
:GET,
|
613
|
+
path,
|
614
|
+
endpoint,
|
615
|
+
header_params: header_params,
|
616
|
+
query_params: query_params,
|
617
|
+
operation_signing_strategy: operation_signing_strategy,
|
618
|
+
body: post_body,
|
619
|
+
return_type: 'Stream',
|
620
|
+
&proc { |chunk, _response| opts[:response_target].write(chunk) }
|
621
|
+
)
|
622
|
+
elsif opts[:response_target].is_a?(String)
|
623
|
+
File.open(opts[:response_target], 'wb') do |output|
|
624
|
+
return @api_client.call_api(
|
625
|
+
:GET,
|
626
|
+
path,
|
627
|
+
endpoint,
|
628
|
+
header_params: header_params,
|
629
|
+
query_params: query_params,
|
630
|
+
operation_signing_strategy: operation_signing_strategy,
|
631
|
+
body: post_body,
|
632
|
+
return_type: 'Stream',
|
633
|
+
&proc { |chunk, _response| output.write(chunk) }
|
634
|
+
)
|
635
|
+
end
|
636
|
+
end
|
637
|
+
else
|
638
|
+
@api_client.call_api(
|
639
|
+
:GET,
|
640
|
+
path,
|
641
|
+
endpoint,
|
642
|
+
header_params: header_params,
|
643
|
+
query_params: query_params,
|
644
|
+
operation_signing_strategy: operation_signing_strategy,
|
645
|
+
body: post_body,
|
646
|
+
return_type: 'String'
|
647
|
+
)
|
648
|
+
end
|
649
|
+
end
|
650
|
+
# rubocop:enable Metrics/BlockLength
|
651
|
+
end
|
652
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
653
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
654
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
655
|
+
|
656
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
657
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
658
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
659
|
+
|
660
|
+
|
661
|
+
# Returns the Terraform state for the specified job.
|
662
|
+
# @param [String] job_id The job OCID.
|
663
|
+
# @param [Hash] opts the optional parameters
|
664
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
665
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
666
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
667
|
+
# particular request, please provide the request ID.
|
668
|
+
#
|
669
|
+
# @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given
|
670
|
+
# @option [Block] &block Streaming http body to the block
|
671
|
+
# @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data
|
672
|
+
def get_job_tf_state(job_id, opts = {}, &block)
|
673
|
+
logger.debug 'Calling operation ResourceManagerClient#get_job_tf_state.' if logger
|
674
|
+
|
675
|
+
raise "Missing the required parameter 'job_id' when calling get_job_tf_state." if job_id.nil?
|
676
|
+
raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id)
|
677
|
+
|
678
|
+
path = '/jobs/{jobId}/tfState'.sub('{jobId}', job_id.to_s)
|
679
|
+
operation_signing_strategy = :standard
|
680
|
+
|
681
|
+
# rubocop:disable Style/NegatedIf
|
682
|
+
# Query Params
|
683
|
+
query_params = {}
|
684
|
+
|
685
|
+
# Header Params
|
686
|
+
header_params = {}
|
687
|
+
header_params[:accept] = opts[:accept] if opts[:accept]
|
688
|
+
header_params[:accept] ||= 'application/octet-stream'
|
689
|
+
header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
|
690
|
+
header_params[:'content-type'] = 'application/json'
|
691
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
692
|
+
# rubocop:enable Style/NegatedIf
|
693
|
+
|
694
|
+
post_body = nil
|
695
|
+
|
696
|
+
# rubocop:disable Metrics/BlockLength
|
697
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_job_tf_state') do
|
698
|
+
if !block.nil?
|
699
|
+
@api_client.call_api(
|
700
|
+
:GET,
|
701
|
+
path,
|
702
|
+
endpoint,
|
703
|
+
header_params: header_params,
|
704
|
+
query_params: query_params,
|
705
|
+
operation_signing_strategy: operation_signing_strategy,
|
706
|
+
body: post_body,
|
707
|
+
return_type: 'Stream',
|
708
|
+
&block
|
709
|
+
)
|
710
|
+
elsif opts[:response_target]
|
711
|
+
if opts[:response_target].respond_to? :write
|
712
|
+
@api_client.call_api(
|
713
|
+
:GET,
|
714
|
+
path,
|
715
|
+
endpoint,
|
716
|
+
header_params: header_params,
|
717
|
+
query_params: query_params,
|
718
|
+
operation_signing_strategy: operation_signing_strategy,
|
719
|
+
body: post_body,
|
720
|
+
return_type: 'Stream',
|
721
|
+
&proc { |chunk, _response| opts[:response_target].write(chunk) }
|
722
|
+
)
|
723
|
+
elsif opts[:response_target].is_a?(String)
|
724
|
+
File.open(opts[:response_target], 'wb') do |output|
|
725
|
+
return @api_client.call_api(
|
726
|
+
:GET,
|
727
|
+
path,
|
728
|
+
endpoint,
|
729
|
+
header_params: header_params,
|
730
|
+
query_params: query_params,
|
731
|
+
operation_signing_strategy: operation_signing_strategy,
|
732
|
+
body: post_body,
|
733
|
+
return_type: 'Stream',
|
734
|
+
&proc { |chunk, _response| output.write(chunk) }
|
735
|
+
)
|
736
|
+
end
|
737
|
+
end
|
738
|
+
else
|
739
|
+
@api_client.call_api(
|
740
|
+
:GET,
|
741
|
+
path,
|
742
|
+
endpoint,
|
743
|
+
header_params: header_params,
|
744
|
+
query_params: query_params,
|
745
|
+
operation_signing_strategy: operation_signing_strategy,
|
746
|
+
body: post_body,
|
747
|
+
return_type: 'String'
|
748
|
+
)
|
749
|
+
end
|
750
|
+
end
|
751
|
+
# rubocop:enable Metrics/BlockLength
|
752
|
+
end
|
753
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
754
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
755
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
756
|
+
|
757
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
758
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
759
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
760
|
+
|
761
|
+
|
762
|
+
# Gets a stack using the stack ID.
|
763
|
+
# @param [String] stack_id The stack OCID.
|
764
|
+
# @param [Hash] opts the optional parameters
|
765
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
766
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
767
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
768
|
+
# particular request, please provide the request ID.
|
769
|
+
#
|
770
|
+
# @return [Response] A Response object with data of type {OCI::ResourceManager::Models::Stack Stack}
|
771
|
+
def get_stack(stack_id, opts = {})
|
772
|
+
logger.debug 'Calling operation ResourceManagerClient#get_stack.' if logger
|
773
|
+
|
774
|
+
raise "Missing the required parameter 'stack_id' when calling get_stack." if stack_id.nil?
|
775
|
+
raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id)
|
776
|
+
|
777
|
+
path = '/stacks/{stackId}'.sub('{stackId}', stack_id.to_s)
|
778
|
+
operation_signing_strategy = :standard
|
779
|
+
|
780
|
+
# rubocop:disable Style/NegatedIf
|
781
|
+
# Query Params
|
782
|
+
query_params = {}
|
783
|
+
|
784
|
+
# Header Params
|
785
|
+
header_params = {}
|
786
|
+
header_params[:accept] = 'application/json'
|
787
|
+
header_params[:'content-type'] = 'application/json'
|
788
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
789
|
+
# rubocop:enable Style/NegatedIf
|
790
|
+
|
791
|
+
post_body = nil
|
792
|
+
|
793
|
+
# rubocop:disable Metrics/BlockLength
|
794
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_stack') do
|
795
|
+
@api_client.call_api(
|
796
|
+
:GET,
|
797
|
+
path,
|
798
|
+
endpoint,
|
799
|
+
header_params: header_params,
|
800
|
+
query_params: query_params,
|
801
|
+
operation_signing_strategy: operation_signing_strategy,
|
802
|
+
body: post_body,
|
803
|
+
return_type: 'OCI::ResourceManager::Models::Stack'
|
804
|
+
)
|
805
|
+
end
|
806
|
+
# rubocop:enable Metrics/BlockLength
|
807
|
+
end
|
808
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
809
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
810
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
811
|
+
|
812
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
813
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
814
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
815
|
+
|
816
|
+
|
817
|
+
# Returns the Terraform configuration file in .zip format for the specified stack.
|
818
|
+
# Returns an error if no zip file is found.
|
819
|
+
#
|
820
|
+
# @param [String] stack_id The stack OCID.
|
821
|
+
# @param [Hash] opts the optional parameters
|
822
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
823
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
824
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
825
|
+
# particular request, please provide the request ID.
|
826
|
+
#
|
827
|
+
# @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given
|
828
|
+
# @option [Block] &block Streaming http body to the block
|
829
|
+
# @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data
|
830
|
+
def get_stack_tf_config(stack_id, opts = {}, &block)
|
831
|
+
logger.debug 'Calling operation ResourceManagerClient#get_stack_tf_config.' if logger
|
832
|
+
|
833
|
+
raise "Missing the required parameter 'stack_id' when calling get_stack_tf_config." if stack_id.nil?
|
834
|
+
raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id)
|
835
|
+
|
836
|
+
path = '/stacks/{stackId}/tfConfig'.sub('{stackId}', stack_id.to_s)
|
837
|
+
operation_signing_strategy = :standard
|
838
|
+
|
839
|
+
# rubocop:disable Style/NegatedIf
|
840
|
+
# Query Params
|
841
|
+
query_params = {}
|
842
|
+
|
843
|
+
# Header Params
|
844
|
+
header_params = {}
|
845
|
+
header_params[:accept] = opts[:accept] if opts[:accept]
|
846
|
+
header_params[:accept] ||= 'application/zip'
|
847
|
+
header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
|
848
|
+
header_params[:'content-type'] = 'application/json'
|
849
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
850
|
+
# rubocop:enable Style/NegatedIf
|
851
|
+
|
852
|
+
post_body = nil
|
853
|
+
|
854
|
+
# rubocop:disable Metrics/BlockLength
|
855
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#get_stack_tf_config') do
|
856
|
+
if !block.nil?
|
857
|
+
@api_client.call_api(
|
858
|
+
:GET,
|
859
|
+
path,
|
860
|
+
endpoint,
|
861
|
+
header_params: header_params,
|
862
|
+
query_params: query_params,
|
863
|
+
operation_signing_strategy: operation_signing_strategy,
|
864
|
+
body: post_body,
|
865
|
+
return_type: 'Stream',
|
866
|
+
&block
|
867
|
+
)
|
868
|
+
elsif opts[:response_target]
|
869
|
+
if opts[:response_target].respond_to? :write
|
870
|
+
@api_client.call_api(
|
871
|
+
:GET,
|
872
|
+
path,
|
873
|
+
endpoint,
|
874
|
+
header_params: header_params,
|
875
|
+
query_params: query_params,
|
876
|
+
operation_signing_strategy: operation_signing_strategy,
|
877
|
+
body: post_body,
|
878
|
+
return_type: 'Stream',
|
879
|
+
&proc { |chunk, _response| opts[:response_target].write(chunk) }
|
880
|
+
)
|
881
|
+
elsif opts[:response_target].is_a?(String)
|
882
|
+
File.open(opts[:response_target], 'wb') do |output|
|
883
|
+
return @api_client.call_api(
|
884
|
+
:GET,
|
885
|
+
path,
|
886
|
+
endpoint,
|
887
|
+
header_params: header_params,
|
888
|
+
query_params: query_params,
|
889
|
+
operation_signing_strategy: operation_signing_strategy,
|
890
|
+
body: post_body,
|
891
|
+
return_type: 'Stream',
|
892
|
+
&proc { |chunk, _response| output.write(chunk) }
|
893
|
+
)
|
894
|
+
end
|
895
|
+
end
|
896
|
+
else
|
897
|
+
@api_client.call_api(
|
898
|
+
:GET,
|
899
|
+
path,
|
900
|
+
endpoint,
|
901
|
+
header_params: header_params,
|
902
|
+
query_params: query_params,
|
903
|
+
operation_signing_strategy: operation_signing_strategy,
|
904
|
+
body: post_body,
|
905
|
+
return_type: 'String'
|
906
|
+
)
|
907
|
+
end
|
908
|
+
end
|
909
|
+
# rubocop:enable Metrics/BlockLength
|
910
|
+
end
|
911
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
912
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
913
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
914
|
+
|
915
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
916
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
917
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
918
|
+
|
919
|
+
|
920
|
+
# Returns a list of jobs in a stack or compartment, ordered by time created.
|
921
|
+
#
|
922
|
+
# - To list all jobs in a stack, provide the stack OCID.
|
923
|
+
# - To list all jobs in a compartment, provide the compartment OCID.
|
924
|
+
# - To return a specific job, provide the job OCID.
|
925
|
+
#
|
926
|
+
# @param [Hash] opts the optional parameters
|
927
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
928
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
929
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
930
|
+
# particular request, please provide the request ID.
|
931
|
+
#
|
932
|
+
# @option opts [String] :compartment_id The compartment OCID on which to filter.
|
933
|
+
# @option opts [String] :stack_id The stack OCID on which to filter.
|
934
|
+
#
|
935
|
+
# @option opts [String] :id The OCID on which to query for jobs.
|
936
|
+
#
|
937
|
+
# @option opts [String] :lifecycle_state A filter that returns all resources that match the specified lifecycle state.
|
938
|
+
# The state value is case-insensitive.
|
939
|
+
#
|
940
|
+
# Allowable values:
|
941
|
+
# - ACCEPTED
|
942
|
+
# - IN_PROGRESS
|
943
|
+
# - FAILED
|
944
|
+
# - SUCCEEDED
|
945
|
+
# - CANCELING
|
946
|
+
# - CANCELED
|
947
|
+
#
|
948
|
+
# @option opts [String] :display_name Display name on which to query.
|
949
|
+
# @option opts [String] :sort_by Specifies the field on which to sort.
|
950
|
+
# By default, `TIMECREATED` is ordered descending.
|
951
|
+
# By default, `DISPLAYNAME` is ordered ascending. Note that you can sort only on one field.
|
952
|
+
#
|
953
|
+
# Allowed values are: TIMECREATED, DISPLAYNAME
|
954
|
+
# @option opts [String] :sort_order The sort order, either `ASC` (ascending) or `DESC` (descending).
|
955
|
+
#
|
956
|
+
# Allowed values are: ASC, DESC
|
957
|
+
# @option opts [Integer] :limit The number of items returned in a paginated `List` call. For information about pagination, see
|
958
|
+
# [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
959
|
+
#
|
960
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the preceding `List` call.
|
961
|
+
# For information about pagination, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
962
|
+
#
|
963
|
+
# @return [Response] A Response object with data of type Array<{OCI::ResourceManager::Models::JobSummary JobSummary}>
|
964
|
+
def list_jobs(opts = {})
|
965
|
+
logger.debug 'Calling operation ResourceManagerClient#list_jobs.' if logger
|
966
|
+
|
967
|
+
|
968
|
+
if opts[:lifecycle_state] && !OCI::ResourceManager::Models::Job::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
|
969
|
+
raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::ResourceManager::Models::Job::LIFECYCLE_STATE_ENUM.'
|
970
|
+
end
|
971
|
+
|
972
|
+
if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
|
973
|
+
raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
|
974
|
+
end
|
975
|
+
|
976
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
977
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
978
|
+
end
|
979
|
+
|
980
|
+
path = '/jobs'
|
981
|
+
operation_signing_strategy = :standard
|
982
|
+
|
983
|
+
# rubocop:disable Style/NegatedIf
|
984
|
+
# Query Params
|
985
|
+
query_params = {}
|
986
|
+
query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
|
987
|
+
query_params[:stackId] = opts[:stack_id] if opts[:stack_id]
|
988
|
+
query_params[:id] = opts[:id] if opts[:id]
|
989
|
+
query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
|
990
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
991
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
992
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
993
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
994
|
+
query_params[:page] = opts[:page] if opts[:page]
|
995
|
+
|
996
|
+
# Header Params
|
997
|
+
header_params = {}
|
998
|
+
header_params[:accept] = 'application/json'
|
999
|
+
header_params[:'content-type'] = 'application/json'
|
1000
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1001
|
+
# rubocop:enable Style/NegatedIf
|
1002
|
+
|
1003
|
+
post_body = nil
|
1004
|
+
|
1005
|
+
# rubocop:disable Metrics/BlockLength
|
1006
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#list_jobs') do
|
1007
|
+
@api_client.call_api(
|
1008
|
+
:GET,
|
1009
|
+
path,
|
1010
|
+
endpoint,
|
1011
|
+
header_params: header_params,
|
1012
|
+
query_params: query_params,
|
1013
|
+
operation_signing_strategy: operation_signing_strategy,
|
1014
|
+
body: post_body,
|
1015
|
+
return_type: 'Array<OCI::ResourceManager::Models::JobSummary>'
|
1016
|
+
)
|
1017
|
+
end
|
1018
|
+
# rubocop:enable Metrics/BlockLength
|
1019
|
+
end
|
1020
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1021
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1022
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1023
|
+
|
1024
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1025
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1026
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1027
|
+
|
1028
|
+
|
1029
|
+
# Returns a list of stacks.
|
1030
|
+
# - If called using the compartment ID, returns all stacks in the specified compartment.
|
1031
|
+
# - If called using the stack ID, returns the specified stack.
|
1032
|
+
#
|
1033
|
+
# @param [Hash] opts the optional parameters
|
1034
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
1035
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
1036
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1037
|
+
# particular request, please provide the request ID.
|
1038
|
+
#
|
1039
|
+
# @option opts [String] :compartment_id The compartment OCID on which to filter.
|
1040
|
+
# @option opts [String] :id The OCID on which to query for a stack.
|
1041
|
+
#
|
1042
|
+
# @option opts [String] :lifecycle_state A filter that returns only those resources that match the specified
|
1043
|
+
# lifecycle state. The state value is case-insensitive.
|
1044
|
+
#
|
1045
|
+
# Allowable values:
|
1046
|
+
# - CREATING
|
1047
|
+
# - ACTIVE
|
1048
|
+
# - DELETING
|
1049
|
+
# - DELETED
|
1050
|
+
#
|
1051
|
+
#
|
1052
|
+
# @option opts [String] :display_name Display name on which to query.
|
1053
|
+
# @option opts [String] :sort_by Specifies the field on which to sort.
|
1054
|
+
# By default, `TIMECREATED` is ordered descending.
|
1055
|
+
# By default, `DISPLAYNAME` is ordered ascending. Note that you can sort only on one field.
|
1056
|
+
#
|
1057
|
+
# Allowed values are: TIMECREATED, DISPLAYNAME
|
1058
|
+
# @option opts [String] :sort_order The sort order, either `ASC` (ascending) or `DESC` (descending).
|
1059
|
+
#
|
1060
|
+
# Allowed values are: ASC, DESC
|
1061
|
+
# @option opts [Integer] :limit The number of items returned in a paginated `List` call. For information about pagination, see
|
1062
|
+
# [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
1063
|
+
#
|
1064
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the preceding `List` call.
|
1065
|
+
# For information about pagination, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
1066
|
+
#
|
1067
|
+
# @return [Response] A Response object with data of type Array<{OCI::ResourceManager::Models::StackSummary StackSummary}>
|
1068
|
+
def list_stacks(opts = {})
|
1069
|
+
logger.debug 'Calling operation ResourceManagerClient#list_stacks.' if logger
|
1070
|
+
|
1071
|
+
|
1072
|
+
if opts[:lifecycle_state] && !OCI::ResourceManager::Models::Stack::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
|
1073
|
+
raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::ResourceManager::Models::Stack::LIFECYCLE_STATE_ENUM.'
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
if opts[:sort_by] && !%w[TIMECREATED DISPLAYNAME].include?(opts[:sort_by])
|
1077
|
+
raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
1081
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
path = '/stacks'
|
1085
|
+
operation_signing_strategy = :standard
|
1086
|
+
|
1087
|
+
# rubocop:disable Style/NegatedIf
|
1088
|
+
# Query Params
|
1089
|
+
query_params = {}
|
1090
|
+
query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
|
1091
|
+
query_params[:id] = opts[:id] if opts[:id]
|
1092
|
+
query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
|
1093
|
+
query_params[:displayName] = opts[:display_name] if opts[:display_name]
|
1094
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
1095
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
1096
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
1097
|
+
query_params[:page] = opts[:page] if opts[:page]
|
1098
|
+
|
1099
|
+
# Header Params
|
1100
|
+
header_params = {}
|
1101
|
+
header_params[:accept] = 'application/json'
|
1102
|
+
header_params[:'content-type'] = 'application/json'
|
1103
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1104
|
+
# rubocop:enable Style/NegatedIf
|
1105
|
+
|
1106
|
+
post_body = nil
|
1107
|
+
|
1108
|
+
# rubocop:disable Metrics/BlockLength
|
1109
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#list_stacks') do
|
1110
|
+
@api_client.call_api(
|
1111
|
+
:GET,
|
1112
|
+
path,
|
1113
|
+
endpoint,
|
1114
|
+
header_params: header_params,
|
1115
|
+
query_params: query_params,
|
1116
|
+
operation_signing_strategy: operation_signing_strategy,
|
1117
|
+
body: post_body,
|
1118
|
+
return_type: 'Array<OCI::ResourceManager::Models::StackSummary>'
|
1119
|
+
)
|
1120
|
+
end
|
1121
|
+
# rubocop:enable Metrics/BlockLength
|
1122
|
+
end
|
1123
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1124
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1125
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1126
|
+
|
1127
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1128
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1129
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1130
|
+
|
1131
|
+
|
1132
|
+
# Updates the specified job.
|
1133
|
+
# @param [String] job_id The job OCID.
|
1134
|
+
# @param [OCI::ResourceManager::Models::UpdateJobDetails] update_job_details Updates properties for the specified job.
|
1135
|
+
# @param [Hash] opts the optional parameters
|
1136
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
1137
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
1138
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1139
|
+
# particular request, please provide the request ID.
|
1140
|
+
#
|
1141
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match`
|
1142
|
+
# parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource
|
1143
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1144
|
+
#
|
1145
|
+
# @return [Response] A Response object with data of type {OCI::ResourceManager::Models::Job Job}
|
1146
|
+
def update_job(job_id, update_job_details, opts = {})
|
1147
|
+
logger.debug 'Calling operation ResourceManagerClient#update_job.' if logger
|
1148
|
+
|
1149
|
+
raise "Missing the required parameter 'job_id' when calling update_job." if job_id.nil?
|
1150
|
+
raise "Missing the required parameter 'update_job_details' when calling update_job." if update_job_details.nil?
|
1151
|
+
raise "Parameter value for 'job_id' must not be blank" if OCI::Internal::Util.blank_string?(job_id)
|
1152
|
+
|
1153
|
+
path = '/jobs/{jobId}'.sub('{jobId}', job_id.to_s)
|
1154
|
+
operation_signing_strategy = :standard
|
1155
|
+
|
1156
|
+
# rubocop:disable Style/NegatedIf
|
1157
|
+
# Query Params
|
1158
|
+
query_params = {}
|
1159
|
+
|
1160
|
+
# Header Params
|
1161
|
+
header_params = {}
|
1162
|
+
header_params[:accept] = 'application/json'
|
1163
|
+
header_params[:'content-type'] = 'application/json'
|
1164
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1165
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
1166
|
+
# rubocop:enable Style/NegatedIf
|
1167
|
+
|
1168
|
+
post_body = @api_client.object_to_http_body(update_job_details)
|
1169
|
+
|
1170
|
+
# rubocop:disable Metrics/BlockLength
|
1171
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#update_job') do
|
1172
|
+
@api_client.call_api(
|
1173
|
+
:PUT,
|
1174
|
+
path,
|
1175
|
+
endpoint,
|
1176
|
+
header_params: header_params,
|
1177
|
+
query_params: query_params,
|
1178
|
+
operation_signing_strategy: operation_signing_strategy,
|
1179
|
+
body: post_body,
|
1180
|
+
return_type: 'OCI::ResourceManager::Models::Job'
|
1181
|
+
)
|
1182
|
+
end
|
1183
|
+
# rubocop:enable Metrics/BlockLength
|
1184
|
+
end
|
1185
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1186
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1187
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1188
|
+
|
1189
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1190
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
1191
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
1192
|
+
|
1193
|
+
|
1194
|
+
# Updates the specified stack object.
|
1195
|
+
# Use `UpdateStack` when you update your Terraform configuration
|
1196
|
+
# and want your changes to be reflected in the execution plan.
|
1197
|
+
#
|
1198
|
+
# @param [String] stack_id The stack OCID.
|
1199
|
+
# @param [OCI::ResourceManager::Models::UpdateStackDetails] update_stack_details Updated information provided for the stack.
|
1200
|
+
#
|
1201
|
+
# @param [Hash] opts the optional parameters
|
1202
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
1203
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
1204
|
+
# @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1205
|
+
# particular request, please provide the request ID.
|
1206
|
+
#
|
1207
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match`
|
1208
|
+
# parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource
|
1209
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1210
|
+
#
|
1211
|
+
# @return [Response] A Response object with data of type {OCI::ResourceManager::Models::Stack Stack}
|
1212
|
+
def update_stack(stack_id, update_stack_details, opts = {})
|
1213
|
+
logger.debug 'Calling operation ResourceManagerClient#update_stack.' if logger
|
1214
|
+
|
1215
|
+
raise "Missing the required parameter 'stack_id' when calling update_stack." if stack_id.nil?
|
1216
|
+
raise "Missing the required parameter 'update_stack_details' when calling update_stack." if update_stack_details.nil?
|
1217
|
+
raise "Parameter value for 'stack_id' must not be blank" if OCI::Internal::Util.blank_string?(stack_id)
|
1218
|
+
|
1219
|
+
path = '/stacks/{stackId}'.sub('{stackId}', stack_id.to_s)
|
1220
|
+
operation_signing_strategy = :standard
|
1221
|
+
|
1222
|
+
# rubocop:disable Style/NegatedIf
|
1223
|
+
# Query Params
|
1224
|
+
query_params = {}
|
1225
|
+
|
1226
|
+
# Header Params
|
1227
|
+
header_params = {}
|
1228
|
+
header_params[:accept] = 'application/json'
|
1229
|
+
header_params[:'content-type'] = 'application/json'
|
1230
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
1231
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
1232
|
+
# rubocop:enable Style/NegatedIf
|
1233
|
+
|
1234
|
+
post_body = @api_client.object_to_http_body(update_stack_details)
|
1235
|
+
|
1236
|
+
# rubocop:disable Metrics/BlockLength
|
1237
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ResourceManagerClient#update_stack') do
|
1238
|
+
@api_client.call_api(
|
1239
|
+
:PUT,
|
1240
|
+
path,
|
1241
|
+
endpoint,
|
1242
|
+
header_params: header_params,
|
1243
|
+
query_params: query_params,
|
1244
|
+
operation_signing_strategy: operation_signing_strategy,
|
1245
|
+
body: post_body,
|
1246
|
+
return_type: 'OCI::ResourceManager::Models::Stack'
|
1247
|
+
)
|
1248
|
+
end
|
1249
|
+
# rubocop:enable Metrics/BlockLength
|
1250
|
+
end
|
1251
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
1252
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
1253
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
1254
|
+
|
1255
|
+
private
|
1256
|
+
|
1257
|
+
def applicable_retry_config(opts = {})
|
1258
|
+
return @retry_config unless opts.key?(:retry_config)
|
1259
|
+
|
1260
|
+
opts[:retry_config]
|
1261
|
+
end
|
1262
|
+
end
|
1263
|
+
end
|
1264
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|