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,24 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
4
|
+
module OCI
|
5
|
+
# This class provides a wrapper around {OCI::Ons::NotificationControlPlaneClient} and offers convenience methods
|
6
|
+
# for operations that would otherwise need to be chained together. For example, instead of performing an action
|
7
|
+
# on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource
|
8
|
+
# to enter a given state, you can call a single method in this class to accomplish the same functionality
|
9
|
+
class Ons::NotificationControlPlaneClientCompositeOperations
|
10
|
+
# The {OCI::Ons::NotificationControlPlaneClient} used to communicate with the service_client
|
11
|
+
#
|
12
|
+
# @return [OCI::Ons::NotificationControlPlaneClient]
|
13
|
+
attr_reader :service_client
|
14
|
+
|
15
|
+
# Initializes a new NotificationControlPlaneClientCompositeOperations
|
16
|
+
#
|
17
|
+
# @param [OCI::Ons::NotificationControlPlaneClient] service_client The client used to communicate with the service.
|
18
|
+
# Defaults to a new service client created via {OCI::Ons::NotificationControlPlaneClient#initialize} with no arguments
|
19
|
+
def initialize(service_client = OCI::Ons::NotificationControlPlaneClient.new)
|
20
|
+
@service_client = service_client
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,680 @@
|
|
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
|
+
# Use the Notification API to broadcast messages to distributed components by topic, using a publish-subscribe pattern.
|
9
|
+
# For information about managing topics, subscriptions, and messages, see [Notification Overview](/iaas/Content/Notification/Concepts/notificationoverview.htm).
|
10
|
+
class Ons::NotificationDataPlaneClient
|
11
|
+
# Client used to make HTTP requests.
|
12
|
+
# @return [OCI::ApiClient]
|
13
|
+
attr_reader :api_client
|
14
|
+
|
15
|
+
# Fully qualified endpoint URL
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :endpoint
|
18
|
+
|
19
|
+
# The default retry configuration to apply to all operations in this service client. This can be overridden
|
20
|
+
# on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
21
|
+
# will not perform any retries
|
22
|
+
# @return [OCI::Retry::RetryConfig]
|
23
|
+
attr_reader :retry_config
|
24
|
+
|
25
|
+
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
26
|
+
# @return [String]
|
27
|
+
attr_reader :region
|
28
|
+
|
29
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
30
|
+
|
31
|
+
|
32
|
+
# Creates a new NotificationDataPlaneClient.
|
33
|
+
# Notes:
|
34
|
+
# If a config is not specified, then the global OCI.config will be used.
|
35
|
+
#
|
36
|
+
# This client is not thread-safe
|
37
|
+
#
|
38
|
+
# Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the
|
39
|
+
# region. A region may be specified in the config or via or the region parameter. If specified in both, then the
|
40
|
+
# region parameter will be used.
|
41
|
+
# @param [Config] config A Config object.
|
42
|
+
# @param [String] region A region used to determine the service endpoint. This will usually
|
43
|
+
# correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
44
|
+
# @param [String] endpoint The fully qualified endpoint URL
|
45
|
+
# @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
|
46
|
+
# a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
|
47
|
+
# so that the instance principals signer can be provided to the client
|
48
|
+
# @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
|
49
|
+
# the details for the proxy can be provided in this parameter
|
50
|
+
# @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
|
51
|
+
# 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
|
52
|
+
# will not perform any retries
|
53
|
+
def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
54
|
+
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
55
|
+
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
56
|
+
# and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
|
57
|
+
# pass it to this constructor.
|
58
|
+
#
|
59
|
+
# If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
|
60
|
+
# so try and load the config from the default file.
|
61
|
+
config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
62
|
+
config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
63
|
+
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
64
|
+
|
65
|
+
if signer.nil?
|
66
|
+
signer = OCI::Signer.new(
|
67
|
+
config.user,
|
68
|
+
config.fingerprint,
|
69
|
+
config.tenancy,
|
70
|
+
config.key_file,
|
71
|
+
pass_phrase: config.pass_phrase,
|
72
|
+
private_key_content: config.key_content
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
77
|
+
@retry_config = retry_config
|
78
|
+
|
79
|
+
if endpoint
|
80
|
+
@endpoint = endpoint + '/20181201'
|
81
|
+
else
|
82
|
+
region ||= config.region
|
83
|
+
region ||= signer.region if signer.respond_to?(:region)
|
84
|
+
self.region = region
|
85
|
+
end
|
86
|
+
logger.info "NotificationDataPlaneClient endpoint set to '#{@endpoint}'." if logger
|
87
|
+
end
|
88
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
|
89
|
+
|
90
|
+
# Set the region that will be used to determine the service endpoint.
|
91
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
92
|
+
# but may be an arbitrary string.
|
93
|
+
def region=(new_region)
|
94
|
+
@region = new_region
|
95
|
+
|
96
|
+
raise 'A region must be specified.' unless @region
|
97
|
+
|
98
|
+
@endpoint = OCI::Regions.get_service_endpoint(@region, :NotificationDataPlaneClient) + '/20181201'
|
99
|
+
logger.info "NotificationDataPlaneClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
|
100
|
+
end
|
101
|
+
|
102
|
+
# @return [Logger] The logger for this client. May be nil.
|
103
|
+
def logger
|
104
|
+
@api_client.config.logger
|
105
|
+
end
|
106
|
+
|
107
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
108
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
109
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
110
|
+
|
111
|
+
|
112
|
+
# Creates a subscription for the specified topic.
|
113
|
+
#
|
114
|
+
# @param [OCI::Ons::Models::CreateSubscriptionDetails] create_subscription_details The subscription to create.
|
115
|
+
# @param [Hash] opts the optional parameters
|
116
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
117
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
118
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
|
119
|
+
# server error without risk of executing that same action again. Retry tokens expire after 24
|
120
|
+
# hours, but can be invalidated before that due to conflicting operations (for example, if a resource
|
121
|
+
# has been deleted and purged from the system, then a retry of the original creation request
|
122
|
+
# may be rejected).
|
123
|
+
#
|
124
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
125
|
+
# particular request, please provide the request ID.
|
126
|
+
#
|
127
|
+
# @return [Response] A Response object with data of type {OCI::Ons::Models::Subscription Subscription}
|
128
|
+
def create_subscription(create_subscription_details, opts = {})
|
129
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#create_subscription.' if logger
|
130
|
+
|
131
|
+
raise "Missing the required parameter 'create_subscription_details' when calling create_subscription." if create_subscription_details.nil?
|
132
|
+
|
133
|
+
path = '/subscriptions'
|
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-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
145
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
146
|
+
# rubocop:enable Style/NegatedIf
|
147
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
148
|
+
|
149
|
+
post_body = @api_client.object_to_http_body(create_subscription_details)
|
150
|
+
|
151
|
+
# rubocop:disable Metrics/BlockLength
|
152
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#create_subscription') do
|
153
|
+
@api_client.call_api(
|
154
|
+
:POST,
|
155
|
+
path,
|
156
|
+
endpoint,
|
157
|
+
header_params: header_params,
|
158
|
+
query_params: query_params,
|
159
|
+
operation_signing_strategy: operation_signing_strategy,
|
160
|
+
body: post_body,
|
161
|
+
return_type: 'OCI::Ons::Models::Subscription'
|
162
|
+
)
|
163
|
+
end
|
164
|
+
# rubocop:enable Metrics/BlockLength
|
165
|
+
end
|
166
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
167
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
168
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
169
|
+
|
170
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
171
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
172
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
173
|
+
|
174
|
+
|
175
|
+
# Deletes the specified subscription.
|
176
|
+
#
|
177
|
+
# @param [String] subscription_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription to delete.
|
178
|
+
#
|
179
|
+
# @param [Hash] opts the optional parameters
|
180
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
181
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
182
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
183
|
+
# particular request, please provide the request ID.
|
184
|
+
#
|
185
|
+
# @option opts [String] :if_match Used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
186
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
187
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
188
|
+
#
|
189
|
+
# @return [Response] A Response object with data of type nil
|
190
|
+
def delete_subscription(subscription_id, opts = {})
|
191
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#delete_subscription.' if logger
|
192
|
+
|
193
|
+
raise "Missing the required parameter 'subscription_id' when calling delete_subscription." if subscription_id.nil?
|
194
|
+
raise "Parameter value for 'subscription_id' must not be blank" if OCI::Internal::Util.blank_string?(subscription_id)
|
195
|
+
|
196
|
+
path = '/subscriptions/{subscriptionId}'.sub('{subscriptionId}', subscription_id.to_s)
|
197
|
+
operation_signing_strategy = :standard
|
198
|
+
|
199
|
+
# rubocop:disable Style/NegatedIf
|
200
|
+
# Query Params
|
201
|
+
query_params = {}
|
202
|
+
|
203
|
+
# Header Params
|
204
|
+
header_params = {}
|
205
|
+
header_params[:accept] = 'application/json'
|
206
|
+
header_params[:'content-type'] = 'application/json'
|
207
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
208
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
209
|
+
# rubocop:enable Style/NegatedIf
|
210
|
+
|
211
|
+
post_body = nil
|
212
|
+
|
213
|
+
# rubocop:disable Metrics/BlockLength
|
214
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#delete_subscription') do
|
215
|
+
@api_client.call_api(
|
216
|
+
:DELETE,
|
217
|
+
path,
|
218
|
+
endpoint,
|
219
|
+
header_params: header_params,
|
220
|
+
query_params: query_params,
|
221
|
+
operation_signing_strategy: operation_signing_strategy,
|
222
|
+
body: post_body
|
223
|
+
)
|
224
|
+
end
|
225
|
+
# rubocop:enable Metrics/BlockLength
|
226
|
+
end
|
227
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
228
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
229
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
230
|
+
|
231
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
232
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
233
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
234
|
+
|
235
|
+
|
236
|
+
# Gets the confirmation details for the specified subscription.
|
237
|
+
#
|
238
|
+
# @param [String] id The subscription ID.
|
239
|
+
#
|
240
|
+
# @param [String] token The subscription confirmation token.
|
241
|
+
# @param [String] protocol The subscription protocol. Valid values: EMAIL, HTTPS.
|
242
|
+
#
|
243
|
+
# @param [Hash] opts the optional parameters
|
244
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
245
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
246
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
247
|
+
# particular request, please provide the request ID.
|
248
|
+
#
|
249
|
+
# @return [Response] A Response object with data of type {OCI::Ons::Models::ConfirmationResult ConfirmationResult}
|
250
|
+
def get_confirm_subscription(id, token, protocol, opts = {})
|
251
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#get_confirm_subscription.' if logger
|
252
|
+
|
253
|
+
raise "Missing the required parameter 'id' when calling get_confirm_subscription." if id.nil?
|
254
|
+
raise "Missing the required parameter 'token' when calling get_confirm_subscription." if token.nil?
|
255
|
+
raise "Missing the required parameter 'protocol' when calling get_confirm_subscription." if protocol.nil?
|
256
|
+
raise "Parameter value for 'id' must not be blank" if OCI::Internal::Util.blank_string?(id)
|
257
|
+
|
258
|
+
path = '/subscriptions/{id}/confirmation'.sub('{id}', id.to_s)
|
259
|
+
operation_signing_strategy = :standard
|
260
|
+
|
261
|
+
# rubocop:disable Style/NegatedIf
|
262
|
+
# Query Params
|
263
|
+
query_params = {}
|
264
|
+
query_params[:token] = token
|
265
|
+
query_params[:protocol] = protocol
|
266
|
+
|
267
|
+
# Header Params
|
268
|
+
header_params = {}
|
269
|
+
header_params[:accept] = 'application/json'
|
270
|
+
header_params[:'content-type'] = 'application/json'
|
271
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
272
|
+
# rubocop:enable Style/NegatedIf
|
273
|
+
|
274
|
+
post_body = nil
|
275
|
+
|
276
|
+
# rubocop:disable Metrics/BlockLength
|
277
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#get_confirm_subscription') do
|
278
|
+
@api_client.call_api(
|
279
|
+
:GET,
|
280
|
+
path,
|
281
|
+
endpoint,
|
282
|
+
header_params: header_params,
|
283
|
+
query_params: query_params,
|
284
|
+
operation_signing_strategy: operation_signing_strategy,
|
285
|
+
body: post_body,
|
286
|
+
return_type: 'OCI::Ons::Models::ConfirmationResult'
|
287
|
+
)
|
288
|
+
end
|
289
|
+
# rubocop:enable Metrics/BlockLength
|
290
|
+
end
|
291
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
292
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
293
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
294
|
+
|
295
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
296
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
297
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
298
|
+
|
299
|
+
|
300
|
+
# Gets the specified subscription's configuration information.
|
301
|
+
#
|
302
|
+
# @param [String] subscription_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription to retrieve.
|
303
|
+
#
|
304
|
+
# @param [Hash] opts the optional parameters
|
305
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
306
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
307
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
308
|
+
# particular request, please provide the request ID.
|
309
|
+
#
|
310
|
+
# @return [Response] A Response object with data of type {OCI::Ons::Models::Subscription Subscription}
|
311
|
+
def get_subscription(subscription_id, opts = {})
|
312
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#get_subscription.' if logger
|
313
|
+
|
314
|
+
raise "Missing the required parameter 'subscription_id' when calling get_subscription." if subscription_id.nil?
|
315
|
+
raise "Parameter value for 'subscription_id' must not be blank" if OCI::Internal::Util.blank_string?(subscription_id)
|
316
|
+
|
317
|
+
path = '/subscriptions/{subscriptionId}'.sub('{subscriptionId}', subscription_id.to_s)
|
318
|
+
operation_signing_strategy = :standard
|
319
|
+
|
320
|
+
# rubocop:disable Style/NegatedIf
|
321
|
+
# Query Params
|
322
|
+
query_params = {}
|
323
|
+
|
324
|
+
# Header Params
|
325
|
+
header_params = {}
|
326
|
+
header_params[:accept] = 'application/json'
|
327
|
+
header_params[:'content-type'] = 'application/json'
|
328
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
329
|
+
# rubocop:enable Style/NegatedIf
|
330
|
+
|
331
|
+
post_body = nil
|
332
|
+
|
333
|
+
# rubocop:disable Metrics/BlockLength
|
334
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#get_subscription') do
|
335
|
+
@api_client.call_api(
|
336
|
+
:GET,
|
337
|
+
path,
|
338
|
+
endpoint,
|
339
|
+
header_params: header_params,
|
340
|
+
query_params: query_params,
|
341
|
+
operation_signing_strategy: operation_signing_strategy,
|
342
|
+
body: post_body,
|
343
|
+
return_type: 'OCI::Ons::Models::Subscription'
|
344
|
+
)
|
345
|
+
end
|
346
|
+
# rubocop:enable Metrics/BlockLength
|
347
|
+
end
|
348
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
349
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
350
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
351
|
+
|
352
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
353
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
354
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
355
|
+
|
356
|
+
|
357
|
+
# Gets the unsubscription details for the specified subscription.
|
358
|
+
#
|
359
|
+
# @param [String] id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription to unsubscribe from.
|
360
|
+
#
|
361
|
+
# @param [String] token The subscription confirmation token.
|
362
|
+
# @param [String] protocol The subscription protocol. Valid values: EMAIL, HTTPS.
|
363
|
+
#
|
364
|
+
# @param [Hash] opts the optional parameters
|
365
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
366
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
367
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
368
|
+
# particular request, please provide the request ID.
|
369
|
+
#
|
370
|
+
# @return [Response] A Response object with data of type String
|
371
|
+
def get_unsubscription(id, token, protocol, opts = {})
|
372
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#get_unsubscription.' if logger
|
373
|
+
|
374
|
+
raise "Missing the required parameter 'id' when calling get_unsubscription." if id.nil?
|
375
|
+
raise "Missing the required parameter 'token' when calling get_unsubscription." if token.nil?
|
376
|
+
raise "Missing the required parameter 'protocol' when calling get_unsubscription." if protocol.nil?
|
377
|
+
raise "Parameter value for 'id' must not be blank" if OCI::Internal::Util.blank_string?(id)
|
378
|
+
|
379
|
+
path = '/subscriptions/{id}/unsubscription'.sub('{id}', id.to_s)
|
380
|
+
operation_signing_strategy = :standard
|
381
|
+
|
382
|
+
# rubocop:disable Style/NegatedIf
|
383
|
+
# Query Params
|
384
|
+
query_params = {}
|
385
|
+
query_params[:token] = token
|
386
|
+
query_params[:protocol] = protocol
|
387
|
+
|
388
|
+
# Header Params
|
389
|
+
header_params = {}
|
390
|
+
header_params[:accept] = 'application/json'
|
391
|
+
header_params[:'content-type'] = 'application/json'
|
392
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
393
|
+
# rubocop:enable Style/NegatedIf
|
394
|
+
|
395
|
+
post_body = nil
|
396
|
+
|
397
|
+
# rubocop:disable Metrics/BlockLength
|
398
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#get_unsubscription') do
|
399
|
+
@api_client.call_api(
|
400
|
+
:GET,
|
401
|
+
path,
|
402
|
+
endpoint,
|
403
|
+
header_params: header_params,
|
404
|
+
query_params: query_params,
|
405
|
+
operation_signing_strategy: operation_signing_strategy,
|
406
|
+
body: post_body,
|
407
|
+
return_type: 'String'
|
408
|
+
)
|
409
|
+
end
|
410
|
+
# rubocop:enable Metrics/BlockLength
|
411
|
+
end
|
412
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
413
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
414
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
415
|
+
|
416
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
417
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
418
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
419
|
+
|
420
|
+
|
421
|
+
# Lists the subscriptions in the specified compartment or topic.
|
422
|
+
#
|
423
|
+
# @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
|
424
|
+
#
|
425
|
+
# @param [Hash] opts the optional parameters
|
426
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
427
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
428
|
+
# @option opts [String] :topic_id Return all subscriptions that are subscribed to the given topic OCID. Either this query parameter or the compartmentId query parameter must be set.
|
429
|
+
#
|
430
|
+
# @option opts [String] :page For list pagination. The value of the opc-next-page response header from the previous \"List\" call. For important details about how pagination works, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
431
|
+
#
|
432
|
+
# @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call. For important details about how pagination works, see [List Pagination](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
433
|
+
# (default to 10)
|
434
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
435
|
+
# particular request, please provide the request ID.
|
436
|
+
#
|
437
|
+
# @return [Response] A Response object with data of type Array<{OCI::Ons::Models::SubscriptionSummary SubscriptionSummary}>
|
438
|
+
def list_subscriptions(compartment_id, opts = {})
|
439
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#list_subscriptions.' if logger
|
440
|
+
|
441
|
+
raise "Missing the required parameter 'compartment_id' when calling list_subscriptions." if compartment_id.nil?
|
442
|
+
|
443
|
+
path = '/subscriptions'
|
444
|
+
operation_signing_strategy = :standard
|
445
|
+
|
446
|
+
# rubocop:disable Style/NegatedIf
|
447
|
+
# Query Params
|
448
|
+
query_params = {}
|
449
|
+
query_params[:compartmentId] = compartment_id
|
450
|
+
query_params[:topicId] = opts[:topic_id] if opts[:topic_id]
|
451
|
+
query_params[:page] = opts[:page] if opts[:page]
|
452
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
453
|
+
|
454
|
+
# Header Params
|
455
|
+
header_params = {}
|
456
|
+
header_params[:accept] = 'application/json'
|
457
|
+
header_params[:'content-type'] = 'application/json'
|
458
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
459
|
+
# rubocop:enable Style/NegatedIf
|
460
|
+
|
461
|
+
post_body = nil
|
462
|
+
|
463
|
+
# rubocop:disable Metrics/BlockLength
|
464
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#list_subscriptions') do
|
465
|
+
@api_client.call_api(
|
466
|
+
:GET,
|
467
|
+
path,
|
468
|
+
endpoint,
|
469
|
+
header_params: header_params,
|
470
|
+
query_params: query_params,
|
471
|
+
operation_signing_strategy: operation_signing_strategy,
|
472
|
+
body: post_body,
|
473
|
+
return_type: 'Array<OCI::Ons::Models::SubscriptionSummary>'
|
474
|
+
)
|
475
|
+
end
|
476
|
+
# rubocop:enable Metrics/BlockLength
|
477
|
+
end
|
478
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
479
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
480
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
481
|
+
|
482
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
483
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
484
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
485
|
+
|
486
|
+
|
487
|
+
# Publishes a message to the specified topic. For more information about publishing messages, see [Publishing Messages](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/Notification/Tasks/publishingmessages.htm).
|
488
|
+
#
|
489
|
+
# @param [String] topic_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the topic.
|
490
|
+
#
|
491
|
+
# @param [OCI::Ons::Models::MessageDetails] message_details The message to publish.
|
492
|
+
# @param [Hash] opts the optional parameters
|
493
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
494
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
495
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
496
|
+
# particular request, please provide the request ID.
|
497
|
+
#
|
498
|
+
# @option opts [String] :message_type Type of message body in the request. Default value: JSON.
|
499
|
+
# (default to JSON)
|
500
|
+
# Allowed values are: JSON, RAW_TEXT
|
501
|
+
# @return [Response] A Response object with data of type {OCI::Ons::Models::PublishResult PublishResult}
|
502
|
+
def publish_message(topic_id, message_details, opts = {})
|
503
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#publish_message.' if logger
|
504
|
+
|
505
|
+
raise "Missing the required parameter 'topic_id' when calling publish_message." if topic_id.nil?
|
506
|
+
raise "Missing the required parameter 'message_details' when calling publish_message." if message_details.nil?
|
507
|
+
|
508
|
+
if opts[:message_type] && !%w[JSON RAW_TEXT].include?(opts[:message_type])
|
509
|
+
raise 'Invalid value for "message_type", must be one of JSON, RAW_TEXT.'
|
510
|
+
end
|
511
|
+
raise "Parameter value for 'topic_id' must not be blank" if OCI::Internal::Util.blank_string?(topic_id)
|
512
|
+
|
513
|
+
path = '/topics/{topicId}/messages'.sub('{topicId}', topic_id.to_s)
|
514
|
+
operation_signing_strategy = :standard
|
515
|
+
|
516
|
+
# rubocop:disable Style/NegatedIf
|
517
|
+
# Query Params
|
518
|
+
query_params = {}
|
519
|
+
|
520
|
+
# Header Params
|
521
|
+
header_params = {}
|
522
|
+
header_params[:accept] = 'application/json'
|
523
|
+
header_params[:'content-type'] = 'application/json'
|
524
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
525
|
+
header_params[:messagetype] = opts[:message_type] if opts[:message_type]
|
526
|
+
# rubocop:enable Style/NegatedIf
|
527
|
+
|
528
|
+
post_body = @api_client.object_to_http_body(message_details)
|
529
|
+
|
530
|
+
# rubocop:disable Metrics/BlockLength
|
531
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#publish_message') do
|
532
|
+
@api_client.call_api(
|
533
|
+
:POST,
|
534
|
+
path,
|
535
|
+
endpoint,
|
536
|
+
header_params: header_params,
|
537
|
+
query_params: query_params,
|
538
|
+
operation_signing_strategy: operation_signing_strategy,
|
539
|
+
body: post_body,
|
540
|
+
return_type: 'OCI::Ons::Models::PublishResult'
|
541
|
+
)
|
542
|
+
end
|
543
|
+
# rubocop:enable Metrics/BlockLength
|
544
|
+
end
|
545
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
546
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
547
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
548
|
+
|
549
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
550
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
551
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
552
|
+
|
553
|
+
|
554
|
+
# Resends the confirmation details for the specified subscription.
|
555
|
+
#
|
556
|
+
# @param [String] id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription to resend the confirmation for.
|
557
|
+
#
|
558
|
+
# @param [Hash] opts the optional parameters
|
559
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
560
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
561
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
562
|
+
# particular request, please provide the request ID.
|
563
|
+
#
|
564
|
+
# @return [Response] A Response object with data of type {OCI::Ons::Models::Subscription Subscription}
|
565
|
+
def resend_subscription_confirmation(id, opts = {})
|
566
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#resend_subscription_confirmation.' if logger
|
567
|
+
|
568
|
+
raise "Missing the required parameter 'id' when calling resend_subscription_confirmation." if id.nil?
|
569
|
+
raise "Parameter value for 'id' must not be blank" if OCI::Internal::Util.blank_string?(id)
|
570
|
+
|
571
|
+
path = '/subscriptions/{id}/resendConfirmation'.sub('{id}', id.to_s)
|
572
|
+
operation_signing_strategy = :standard
|
573
|
+
|
574
|
+
# rubocop:disable Style/NegatedIf
|
575
|
+
# Query Params
|
576
|
+
query_params = {}
|
577
|
+
|
578
|
+
# Header Params
|
579
|
+
header_params = {}
|
580
|
+
header_params[:accept] = 'application/json'
|
581
|
+
header_params[:'content-type'] = 'application/json'
|
582
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
583
|
+
# rubocop:enable Style/NegatedIf
|
584
|
+
|
585
|
+
post_body = nil
|
586
|
+
|
587
|
+
# rubocop:disable Metrics/BlockLength
|
588
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#resend_subscription_confirmation') do
|
589
|
+
@api_client.call_api(
|
590
|
+
:POST,
|
591
|
+
path,
|
592
|
+
endpoint,
|
593
|
+
header_params: header_params,
|
594
|
+
query_params: query_params,
|
595
|
+
operation_signing_strategy: operation_signing_strategy,
|
596
|
+
body: post_body,
|
597
|
+
return_type: 'OCI::Ons::Models::Subscription'
|
598
|
+
)
|
599
|
+
end
|
600
|
+
# rubocop:enable Metrics/BlockLength
|
601
|
+
end
|
602
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
603
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
604
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
605
|
+
|
606
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
607
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
608
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
609
|
+
|
610
|
+
|
611
|
+
# Updates the specified subscription's configuration.
|
612
|
+
#
|
613
|
+
# @param [String] subscription_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the subscription to update.
|
614
|
+
#
|
615
|
+
# @param [OCI::Ons::Models::UpdateSubscriptionDetails] update_subscription_details The configuration details for updating the subscription.
|
616
|
+
#
|
617
|
+
# @param [Hash] opts the optional parameters
|
618
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
619
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
620
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
621
|
+
# particular request, please provide the request ID.
|
622
|
+
#
|
623
|
+
# @option opts [String] :if_match Used for optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
624
|
+
# parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
625
|
+
# will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
626
|
+
#
|
627
|
+
# @return [Response] A Response object with data of type {OCI::Ons::Models::UpdateSubscriptionDetails UpdateSubscriptionDetails}
|
628
|
+
def update_subscription(subscription_id, update_subscription_details, opts = {})
|
629
|
+
logger.debug 'Calling operation NotificationDataPlaneClient#update_subscription.' if logger
|
630
|
+
|
631
|
+
raise "Missing the required parameter 'subscription_id' when calling update_subscription." if subscription_id.nil?
|
632
|
+
raise "Missing the required parameter 'update_subscription_details' when calling update_subscription." if update_subscription_details.nil?
|
633
|
+
raise "Parameter value for 'subscription_id' must not be blank" if OCI::Internal::Util.blank_string?(subscription_id)
|
634
|
+
|
635
|
+
path = '/subscriptions/{subscriptionId}'.sub('{subscriptionId}', subscription_id.to_s)
|
636
|
+
operation_signing_strategy = :standard
|
637
|
+
|
638
|
+
# rubocop:disable Style/NegatedIf
|
639
|
+
# Query Params
|
640
|
+
query_params = {}
|
641
|
+
|
642
|
+
# Header Params
|
643
|
+
header_params = {}
|
644
|
+
header_params[:accept] = 'application/json'
|
645
|
+
header_params[:'content-type'] = 'application/json'
|
646
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
647
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
648
|
+
# rubocop:enable Style/NegatedIf
|
649
|
+
|
650
|
+
post_body = @api_client.object_to_http_body(update_subscription_details)
|
651
|
+
|
652
|
+
# rubocop:disable Metrics/BlockLength
|
653
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NotificationDataPlaneClient#update_subscription') do
|
654
|
+
@api_client.call_api(
|
655
|
+
:PUT,
|
656
|
+
path,
|
657
|
+
endpoint,
|
658
|
+
header_params: header_params,
|
659
|
+
query_params: query_params,
|
660
|
+
operation_signing_strategy: operation_signing_strategy,
|
661
|
+
body: post_body,
|
662
|
+
return_type: 'OCI::Ons::Models::UpdateSubscriptionDetails'
|
663
|
+
)
|
664
|
+
end
|
665
|
+
# rubocop:enable Metrics/BlockLength
|
666
|
+
end
|
667
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
668
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
669
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
670
|
+
|
671
|
+
private
|
672
|
+
|
673
|
+
def applicable_retry_config(opts = {})
|
674
|
+
return @retry_config unless opts.key?(:retry_config)
|
675
|
+
|
676
|
+
opts[:retry_config]
|
677
|
+
end
|
678
|
+
end
|
679
|
+
end
|
680
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|