mv-oci-sdk 2.142.0__py3-none-any.whl → 2.142.0.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.1.dist-info}/METADATA +3 -3
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.1.dist-info}/RECORD +197 -6
- oci/file_storage/__init__.py +14 -0
- oci/file_storage/file_storage_client.py +8601 -0
- oci/file_storage/file_storage_client_composite_operations.py +2068 -0
- oci/file_storage/models/__init__.py +130 -0
- oci/file_storage/models/change_file_system_compartment_details.py +76 -0
- oci/file_storage/models/change_filesystem_snapshot_policy_compartment_details.py +76 -0
- oci/file_storage/models/change_mount_target_compartment_details.py +76 -0
- oci/file_storage/models/change_outbound_connector_compartment_details.py +78 -0
- oci/file_storage/models/change_replication_compartment_details.py +76 -0
- oci/file_storage/models/client_options.py +389 -0
- oci/file_storage/models/create_export_details.py +303 -0
- oci/file_storage/models/create_file_system_details.py +425 -0
- oci/file_storage/models/create_filesystem_snapshot_policy_details.py +337 -0
- oci/file_storage/models/create_kerberos_details.py +200 -0
- oci/file_storage/models/create_ldap_bind_account_details.py +220 -0
- oci/file_storage/models/create_ldap_idmap_details.py +317 -0
- oci/file_storage/models/create_mount_target_details.py +581 -0
- oci/file_storage/models/create_outbound_connector_details.py +309 -0
- oci/file_storage/models/create_replication_details.py +325 -0
- oci/file_storage/models/create_snapshot_details.py +261 -0
- oci/file_storage/models/endpoint.py +103 -0
- oci/file_storage/models/export.py +456 -0
- oci/file_storage/models/export_set.py +411 -0
- oci/file_storage/models/export_set_summary.py +316 -0
- oci/file_storage/models/export_summary.py +343 -0
- oci/file_storage/models/file_system.py +818 -0
- oci/file_storage/models/file_system_summary.py +659 -0
- oci/file_storage/models/filesystem_snapshot_policy.py +473 -0
- oci/file_storage/models/filesystem_snapshot_policy_summary.py +429 -0
- oci/file_storage/models/kerberos.py +200 -0
- oci/file_storage/models/kerberos_keytab_entry.py +166 -0
- oci/file_storage/models/key_tab_secret_details.py +138 -0
- oci/file_storage/models/ldap_bind_account.py +243 -0
- oci/file_storage/models/ldap_bind_account_summary.py +176 -0
- oci/file_storage/models/ldap_idmap.py +317 -0
- oci/file_storage/models/mount_target.py +828 -0
- oci/file_storage/models/mount_target_summary.py +696 -0
- oci/file_storage/models/outbound_connector.py +453 -0
- oci/file_storage/models/outbound_connector_summary.py +438 -0
- oci/file_storage/models/replication.py +740 -0
- oci/file_storage/models/replication_estimate.py +196 -0
- oci/file_storage/models/replication_summary.py +491 -0
- oci/file_storage/models/replication_target.py +679 -0
- oci/file_storage/models/replication_target_summary.py +425 -0
- oci/file_storage/models/resource_lock.py +185 -0
- oci/file_storage/models/schedule_downgrade_shape_mount_target_details.py +78 -0
- oci/file_storage/models/snapshot.py +638 -0
- oci/file_storage/models/snapshot_schedule.py +487 -0
- oci/file_storage/models/snapshot_summary.py +601 -0
- oci/file_storage/models/source_details.py +119 -0
- oci/file_storage/models/update_export_details.py +111 -0
- oci/file_storage/models/update_export_set_details.py +172 -0
- oci/file_storage/models/update_file_system_details.py +246 -0
- oci/file_storage/models/update_filesystem_snapshot_policy_details.py +236 -0
- oci/file_storage/models/update_kerberos_details.py +200 -0
- oci/file_storage/models/update_ldap_idmap_details.py +317 -0
- oci/file_storage/models/update_mount_target_details.py +286 -0
- oci/file_storage/models/update_outbound_connector_details.py +158 -0
- oci/file_storage/models/update_replication_details.py +189 -0
- oci/file_storage/models/update_snapshot_details.py +156 -0
- oci/file_storage/models/upgrade_shape_mount_target_details.py +78 -0
- oci/file_storage/models/validate_key_tabs_details.py +103 -0
- oci/file_storage/models/validate_key_tabs_response_details.py +103 -0
- oci/functions/__init__.py +16 -0
- oci/functions/functions_invoke_client.py +267 -0
- oci/functions/functions_invoke_client_composite_operations.py +26 -0
- oci/functions/functions_management_client.py +2056 -0
- oci/functions/functions_management_client_composite_operations.py +326 -0
- oci/functions/models/__init__.py +74 -0
- oci/functions/models/application.py +628 -0
- oci/functions/models/application_summary.py +512 -0
- oci/functions/models/application_trace_config.py +103 -0
- oci/functions/models/change_application_compartment_details.py +78 -0
- oci/functions/models/config_details.py +134 -0
- oci/functions/models/constant_provisioned_concurrency_config.py +82 -0
- oci/functions/models/create_application_details.py +446 -0
- oci/functions/models/create_function_details.py +437 -0
- oci/functions/models/function.py +734 -0
- oci/functions/models/function_provisioned_concurrency_config.py +109 -0
- oci/functions/models/function_source_details.py +101 -0
- oci/functions/models/function_summary.py +657 -0
- oci/functions/models/function_trace_config.py +72 -0
- oci/functions/models/image_policy_config.py +103 -0
- oci/functions/models/key_details.py +76 -0
- oci/functions/models/none_provisioned_concurrency_config.py +51 -0
- oci/functions/models/pbf_listing.py +408 -0
- oci/functions/models/pbf_listing_summary.py +386 -0
- oci/functions/models/pbf_listing_version.py +467 -0
- oci/functions/models/pbf_listing_version_summary.py +446 -0
- oci/functions/models/pbf_listing_versions_collection.py +73 -0
- oci/functions/models/pbf_listings_collection.py +72 -0
- oci/functions/models/policy_details.py +103 -0
- oci/functions/models/pre_built_function_source_details.py +88 -0
- oci/functions/models/publisher_details.py +72 -0
- oci/functions/models/requirement_details.py +106 -0
- oci/functions/models/trigger.py +72 -0
- oci/functions/models/trigger_summary.py +72 -0
- oci/functions/models/triggers_collection.py +72 -0
- oci/functions/models/update_application_details.py +290 -0
- oci/functions/models/update_function_details.py +346 -0
- oci/load_balancer/__init__.py +14 -0
- oci/load_balancer/load_balancer_client.py +7641 -0
- oci/load_balancer/load_balancer_client_composite_operations.py +1630 -0
- oci/load_balancer/models/__init__.py +186 -0
- oci/load_balancer/models/action.py +97 -0
- oci/load_balancer/models/add_http_request_header_rule.py +134 -0
- oci/load_balancer/models/add_http_response_header_rule.py +137 -0
- oci/load_balancer/models/allow_rule.py +123 -0
- oci/load_balancer/models/backend.py +350 -0
- oci/load_balancer/models/backend_details.py +312 -0
- oci/load_balancer/models/backend_health.py +143 -0
- oci/load_balancer/models/backend_set.py +305 -0
- oci/load_balancer/models/backend_set_details.py +262 -0
- oci/load_balancer/models/backend_set_health.py +265 -0
- oci/load_balancer/models/certificate.py +188 -0
- oci/load_balancer/models/certificate_details.py +270 -0
- oci/load_balancer/models/change_load_balancer_compartment_details.py +78 -0
- oci/load_balancer/models/connection_configuration.py +168 -0
- oci/load_balancer/models/control_access_using_http_methods_rule.py +162 -0
- oci/load_balancer/models/create_backend_details.py +316 -0
- oci/load_balancer/models/create_backend_set_details.py +305 -0
- oci/load_balancer/models/create_certificate_details.py +270 -0
- oci/load_balancer/models/create_hostname_details.py +121 -0
- oci/load_balancer/models/create_listener_details.py +387 -0
- oci/load_balancer/models/create_load_balancer_details.py +895 -0
- oci/load_balancer/models/create_path_route_set_details.py +111 -0
- oci/load_balancer/models/create_routing_policy_details.py +154 -0
- oci/load_balancer/models/create_rule_set_details.py +109 -0
- oci/load_balancer/models/create_ssl_cipher_suite_details.py +606 -0
- oci/load_balancer/models/extend_http_request_header_value_rule.py +181 -0
- oci/load_balancer/models/extend_http_response_header_value_rule.py +181 -0
- oci/load_balancer/models/forward_to_backend_set.py +86 -0
- oci/load_balancer/models/health_check_result.py +219 -0
- oci/load_balancer/models/health_checker.py +381 -0
- oci/load_balancer/models/health_checker_details.py +376 -0
- oci/load_balancer/models/hostname.py +121 -0
- oci/load_balancer/models/hostname_details.py +117 -0
- oci/load_balancer/models/http_header_rule.py +127 -0
- oci/load_balancer/models/ip_address.py +142 -0
- oci/load_balancer/models/ip_based_max_connections_rule.py +118 -0
- oci/load_balancer/models/ip_max_connections.py +111 -0
- oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.py +423 -0
- oci/load_balancer/models/listener.py +383 -0
- oci/load_balancer/models/listener_details.py +344 -0
- oci/load_balancer/models/listener_rule_summary.py +104 -0
- oci/load_balancer/models/load_balancer.py +1023 -0
- oci/load_balancer/models/load_balancer_health.py +281 -0
- oci/load_balancer/models/load_balancer_health_summary.py +167 -0
- oci/load_balancer/models/load_balancer_policy.py +80 -0
- oci/load_balancer/models/load_balancer_protocol.py +76 -0
- oci/load_balancer/models/load_balancer_shape.py +80 -0
- oci/load_balancer/models/path_match_condition.py +166 -0
- oci/load_balancer/models/path_match_type.py +126 -0
- oci/load_balancer/models/path_route.py +156 -0
- oci/load_balancer/models/path_route_set.py +112 -0
- oci/load_balancer/models/path_route_set_details.py +72 -0
- oci/load_balancer/models/redirect_rule.py +173 -0
- oci/load_balancer/models/redirect_uri.py +420 -0
- oci/load_balancer/models/remove_http_request_header_rule.py +90 -0
- oci/load_balancer/models/remove_http_response_header_rule.py +92 -0
- oci/load_balancer/models/reserved_ip.py +90 -0
- oci/load_balancer/models/routing_policy.py +152 -0
- oci/load_balancer/models/routing_policy_details.py +73 -0
- oci/load_balancer/models/routing_rule.py +135 -0
- oci/load_balancer/models/rule.py +177 -0
- oci/load_balancer/models/rule_condition.py +121 -0
- oci/load_balancer/models/rule_set.py +113 -0
- oci/load_balancer/models/rule_set_details.py +72 -0
- oci/load_balancer/models/session_persistence_configuration_details.py +136 -0
- oci/load_balancer/models/shape_details.py +121 -0
- oci/load_balancer/models/source_ip_address_condition.py +90 -0
- oci/load_balancer/models/source_vcn_id_condition.py +98 -0
- oci/load_balancer/models/source_vcn_ip_address_condition.py +97 -0
- oci/load_balancer/models/ssl_cipher_suite.py +606 -0
- oci/load_balancer/models/ssl_cipher_suite_details.py +606 -0
- oci/load_balancer/models/ssl_configuration.py +478 -0
- oci/load_balancer/models/ssl_configuration_details.py +476 -0
- oci/load_balancer/models/update_backend_details.py +242 -0
- oci/load_balancer/models/update_backend_set_details.py +264 -0
- oci/load_balancer/models/update_health_checker_details.py +374 -0
- oci/load_balancer/models/update_hostname_details.py +86 -0
- oci/load_balancer/models/update_listener_details.py +344 -0
- oci/load_balancer/models/update_load_balancer_details.py +356 -0
- oci/load_balancer/models/update_load_balancer_shape_details.py +127 -0
- oci/load_balancer/models/update_network_security_groups_details.py +99 -0
- oci/load_balancer/models/update_path_route_set_details.py +72 -0
- oci/load_balancer/models/update_routing_policy_details.py +115 -0
- oci/load_balancer/models/update_rule_set_details.py +72 -0
- oci/load_balancer/models/update_ssl_cipher_suite_details.py +300 -0
- oci/load_balancer/models/work_request.py +385 -0
- oci/load_balancer/models/work_request_error.py +115 -0
- oci/version.py +1 -1
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.1.dist-info}/LICENSE.txt +0 -0
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.1.dist-info}/WHEEL +0 -0
- {mv_oci_sdk-2.142.0.dist-info → mv_oci_sdk-2.142.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2056 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
4
|
+
|
5
|
+
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20181201
|
6
|
+
|
7
|
+
from __future__ import absolute_import
|
8
|
+
|
9
|
+
from oci._vendor import requests # noqa: F401
|
10
|
+
from oci._vendor import six
|
11
|
+
|
12
|
+
from oci import retry, circuit_breaker # noqa: F401
|
13
|
+
from oci.base_client import BaseClient
|
14
|
+
from oci.config import get_config_value_or_default, validate_config
|
15
|
+
from oci.signer import Signer
|
16
|
+
from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME
|
17
|
+
from oci.exceptions import InvalidAlloyConfig
|
18
|
+
from oci.alloy import OCI_SDK_ENABLED_SERVICES_SET
|
19
|
+
from .models import functions_type_mapping
|
20
|
+
missing = Sentinel("Missing")
|
21
|
+
|
22
|
+
|
23
|
+
class FunctionsManagementClient(object):
|
24
|
+
"""
|
25
|
+
API for the Functions service.
|
26
|
+
"""
|
27
|
+
|
28
|
+
def __init__(self, config, **kwargs):
|
29
|
+
"""
|
30
|
+
Creates a new service client
|
31
|
+
|
32
|
+
:param dict config:
|
33
|
+
Configuration keys and values as per `SDK and Tool Configuration <https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm>`__.
|
34
|
+
The :py:meth:`~oci.config.from_file` method can be used to load configuration from a file. Alternatively, a ``dict`` can be passed. You can validate_config
|
35
|
+
the dict using :py:meth:`~oci.config.validate_config`
|
36
|
+
|
37
|
+
:param str service_endpoint: (optional)
|
38
|
+
The endpoint of the service to call using this client. For example ``https://iaas.us-ashburn-1.oraclecloud.com``. If this keyword argument is
|
39
|
+
not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit
|
40
|
+
need to specify a service endpoint.
|
41
|
+
|
42
|
+
:param timeout: (optional)
|
43
|
+
The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided
|
44
|
+
as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If
|
45
|
+
a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
|
46
|
+
:type timeout: float or tuple(float, float)
|
47
|
+
|
48
|
+
:param signer: (optional)
|
49
|
+
The signer to use when signing requests made by the service client. The default is to use a :py:class:`~oci.signer.Signer` based on the values
|
50
|
+
provided in the config parameter.
|
51
|
+
|
52
|
+
One use case for this parameter is for `Instance Principals authentication <https://docs.cloud.oracle.com/Content/Identity/Tasks/callingservicesfrominstances.htm>`__
|
53
|
+
by passing an instance of :py:class:`~oci.auth.signers.InstancePrincipalsSecurityTokenSigner` as the value for this keyword argument
|
54
|
+
:type signer: :py:class:`~oci.signer.AbstractBaseSigner`
|
55
|
+
|
56
|
+
:param obj retry_strategy: (optional)
|
57
|
+
A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default.
|
58
|
+
Retry strategies can also be applied at the operation level by passing a ``retry_strategy`` keyword argument as part of calling the operation.
|
59
|
+
Any value provided at the operation level will override whatever is specified at the client level.
|
60
|
+
|
61
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. A convenience :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY`
|
62
|
+
is also available. The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
63
|
+
|
64
|
+
:param obj circuit_breaker_strategy: (optional)
|
65
|
+
A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level).
|
66
|
+
This client uses :py:data:`~oci.circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY` as default if no circuit breaker strategy is provided.
|
67
|
+
The specifics of circuit breaker strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/circuit_breakers.html>`__.
|
68
|
+
|
69
|
+
:param function circuit_breaker_callback: (optional)
|
70
|
+
Callback function to receive any exceptions triggerred by the circuit breaker.
|
71
|
+
|
72
|
+
:param bool client_level_realm_specific_endpoint_template_enabled: (optional)
|
73
|
+
A boolean flag to indicate whether or not this client should be created with realm specific endpoint template enabled or disable. By default, this will be set as None.
|
74
|
+
|
75
|
+
:param allow_control_chars: (optional)
|
76
|
+
allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not
|
77
|
+
allow control characters to be in the response object.
|
78
|
+
"""
|
79
|
+
if not OCI_SDK_ENABLED_SERVICES_SET.is_service_enabled("functions"):
|
80
|
+
raise InvalidAlloyConfig("The Alloy configuration has disabled this service, this behavior is controlled by OCI_SDK_ENABLED_SERVICES_SET variable. Please check if your local alloy-config file configured the service you're targeting or contact the cloud provider on the availability of this service")
|
81
|
+
|
82
|
+
validate_config(config, signer=kwargs.get('signer'))
|
83
|
+
if 'signer' in kwargs:
|
84
|
+
signer = kwargs['signer']
|
85
|
+
|
86
|
+
elif AUTHENTICATION_TYPE_FIELD_NAME in config:
|
87
|
+
signer = get_signer_from_authentication_type(config)
|
88
|
+
|
89
|
+
else:
|
90
|
+
signer = Signer(
|
91
|
+
tenancy=config["tenancy"],
|
92
|
+
user=config["user"],
|
93
|
+
fingerprint=config["fingerprint"],
|
94
|
+
private_key_file_location=config.get("key_file"),
|
95
|
+
pass_phrase=get_config_value_or_default(config, "pass_phrase"),
|
96
|
+
private_key_content=config.get("key_content")
|
97
|
+
)
|
98
|
+
|
99
|
+
base_client_init_kwargs = {
|
100
|
+
'regional_client': True,
|
101
|
+
'service_endpoint': kwargs.get('service_endpoint'),
|
102
|
+
'base_path': '/20181201',
|
103
|
+
'service_endpoint_template': 'https://functions.{region}.oci.{secondLevelDomain}',
|
104
|
+
'service_endpoint_template_per_realm': { }, # noqa: E201 E202
|
105
|
+
'skip_deserialization': kwargs.get('skip_deserialization', False),
|
106
|
+
'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY),
|
107
|
+
'client_level_realm_specific_endpoint_template_enabled': kwargs.get('client_level_realm_specific_endpoint_template_enabled')
|
108
|
+
}
|
109
|
+
if 'timeout' in kwargs:
|
110
|
+
base_client_init_kwargs['timeout'] = kwargs.get('timeout')
|
111
|
+
if base_client_init_kwargs.get('circuit_breaker_strategy') is None:
|
112
|
+
base_client_init_kwargs['circuit_breaker_strategy'] = circuit_breaker.DEFAULT_CIRCUIT_BREAKER_STRATEGY
|
113
|
+
if 'allow_control_chars' in kwargs:
|
114
|
+
base_client_init_kwargs['allow_control_chars'] = kwargs.get('allow_control_chars')
|
115
|
+
self.base_client = BaseClient("functions_management", config, signer, functions_type_mapping, **base_client_init_kwargs)
|
116
|
+
self.retry_strategy = kwargs.get('retry_strategy')
|
117
|
+
self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback')
|
118
|
+
|
119
|
+
def change_application_compartment(self, application_id, change_application_compartment_details, **kwargs):
|
120
|
+
"""
|
121
|
+
Moves an application into a different compartment within the same tenancy.
|
122
|
+
For information about moving resources between compartments, see `Moving Resources Between Compartments`__.
|
123
|
+
|
124
|
+
__ https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes
|
125
|
+
|
126
|
+
|
127
|
+
:param str application_id: (required)
|
128
|
+
The `OCID`__ of this application.
|
129
|
+
|
130
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
131
|
+
|
132
|
+
:param oci.functions.models.ChangeApplicationCompartmentDetails change_application_compartment_details: (required)
|
133
|
+
Properties to change the compartment of an application.
|
134
|
+
|
135
|
+
:param str if_match: (optional)
|
136
|
+
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
137
|
+
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
138
|
+
will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
139
|
+
|
140
|
+
:param str opc_request_id: (optional)
|
141
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
142
|
+
particular request, please provide the request ID.
|
143
|
+
|
144
|
+
:param obj retry_strategy: (optional)
|
145
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
146
|
+
|
147
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
148
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
149
|
+
|
150
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
151
|
+
|
152
|
+
:param bool allow_control_chars: (optional)
|
153
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
154
|
+
By default, the response will not allow control characters in strings
|
155
|
+
|
156
|
+
:return: A :class:`~oci.response.Response` object with data of type None
|
157
|
+
:rtype: :class:`~oci.response.Response`
|
158
|
+
|
159
|
+
:example:
|
160
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/change_application_compartment.py.html>`__ to see an example of how to use change_application_compartment API.
|
161
|
+
"""
|
162
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
163
|
+
required_arguments = ['applicationId']
|
164
|
+
resource_path = "/applications/{applicationId}/actions/changeCompartment"
|
165
|
+
method = "POST"
|
166
|
+
operation_name = "change_application_compartment"
|
167
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Application/ChangeApplicationCompartment"
|
168
|
+
|
169
|
+
# Don't accept unknown kwargs
|
170
|
+
expected_kwargs = [
|
171
|
+
"allow_control_chars",
|
172
|
+
"retry_strategy",
|
173
|
+
"if_match",
|
174
|
+
"opc_request_id"
|
175
|
+
]
|
176
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
177
|
+
if extra_kwargs:
|
178
|
+
raise ValueError(
|
179
|
+
f"change_application_compartment got unknown kwargs: {extra_kwargs!r}")
|
180
|
+
|
181
|
+
path_params = {
|
182
|
+
"applicationId": application_id
|
183
|
+
}
|
184
|
+
|
185
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
186
|
+
|
187
|
+
for (k, v) in six.iteritems(path_params):
|
188
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
189
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
190
|
+
|
191
|
+
header_params = {
|
192
|
+
"accept": "application/json",
|
193
|
+
"content-type": "application/json",
|
194
|
+
"if-match": kwargs.get("if_match", missing),
|
195
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
196
|
+
}
|
197
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
198
|
+
|
199
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
200
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
201
|
+
client_retry_strategy=self.retry_strategy
|
202
|
+
)
|
203
|
+
if retry_strategy is None:
|
204
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
205
|
+
|
206
|
+
if retry_strategy:
|
207
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
208
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
209
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
210
|
+
return retry_strategy.make_retrying_call(
|
211
|
+
self.base_client.call_api,
|
212
|
+
resource_path=resource_path,
|
213
|
+
method=method,
|
214
|
+
path_params=path_params,
|
215
|
+
header_params=header_params,
|
216
|
+
body=change_application_compartment_details,
|
217
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
218
|
+
operation_name=operation_name,
|
219
|
+
api_reference_link=api_reference_link,
|
220
|
+
required_arguments=required_arguments)
|
221
|
+
else:
|
222
|
+
return self.base_client.call_api(
|
223
|
+
resource_path=resource_path,
|
224
|
+
method=method,
|
225
|
+
path_params=path_params,
|
226
|
+
header_params=header_params,
|
227
|
+
body=change_application_compartment_details,
|
228
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
229
|
+
operation_name=operation_name,
|
230
|
+
api_reference_link=api_reference_link,
|
231
|
+
required_arguments=required_arguments)
|
232
|
+
|
233
|
+
def create_application(self, create_application_details, **kwargs):
|
234
|
+
"""
|
235
|
+
Creates a new application.
|
236
|
+
|
237
|
+
|
238
|
+
:param oci.functions.models.CreateApplicationDetails create_application_details: (required)
|
239
|
+
Specification of the application to create
|
240
|
+
|
241
|
+
:param str opc_request_id: (optional)
|
242
|
+
The 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
|
+
:param obj retry_strategy: (optional)
|
246
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
247
|
+
|
248
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
249
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
250
|
+
|
251
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
252
|
+
|
253
|
+
:param bool allow_control_chars: (optional)
|
254
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
255
|
+
By default, the response will not allow control characters in strings
|
256
|
+
|
257
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.Application`
|
258
|
+
:rtype: :class:`~oci.response.Response`
|
259
|
+
|
260
|
+
:example:
|
261
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/create_application.py.html>`__ to see an example of how to use create_application API.
|
262
|
+
"""
|
263
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
264
|
+
required_arguments = []
|
265
|
+
resource_path = "/applications"
|
266
|
+
method = "POST"
|
267
|
+
operation_name = "create_application"
|
268
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Application/CreateApplication"
|
269
|
+
|
270
|
+
# Don't accept unknown kwargs
|
271
|
+
expected_kwargs = [
|
272
|
+
"allow_control_chars",
|
273
|
+
"retry_strategy",
|
274
|
+
"opc_request_id"
|
275
|
+
]
|
276
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
277
|
+
if extra_kwargs:
|
278
|
+
raise ValueError(
|
279
|
+
f"create_application got unknown kwargs: {extra_kwargs!r}")
|
280
|
+
|
281
|
+
header_params = {
|
282
|
+
"accept": "application/json",
|
283
|
+
"content-type": "application/json",
|
284
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
285
|
+
}
|
286
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
287
|
+
|
288
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
289
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
290
|
+
client_retry_strategy=self.retry_strategy
|
291
|
+
)
|
292
|
+
if retry_strategy is None:
|
293
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
294
|
+
|
295
|
+
if retry_strategy:
|
296
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
297
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
298
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
299
|
+
return retry_strategy.make_retrying_call(
|
300
|
+
self.base_client.call_api,
|
301
|
+
resource_path=resource_path,
|
302
|
+
method=method,
|
303
|
+
header_params=header_params,
|
304
|
+
body=create_application_details,
|
305
|
+
response_type="Application",
|
306
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
307
|
+
operation_name=operation_name,
|
308
|
+
api_reference_link=api_reference_link,
|
309
|
+
required_arguments=required_arguments)
|
310
|
+
else:
|
311
|
+
return self.base_client.call_api(
|
312
|
+
resource_path=resource_path,
|
313
|
+
method=method,
|
314
|
+
header_params=header_params,
|
315
|
+
body=create_application_details,
|
316
|
+
response_type="Application",
|
317
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
318
|
+
operation_name=operation_name,
|
319
|
+
api_reference_link=api_reference_link,
|
320
|
+
required_arguments=required_arguments)
|
321
|
+
|
322
|
+
def create_function(self, create_function_details, **kwargs):
|
323
|
+
"""
|
324
|
+
Creates a new function.
|
325
|
+
|
326
|
+
|
327
|
+
:param oci.functions.models.CreateFunctionDetails create_function_details: (required)
|
328
|
+
Specification of the function to create
|
329
|
+
|
330
|
+
:param str opc_request_id: (optional)
|
331
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
332
|
+
particular request, please provide the request ID.
|
333
|
+
|
334
|
+
:param obj retry_strategy: (optional)
|
335
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
336
|
+
|
337
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
338
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
339
|
+
|
340
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
341
|
+
|
342
|
+
:param bool allow_control_chars: (optional)
|
343
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
344
|
+
By default, the response will not allow control characters in strings
|
345
|
+
|
346
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.Function`
|
347
|
+
:rtype: :class:`~oci.response.Response`
|
348
|
+
|
349
|
+
:example:
|
350
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/create_function.py.html>`__ to see an example of how to use create_function API.
|
351
|
+
"""
|
352
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
353
|
+
required_arguments = []
|
354
|
+
resource_path = "/functions"
|
355
|
+
method = "POST"
|
356
|
+
operation_name = "create_function"
|
357
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Function/CreateFunction"
|
358
|
+
|
359
|
+
# Don't accept unknown kwargs
|
360
|
+
expected_kwargs = [
|
361
|
+
"allow_control_chars",
|
362
|
+
"retry_strategy",
|
363
|
+
"opc_request_id"
|
364
|
+
]
|
365
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
366
|
+
if extra_kwargs:
|
367
|
+
raise ValueError(
|
368
|
+
f"create_function got unknown kwargs: {extra_kwargs!r}")
|
369
|
+
|
370
|
+
header_params = {
|
371
|
+
"accept": "application/json",
|
372
|
+
"content-type": "application/json",
|
373
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
374
|
+
}
|
375
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
376
|
+
|
377
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
378
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
379
|
+
client_retry_strategy=self.retry_strategy
|
380
|
+
)
|
381
|
+
if retry_strategy is None:
|
382
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
383
|
+
|
384
|
+
if retry_strategy:
|
385
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
386
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
387
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
388
|
+
return retry_strategy.make_retrying_call(
|
389
|
+
self.base_client.call_api,
|
390
|
+
resource_path=resource_path,
|
391
|
+
method=method,
|
392
|
+
header_params=header_params,
|
393
|
+
body=create_function_details,
|
394
|
+
response_type="Function",
|
395
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
396
|
+
operation_name=operation_name,
|
397
|
+
api_reference_link=api_reference_link,
|
398
|
+
required_arguments=required_arguments)
|
399
|
+
else:
|
400
|
+
return self.base_client.call_api(
|
401
|
+
resource_path=resource_path,
|
402
|
+
method=method,
|
403
|
+
header_params=header_params,
|
404
|
+
body=create_function_details,
|
405
|
+
response_type="Function",
|
406
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
407
|
+
operation_name=operation_name,
|
408
|
+
api_reference_link=api_reference_link,
|
409
|
+
required_arguments=required_arguments)
|
410
|
+
|
411
|
+
def delete_application(self, application_id, **kwargs):
|
412
|
+
"""
|
413
|
+
Deletes an application.
|
414
|
+
|
415
|
+
|
416
|
+
:param str application_id: (required)
|
417
|
+
The `OCID`__ of this application.
|
418
|
+
|
419
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
420
|
+
|
421
|
+
:param str if_match: (optional)
|
422
|
+
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
423
|
+
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
424
|
+
will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
425
|
+
|
426
|
+
:param str opc_request_id: (optional)
|
427
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
428
|
+
particular request, please provide the request ID.
|
429
|
+
|
430
|
+
:param obj retry_strategy: (optional)
|
431
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
432
|
+
|
433
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
434
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
435
|
+
|
436
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
437
|
+
|
438
|
+
:param bool allow_control_chars: (optional)
|
439
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
440
|
+
By default, the response will not allow control characters in strings
|
441
|
+
|
442
|
+
:return: A :class:`~oci.response.Response` object with data of type None
|
443
|
+
:rtype: :class:`~oci.response.Response`
|
444
|
+
|
445
|
+
:example:
|
446
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/delete_application.py.html>`__ to see an example of how to use delete_application API.
|
447
|
+
"""
|
448
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
449
|
+
required_arguments = ['applicationId']
|
450
|
+
resource_path = "/applications/{applicationId}"
|
451
|
+
method = "DELETE"
|
452
|
+
operation_name = "delete_application"
|
453
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Application/DeleteApplication"
|
454
|
+
|
455
|
+
# Don't accept unknown kwargs
|
456
|
+
expected_kwargs = [
|
457
|
+
"allow_control_chars",
|
458
|
+
"retry_strategy",
|
459
|
+
"if_match",
|
460
|
+
"opc_request_id"
|
461
|
+
]
|
462
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
463
|
+
if extra_kwargs:
|
464
|
+
raise ValueError(
|
465
|
+
f"delete_application got unknown kwargs: {extra_kwargs!r}")
|
466
|
+
|
467
|
+
path_params = {
|
468
|
+
"applicationId": application_id
|
469
|
+
}
|
470
|
+
|
471
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
472
|
+
|
473
|
+
for (k, v) in six.iteritems(path_params):
|
474
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
475
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
476
|
+
|
477
|
+
header_params = {
|
478
|
+
"accept": "application/json",
|
479
|
+
"content-type": "application/json",
|
480
|
+
"if-match": kwargs.get("if_match", missing),
|
481
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
482
|
+
}
|
483
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
484
|
+
|
485
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
486
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
487
|
+
client_retry_strategy=self.retry_strategy
|
488
|
+
)
|
489
|
+
if retry_strategy is None:
|
490
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
491
|
+
|
492
|
+
if retry_strategy:
|
493
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
494
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
495
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
496
|
+
return retry_strategy.make_retrying_call(
|
497
|
+
self.base_client.call_api,
|
498
|
+
resource_path=resource_path,
|
499
|
+
method=method,
|
500
|
+
path_params=path_params,
|
501
|
+
header_params=header_params,
|
502
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
503
|
+
operation_name=operation_name,
|
504
|
+
api_reference_link=api_reference_link,
|
505
|
+
required_arguments=required_arguments)
|
506
|
+
else:
|
507
|
+
return self.base_client.call_api(
|
508
|
+
resource_path=resource_path,
|
509
|
+
method=method,
|
510
|
+
path_params=path_params,
|
511
|
+
header_params=header_params,
|
512
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
513
|
+
operation_name=operation_name,
|
514
|
+
api_reference_link=api_reference_link,
|
515
|
+
required_arguments=required_arguments)
|
516
|
+
|
517
|
+
def delete_function(self, function_id, **kwargs):
|
518
|
+
"""
|
519
|
+
Deletes a function.
|
520
|
+
|
521
|
+
|
522
|
+
:param str function_id: (required)
|
523
|
+
The `OCID`__ of this function.
|
524
|
+
|
525
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
526
|
+
|
527
|
+
:param str if_match: (optional)
|
528
|
+
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
529
|
+
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
530
|
+
will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
531
|
+
|
532
|
+
:param str opc_request_id: (optional)
|
533
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
534
|
+
particular request, please provide the request ID.
|
535
|
+
|
536
|
+
:param obj retry_strategy: (optional)
|
537
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
538
|
+
|
539
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
540
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
541
|
+
|
542
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
543
|
+
|
544
|
+
:param bool allow_control_chars: (optional)
|
545
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
546
|
+
By default, the response will not allow control characters in strings
|
547
|
+
|
548
|
+
:return: A :class:`~oci.response.Response` object with data of type None
|
549
|
+
:rtype: :class:`~oci.response.Response`
|
550
|
+
|
551
|
+
:example:
|
552
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/delete_function.py.html>`__ to see an example of how to use delete_function API.
|
553
|
+
"""
|
554
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
555
|
+
required_arguments = ['functionId']
|
556
|
+
resource_path = "/functions/{functionId}"
|
557
|
+
method = "DELETE"
|
558
|
+
operation_name = "delete_function"
|
559
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Function/DeleteFunction"
|
560
|
+
|
561
|
+
# Don't accept unknown kwargs
|
562
|
+
expected_kwargs = [
|
563
|
+
"allow_control_chars",
|
564
|
+
"retry_strategy",
|
565
|
+
"if_match",
|
566
|
+
"opc_request_id"
|
567
|
+
]
|
568
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
569
|
+
if extra_kwargs:
|
570
|
+
raise ValueError(
|
571
|
+
f"delete_function got unknown kwargs: {extra_kwargs!r}")
|
572
|
+
|
573
|
+
path_params = {
|
574
|
+
"functionId": function_id
|
575
|
+
}
|
576
|
+
|
577
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
578
|
+
|
579
|
+
for (k, v) in six.iteritems(path_params):
|
580
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
581
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
582
|
+
|
583
|
+
header_params = {
|
584
|
+
"accept": "application/json",
|
585
|
+
"content-type": "application/json",
|
586
|
+
"if-match": kwargs.get("if_match", missing),
|
587
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
588
|
+
}
|
589
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
590
|
+
|
591
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
592
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
593
|
+
client_retry_strategy=self.retry_strategy
|
594
|
+
)
|
595
|
+
if retry_strategy is None:
|
596
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
597
|
+
|
598
|
+
if retry_strategy:
|
599
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
600
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
601
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
602
|
+
return retry_strategy.make_retrying_call(
|
603
|
+
self.base_client.call_api,
|
604
|
+
resource_path=resource_path,
|
605
|
+
method=method,
|
606
|
+
path_params=path_params,
|
607
|
+
header_params=header_params,
|
608
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
609
|
+
operation_name=operation_name,
|
610
|
+
api_reference_link=api_reference_link,
|
611
|
+
required_arguments=required_arguments)
|
612
|
+
else:
|
613
|
+
return self.base_client.call_api(
|
614
|
+
resource_path=resource_path,
|
615
|
+
method=method,
|
616
|
+
path_params=path_params,
|
617
|
+
header_params=header_params,
|
618
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
619
|
+
operation_name=operation_name,
|
620
|
+
api_reference_link=api_reference_link,
|
621
|
+
required_arguments=required_arguments)
|
622
|
+
|
623
|
+
def get_application(self, application_id, **kwargs):
|
624
|
+
"""
|
625
|
+
Retrieves an application.
|
626
|
+
|
627
|
+
|
628
|
+
:param str application_id: (required)
|
629
|
+
The `OCID`__ of this application.
|
630
|
+
|
631
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
632
|
+
|
633
|
+
:param str opc_request_id: (optional)
|
634
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
635
|
+
particular request, please provide the request ID.
|
636
|
+
|
637
|
+
:param obj retry_strategy: (optional)
|
638
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
639
|
+
|
640
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
641
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
642
|
+
|
643
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
644
|
+
|
645
|
+
:param bool allow_control_chars: (optional)
|
646
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
647
|
+
By default, the response will not allow control characters in strings
|
648
|
+
|
649
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.Application`
|
650
|
+
:rtype: :class:`~oci.response.Response`
|
651
|
+
|
652
|
+
:example:
|
653
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/get_application.py.html>`__ to see an example of how to use get_application API.
|
654
|
+
"""
|
655
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
656
|
+
required_arguments = ['applicationId']
|
657
|
+
resource_path = "/applications/{applicationId}"
|
658
|
+
method = "GET"
|
659
|
+
operation_name = "get_application"
|
660
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Application/GetApplication"
|
661
|
+
|
662
|
+
# Don't accept unknown kwargs
|
663
|
+
expected_kwargs = [
|
664
|
+
"allow_control_chars",
|
665
|
+
"retry_strategy",
|
666
|
+
"opc_request_id"
|
667
|
+
]
|
668
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
669
|
+
if extra_kwargs:
|
670
|
+
raise ValueError(
|
671
|
+
f"get_application got unknown kwargs: {extra_kwargs!r}")
|
672
|
+
|
673
|
+
path_params = {
|
674
|
+
"applicationId": application_id
|
675
|
+
}
|
676
|
+
|
677
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
678
|
+
|
679
|
+
for (k, v) in six.iteritems(path_params):
|
680
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
681
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
682
|
+
|
683
|
+
header_params = {
|
684
|
+
"accept": "application/json",
|
685
|
+
"content-type": "application/json",
|
686
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
687
|
+
}
|
688
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
689
|
+
|
690
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
691
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
692
|
+
client_retry_strategy=self.retry_strategy
|
693
|
+
)
|
694
|
+
if retry_strategy is None:
|
695
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
696
|
+
|
697
|
+
if retry_strategy:
|
698
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
699
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
700
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
701
|
+
return retry_strategy.make_retrying_call(
|
702
|
+
self.base_client.call_api,
|
703
|
+
resource_path=resource_path,
|
704
|
+
method=method,
|
705
|
+
path_params=path_params,
|
706
|
+
header_params=header_params,
|
707
|
+
response_type="Application",
|
708
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
709
|
+
operation_name=operation_name,
|
710
|
+
api_reference_link=api_reference_link,
|
711
|
+
required_arguments=required_arguments)
|
712
|
+
else:
|
713
|
+
return self.base_client.call_api(
|
714
|
+
resource_path=resource_path,
|
715
|
+
method=method,
|
716
|
+
path_params=path_params,
|
717
|
+
header_params=header_params,
|
718
|
+
response_type="Application",
|
719
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
720
|
+
operation_name=operation_name,
|
721
|
+
api_reference_link=api_reference_link,
|
722
|
+
required_arguments=required_arguments)
|
723
|
+
|
724
|
+
def get_function(self, function_id, **kwargs):
|
725
|
+
"""
|
726
|
+
Retrieves a function.
|
727
|
+
|
728
|
+
|
729
|
+
:param str function_id: (required)
|
730
|
+
The `OCID`__ of this function.
|
731
|
+
|
732
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
733
|
+
|
734
|
+
:param str opc_request_id: (optional)
|
735
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
736
|
+
particular request, please provide the request ID.
|
737
|
+
|
738
|
+
:param obj retry_strategy: (optional)
|
739
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
740
|
+
|
741
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
742
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
743
|
+
|
744
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
745
|
+
|
746
|
+
:param bool allow_control_chars: (optional)
|
747
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
748
|
+
By default, the response will not allow control characters in strings
|
749
|
+
|
750
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.Function`
|
751
|
+
:rtype: :class:`~oci.response.Response`
|
752
|
+
|
753
|
+
:example:
|
754
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/get_function.py.html>`__ to see an example of how to use get_function API.
|
755
|
+
"""
|
756
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
757
|
+
required_arguments = ['functionId']
|
758
|
+
resource_path = "/functions/{functionId}"
|
759
|
+
method = "GET"
|
760
|
+
operation_name = "get_function"
|
761
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Function/GetFunction"
|
762
|
+
|
763
|
+
# Don't accept unknown kwargs
|
764
|
+
expected_kwargs = [
|
765
|
+
"allow_control_chars",
|
766
|
+
"retry_strategy",
|
767
|
+
"opc_request_id"
|
768
|
+
]
|
769
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
770
|
+
if extra_kwargs:
|
771
|
+
raise ValueError(
|
772
|
+
f"get_function got unknown kwargs: {extra_kwargs!r}")
|
773
|
+
|
774
|
+
path_params = {
|
775
|
+
"functionId": function_id
|
776
|
+
}
|
777
|
+
|
778
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
779
|
+
|
780
|
+
for (k, v) in six.iteritems(path_params):
|
781
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
782
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
783
|
+
|
784
|
+
header_params = {
|
785
|
+
"accept": "application/json",
|
786
|
+
"content-type": "application/json",
|
787
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
788
|
+
}
|
789
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
790
|
+
|
791
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
792
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
793
|
+
client_retry_strategy=self.retry_strategy
|
794
|
+
)
|
795
|
+
if retry_strategy is None:
|
796
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
797
|
+
|
798
|
+
if retry_strategy:
|
799
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
800
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
801
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
802
|
+
return retry_strategy.make_retrying_call(
|
803
|
+
self.base_client.call_api,
|
804
|
+
resource_path=resource_path,
|
805
|
+
method=method,
|
806
|
+
path_params=path_params,
|
807
|
+
header_params=header_params,
|
808
|
+
response_type="Function",
|
809
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
810
|
+
operation_name=operation_name,
|
811
|
+
api_reference_link=api_reference_link,
|
812
|
+
required_arguments=required_arguments)
|
813
|
+
else:
|
814
|
+
return self.base_client.call_api(
|
815
|
+
resource_path=resource_path,
|
816
|
+
method=method,
|
817
|
+
path_params=path_params,
|
818
|
+
header_params=header_params,
|
819
|
+
response_type="Function",
|
820
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
821
|
+
operation_name=operation_name,
|
822
|
+
api_reference_link=api_reference_link,
|
823
|
+
required_arguments=required_arguments)
|
824
|
+
|
825
|
+
def get_pbf_listing(self, pbf_listing_id, **kwargs):
|
826
|
+
"""
|
827
|
+
Fetches a Pre-built Function(PBF) Listing. Returns a PbfListing response model.
|
828
|
+
|
829
|
+
|
830
|
+
:param str pbf_listing_id: (required)
|
831
|
+
unique PbfListing identifier
|
832
|
+
|
833
|
+
:param str opc_request_id: (optional)
|
834
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
835
|
+
particular request, please provide the request ID.
|
836
|
+
|
837
|
+
:param obj retry_strategy: (optional)
|
838
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
839
|
+
|
840
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
841
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
842
|
+
|
843
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
844
|
+
|
845
|
+
:param bool allow_control_chars: (optional)
|
846
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
847
|
+
By default, the response will not allow control characters in strings
|
848
|
+
|
849
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.PbfListing`
|
850
|
+
:rtype: :class:`~oci.response.Response`
|
851
|
+
|
852
|
+
:example:
|
853
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/get_pbf_listing.py.html>`__ to see an example of how to use get_pbf_listing API.
|
854
|
+
"""
|
855
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
856
|
+
required_arguments = ['pbfListingId']
|
857
|
+
resource_path = "/pbfListings/{pbfListingId}"
|
858
|
+
method = "GET"
|
859
|
+
operation_name = "get_pbf_listing"
|
860
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/PbfListing/GetPbfListing"
|
861
|
+
|
862
|
+
# Don't accept unknown kwargs
|
863
|
+
expected_kwargs = [
|
864
|
+
"allow_control_chars",
|
865
|
+
"retry_strategy",
|
866
|
+
"opc_request_id"
|
867
|
+
]
|
868
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
869
|
+
if extra_kwargs:
|
870
|
+
raise ValueError(
|
871
|
+
f"get_pbf_listing got unknown kwargs: {extra_kwargs!r}")
|
872
|
+
|
873
|
+
path_params = {
|
874
|
+
"pbfListingId": pbf_listing_id
|
875
|
+
}
|
876
|
+
|
877
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
878
|
+
|
879
|
+
for (k, v) in six.iteritems(path_params):
|
880
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
881
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
882
|
+
|
883
|
+
header_params = {
|
884
|
+
"accept": "application/json",
|
885
|
+
"content-type": "application/json",
|
886
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
887
|
+
}
|
888
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
889
|
+
|
890
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
891
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
892
|
+
client_retry_strategy=self.retry_strategy
|
893
|
+
)
|
894
|
+
if retry_strategy is None:
|
895
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
896
|
+
|
897
|
+
if retry_strategy:
|
898
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
899
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
900
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
901
|
+
return retry_strategy.make_retrying_call(
|
902
|
+
self.base_client.call_api,
|
903
|
+
resource_path=resource_path,
|
904
|
+
method=method,
|
905
|
+
path_params=path_params,
|
906
|
+
header_params=header_params,
|
907
|
+
response_type="PbfListing",
|
908
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
909
|
+
operation_name=operation_name,
|
910
|
+
api_reference_link=api_reference_link,
|
911
|
+
required_arguments=required_arguments)
|
912
|
+
else:
|
913
|
+
return self.base_client.call_api(
|
914
|
+
resource_path=resource_path,
|
915
|
+
method=method,
|
916
|
+
path_params=path_params,
|
917
|
+
header_params=header_params,
|
918
|
+
response_type="PbfListing",
|
919
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
920
|
+
operation_name=operation_name,
|
921
|
+
api_reference_link=api_reference_link,
|
922
|
+
required_arguments=required_arguments)
|
923
|
+
|
924
|
+
def get_pbf_listing_version(self, pbf_listing_version_id, **kwargs):
|
925
|
+
"""
|
926
|
+
Gets a PbfListingVersion by identifier for a PbfListing.
|
927
|
+
|
928
|
+
|
929
|
+
:param str pbf_listing_version_id: (required)
|
930
|
+
unique PbfListingVersion identifier
|
931
|
+
|
932
|
+
:param str opc_request_id: (optional)
|
933
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
934
|
+
particular request, please provide the request ID.
|
935
|
+
|
936
|
+
:param obj retry_strategy: (optional)
|
937
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
938
|
+
|
939
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
940
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
941
|
+
|
942
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
943
|
+
|
944
|
+
:param bool allow_control_chars: (optional)
|
945
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
946
|
+
By default, the response will not allow control characters in strings
|
947
|
+
|
948
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.PbfListingVersion`
|
949
|
+
:rtype: :class:`~oci.response.Response`
|
950
|
+
|
951
|
+
:example:
|
952
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/get_pbf_listing_version.py.html>`__ to see an example of how to use get_pbf_listing_version API.
|
953
|
+
"""
|
954
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
955
|
+
required_arguments = ['pbfListingVersionId']
|
956
|
+
resource_path = "/pbfListingVersions/{pbfListingVersionId}"
|
957
|
+
method = "GET"
|
958
|
+
operation_name = "get_pbf_listing_version"
|
959
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/PbfListingVersion/GetPbfListingVersion"
|
960
|
+
|
961
|
+
# Don't accept unknown kwargs
|
962
|
+
expected_kwargs = [
|
963
|
+
"allow_control_chars",
|
964
|
+
"retry_strategy",
|
965
|
+
"opc_request_id"
|
966
|
+
]
|
967
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
968
|
+
if extra_kwargs:
|
969
|
+
raise ValueError(
|
970
|
+
f"get_pbf_listing_version got unknown kwargs: {extra_kwargs!r}")
|
971
|
+
|
972
|
+
path_params = {
|
973
|
+
"pbfListingVersionId": pbf_listing_version_id
|
974
|
+
}
|
975
|
+
|
976
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
977
|
+
|
978
|
+
for (k, v) in six.iteritems(path_params):
|
979
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
980
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
981
|
+
|
982
|
+
header_params = {
|
983
|
+
"accept": "application/json",
|
984
|
+
"content-type": "application/json",
|
985
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
986
|
+
}
|
987
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
988
|
+
|
989
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
990
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
991
|
+
client_retry_strategy=self.retry_strategy
|
992
|
+
)
|
993
|
+
if retry_strategy is None:
|
994
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
995
|
+
|
996
|
+
if retry_strategy:
|
997
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
998
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
999
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1000
|
+
return retry_strategy.make_retrying_call(
|
1001
|
+
self.base_client.call_api,
|
1002
|
+
resource_path=resource_path,
|
1003
|
+
method=method,
|
1004
|
+
path_params=path_params,
|
1005
|
+
header_params=header_params,
|
1006
|
+
response_type="PbfListingVersion",
|
1007
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1008
|
+
operation_name=operation_name,
|
1009
|
+
api_reference_link=api_reference_link,
|
1010
|
+
required_arguments=required_arguments)
|
1011
|
+
else:
|
1012
|
+
return self.base_client.call_api(
|
1013
|
+
resource_path=resource_path,
|
1014
|
+
method=method,
|
1015
|
+
path_params=path_params,
|
1016
|
+
header_params=header_params,
|
1017
|
+
response_type="PbfListingVersion",
|
1018
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1019
|
+
operation_name=operation_name,
|
1020
|
+
api_reference_link=api_reference_link,
|
1021
|
+
required_arguments=required_arguments)
|
1022
|
+
|
1023
|
+
def list_applications(self, compartment_id, **kwargs):
|
1024
|
+
"""
|
1025
|
+
Lists applications for a compartment.
|
1026
|
+
|
1027
|
+
|
1028
|
+
:param str compartment_id: (required)
|
1029
|
+
The `OCID`__ of the compartment to which this resource belongs.
|
1030
|
+
|
1031
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1032
|
+
|
1033
|
+
:param int limit: (optional)
|
1034
|
+
The maximum number of items to return. 1 is the minimum, 50 is the maximum.
|
1035
|
+
|
1036
|
+
Default: 10
|
1037
|
+
|
1038
|
+
:param str page: (optional)
|
1039
|
+
The pagination token for a list query returned by a previous operation
|
1040
|
+
|
1041
|
+
:param str opc_request_id: (optional)
|
1042
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1043
|
+
particular request, please provide the request ID.
|
1044
|
+
|
1045
|
+
:param str lifecycle_state: (optional)
|
1046
|
+
A filter to return only applications that match the lifecycle state in this parameter.
|
1047
|
+
Example: `Creating`
|
1048
|
+
|
1049
|
+
Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
|
1050
|
+
|
1051
|
+
:param str display_name: (optional)
|
1052
|
+
A filter to return only applications with display names that match the display name string. Matching is exact.
|
1053
|
+
|
1054
|
+
:param str id: (optional)
|
1055
|
+
A filter to return only applications with the specified OCID.
|
1056
|
+
|
1057
|
+
:param str sort_order: (optional)
|
1058
|
+
Specifies sort order.
|
1059
|
+
|
1060
|
+
* **ASC:** Ascending sort order.
|
1061
|
+
* **DESC:** Descending sort order.
|
1062
|
+
|
1063
|
+
Allowed values are: "ASC", "DESC"
|
1064
|
+
|
1065
|
+
:param str sort_by: (optional)
|
1066
|
+
Specifies the attribute with which to sort the rules.
|
1067
|
+
|
1068
|
+
Default: `displayName`
|
1069
|
+
|
1070
|
+
* **timeCreated:** Sorts by timeCreated.
|
1071
|
+
* **displayName:** Sorts by displayName.
|
1072
|
+
* **id:** Sorts by id.
|
1073
|
+
|
1074
|
+
Allowed values are: "timeCreated", "id", "displayName"
|
1075
|
+
|
1076
|
+
:param obj retry_strategy: (optional)
|
1077
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1078
|
+
|
1079
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1080
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1081
|
+
|
1082
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1083
|
+
|
1084
|
+
:param bool allow_control_chars: (optional)
|
1085
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1086
|
+
By default, the response will not allow control characters in strings
|
1087
|
+
|
1088
|
+
:return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.functions.models.ApplicationSummary`
|
1089
|
+
:rtype: :class:`~oci.response.Response`
|
1090
|
+
|
1091
|
+
:example:
|
1092
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/list_applications.py.html>`__ to see an example of how to use list_applications API.
|
1093
|
+
"""
|
1094
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1095
|
+
required_arguments = ['compartmentId']
|
1096
|
+
resource_path = "/applications"
|
1097
|
+
method = "GET"
|
1098
|
+
operation_name = "list_applications"
|
1099
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/ApplicationSummary/ListApplications"
|
1100
|
+
|
1101
|
+
# Don't accept unknown kwargs
|
1102
|
+
expected_kwargs = [
|
1103
|
+
"allow_control_chars",
|
1104
|
+
"retry_strategy",
|
1105
|
+
"limit",
|
1106
|
+
"page",
|
1107
|
+
"opc_request_id",
|
1108
|
+
"lifecycle_state",
|
1109
|
+
"display_name",
|
1110
|
+
"id",
|
1111
|
+
"sort_order",
|
1112
|
+
"sort_by"
|
1113
|
+
]
|
1114
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1115
|
+
if extra_kwargs:
|
1116
|
+
raise ValueError(
|
1117
|
+
f"list_applications got unknown kwargs: {extra_kwargs!r}")
|
1118
|
+
|
1119
|
+
if 'lifecycle_state' in kwargs:
|
1120
|
+
lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
|
1121
|
+
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
|
1122
|
+
raise ValueError(
|
1123
|
+
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
|
1124
|
+
)
|
1125
|
+
|
1126
|
+
if 'sort_order' in kwargs:
|
1127
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1128
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1129
|
+
raise ValueError(
|
1130
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1131
|
+
)
|
1132
|
+
|
1133
|
+
if 'sort_by' in kwargs:
|
1134
|
+
sort_by_allowed_values = ["timeCreated", "id", "displayName"]
|
1135
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1136
|
+
raise ValueError(
|
1137
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1138
|
+
)
|
1139
|
+
|
1140
|
+
query_params = {
|
1141
|
+
"compartmentId": compartment_id,
|
1142
|
+
"limit": kwargs.get("limit", missing),
|
1143
|
+
"page": kwargs.get("page", missing),
|
1144
|
+
"lifecycleState": kwargs.get("lifecycle_state", missing),
|
1145
|
+
"displayName": kwargs.get("display_name", missing),
|
1146
|
+
"id": kwargs.get("id", missing),
|
1147
|
+
"sortOrder": kwargs.get("sort_order", missing),
|
1148
|
+
"sortBy": kwargs.get("sort_by", missing)
|
1149
|
+
}
|
1150
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1151
|
+
|
1152
|
+
header_params = {
|
1153
|
+
"accept": "application/json",
|
1154
|
+
"content-type": "application/json",
|
1155
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1156
|
+
}
|
1157
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1158
|
+
|
1159
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1160
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1161
|
+
client_retry_strategy=self.retry_strategy
|
1162
|
+
)
|
1163
|
+
if retry_strategy is None:
|
1164
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1165
|
+
|
1166
|
+
if retry_strategy:
|
1167
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1168
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1169
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1170
|
+
return retry_strategy.make_retrying_call(
|
1171
|
+
self.base_client.call_api,
|
1172
|
+
resource_path=resource_path,
|
1173
|
+
method=method,
|
1174
|
+
query_params=query_params,
|
1175
|
+
header_params=header_params,
|
1176
|
+
response_type="list[ApplicationSummary]",
|
1177
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1178
|
+
operation_name=operation_name,
|
1179
|
+
api_reference_link=api_reference_link,
|
1180
|
+
required_arguments=required_arguments)
|
1181
|
+
else:
|
1182
|
+
return self.base_client.call_api(
|
1183
|
+
resource_path=resource_path,
|
1184
|
+
method=method,
|
1185
|
+
query_params=query_params,
|
1186
|
+
header_params=header_params,
|
1187
|
+
response_type="list[ApplicationSummary]",
|
1188
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1189
|
+
operation_name=operation_name,
|
1190
|
+
api_reference_link=api_reference_link,
|
1191
|
+
required_arguments=required_arguments)
|
1192
|
+
|
1193
|
+
def list_functions(self, application_id, **kwargs):
|
1194
|
+
"""
|
1195
|
+
Lists functions for an application.
|
1196
|
+
|
1197
|
+
|
1198
|
+
:param str application_id: (required)
|
1199
|
+
The `OCID`__ of the application to which this function belongs.
|
1200
|
+
|
1201
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1202
|
+
|
1203
|
+
:param int limit: (optional)
|
1204
|
+
The maximum number of items to return. 1 is the minimum, 50 is the maximum.
|
1205
|
+
|
1206
|
+
Default: 10
|
1207
|
+
|
1208
|
+
:param str page: (optional)
|
1209
|
+
The pagination token for a list query returned by a previous operation
|
1210
|
+
|
1211
|
+
:param str opc_request_id: (optional)
|
1212
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1213
|
+
particular request, please provide the request ID.
|
1214
|
+
|
1215
|
+
:param str lifecycle_state: (optional)
|
1216
|
+
A filter to return only functions that match the lifecycle state in this parameter.
|
1217
|
+
Example: `Creating`
|
1218
|
+
|
1219
|
+
Allowed values are: "CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"
|
1220
|
+
|
1221
|
+
:param str display_name: (optional)
|
1222
|
+
A filter to return only functions with display names that match the display name string. Matching is exact.
|
1223
|
+
|
1224
|
+
:param str id: (optional)
|
1225
|
+
A filter to return only functions with the specified OCID.
|
1226
|
+
|
1227
|
+
:param str sort_order: (optional)
|
1228
|
+
Specifies sort order.
|
1229
|
+
|
1230
|
+
* **ASC:** Ascending sort order.
|
1231
|
+
* **DESC:** Descending sort order.
|
1232
|
+
|
1233
|
+
Allowed values are: "ASC", "DESC"
|
1234
|
+
|
1235
|
+
:param str sort_by: (optional)
|
1236
|
+
Specifies the attribute with which to sort the rules.
|
1237
|
+
|
1238
|
+
Default: `displayName`
|
1239
|
+
|
1240
|
+
* **timeCreated:** Sorts by timeCreated.
|
1241
|
+
* **displayName:** Sorts by displayName.
|
1242
|
+
* **id:** Sorts by id.
|
1243
|
+
|
1244
|
+
Allowed values are: "timeCreated", "id", "displayName"
|
1245
|
+
|
1246
|
+
:param obj retry_strategy: (optional)
|
1247
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1248
|
+
|
1249
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1250
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1251
|
+
|
1252
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1253
|
+
|
1254
|
+
:param bool allow_control_chars: (optional)
|
1255
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1256
|
+
By default, the response will not allow control characters in strings
|
1257
|
+
|
1258
|
+
:return: A :class:`~oci.response.Response` object with data of type list of :class:`~oci.functions.models.FunctionSummary`
|
1259
|
+
:rtype: :class:`~oci.response.Response`
|
1260
|
+
|
1261
|
+
:example:
|
1262
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/list_functions.py.html>`__ to see an example of how to use list_functions API.
|
1263
|
+
"""
|
1264
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1265
|
+
required_arguments = ['applicationId']
|
1266
|
+
resource_path = "/functions"
|
1267
|
+
method = "GET"
|
1268
|
+
operation_name = "list_functions"
|
1269
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/FunctionSummary/ListFunctions"
|
1270
|
+
|
1271
|
+
# Don't accept unknown kwargs
|
1272
|
+
expected_kwargs = [
|
1273
|
+
"allow_control_chars",
|
1274
|
+
"retry_strategy",
|
1275
|
+
"limit",
|
1276
|
+
"page",
|
1277
|
+
"opc_request_id",
|
1278
|
+
"lifecycle_state",
|
1279
|
+
"display_name",
|
1280
|
+
"id",
|
1281
|
+
"sort_order",
|
1282
|
+
"sort_by"
|
1283
|
+
]
|
1284
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1285
|
+
if extra_kwargs:
|
1286
|
+
raise ValueError(
|
1287
|
+
f"list_functions got unknown kwargs: {extra_kwargs!r}")
|
1288
|
+
|
1289
|
+
if 'lifecycle_state' in kwargs:
|
1290
|
+
lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "INACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"]
|
1291
|
+
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
|
1292
|
+
raise ValueError(
|
1293
|
+
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
|
1294
|
+
)
|
1295
|
+
|
1296
|
+
if 'sort_order' in kwargs:
|
1297
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1298
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1299
|
+
raise ValueError(
|
1300
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1301
|
+
)
|
1302
|
+
|
1303
|
+
if 'sort_by' in kwargs:
|
1304
|
+
sort_by_allowed_values = ["timeCreated", "id", "displayName"]
|
1305
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1306
|
+
raise ValueError(
|
1307
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1308
|
+
)
|
1309
|
+
|
1310
|
+
query_params = {
|
1311
|
+
"applicationId": application_id,
|
1312
|
+
"limit": kwargs.get("limit", missing),
|
1313
|
+
"page": kwargs.get("page", missing),
|
1314
|
+
"lifecycleState": kwargs.get("lifecycle_state", missing),
|
1315
|
+
"displayName": kwargs.get("display_name", missing),
|
1316
|
+
"id": kwargs.get("id", missing),
|
1317
|
+
"sortOrder": kwargs.get("sort_order", missing),
|
1318
|
+
"sortBy": kwargs.get("sort_by", missing)
|
1319
|
+
}
|
1320
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1321
|
+
|
1322
|
+
header_params = {
|
1323
|
+
"accept": "application/json",
|
1324
|
+
"content-type": "application/json",
|
1325
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1326
|
+
}
|
1327
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1328
|
+
|
1329
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1330
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1331
|
+
client_retry_strategy=self.retry_strategy
|
1332
|
+
)
|
1333
|
+
if retry_strategy is None:
|
1334
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1335
|
+
|
1336
|
+
if retry_strategy:
|
1337
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1338
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1339
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1340
|
+
return retry_strategy.make_retrying_call(
|
1341
|
+
self.base_client.call_api,
|
1342
|
+
resource_path=resource_path,
|
1343
|
+
method=method,
|
1344
|
+
query_params=query_params,
|
1345
|
+
header_params=header_params,
|
1346
|
+
response_type="list[FunctionSummary]",
|
1347
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1348
|
+
operation_name=operation_name,
|
1349
|
+
api_reference_link=api_reference_link,
|
1350
|
+
required_arguments=required_arguments)
|
1351
|
+
else:
|
1352
|
+
return self.base_client.call_api(
|
1353
|
+
resource_path=resource_path,
|
1354
|
+
method=method,
|
1355
|
+
query_params=query_params,
|
1356
|
+
header_params=header_params,
|
1357
|
+
response_type="list[FunctionSummary]",
|
1358
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1359
|
+
operation_name=operation_name,
|
1360
|
+
api_reference_link=api_reference_link,
|
1361
|
+
required_arguments=required_arguments)
|
1362
|
+
|
1363
|
+
def list_pbf_listing_versions(self, pbf_listing_id, **kwargs):
|
1364
|
+
"""
|
1365
|
+
Fetches a wrapped list of all Pre-built Function(PBF) Listing versions. Returns a PbfListingVersionCollection
|
1366
|
+
containing an array of PbfListingVersionSummary response models.
|
1367
|
+
|
1368
|
+
Note that the PbfListingIdentifier must be provided as a query parameter, otherwise an exception shall
|
1369
|
+
be thrown.
|
1370
|
+
|
1371
|
+
|
1372
|
+
:param str pbf_listing_id: (required)
|
1373
|
+
unique PbfListing identifier
|
1374
|
+
|
1375
|
+
:param str pbf_listing_version_id: (optional)
|
1376
|
+
unique PbfListingVersion identifier
|
1377
|
+
|
1378
|
+
:param str name: (optional)
|
1379
|
+
Matches a PbfListingVersion based on a provided semantic version name for a PbfListingVersion.
|
1380
|
+
Each PbfListingVersion name is unique with respect to its associated PbfListing.
|
1381
|
+
|
1382
|
+
:param bool is_current_version: (optional)
|
1383
|
+
Matches the current version (the most recently added version with an Active
|
1384
|
+
lifecycleState) associated with a PbfListing.
|
1385
|
+
|
1386
|
+
:param str lifecycle_state: (optional)
|
1387
|
+
A filter to return only resources their lifecycleState matches the given lifecycleState.
|
1388
|
+
|
1389
|
+
Allowed values are: "ACTIVE", "INACTIVE", "DELETED"
|
1390
|
+
|
1391
|
+
:param int limit: (optional)
|
1392
|
+
The maximum number of items to return. 1 is the minimum, 50 is the maximum.
|
1393
|
+
|
1394
|
+
Default: 10
|
1395
|
+
|
1396
|
+
:param str page: (optional)
|
1397
|
+
The pagination token for a list query returned by a previous operation
|
1398
|
+
|
1399
|
+
:param str sort_order: (optional)
|
1400
|
+
Specifies sort order.
|
1401
|
+
|
1402
|
+
* **ASC:** Ascending sort order.
|
1403
|
+
* **DESC:** Descending sort order.
|
1404
|
+
|
1405
|
+
Allowed values are: "ASC", "DESC"
|
1406
|
+
|
1407
|
+
:param str sort_by: (optional)
|
1408
|
+
The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending.
|
1409
|
+
|
1410
|
+
Allowed values are: "timeCreated", "name"
|
1411
|
+
|
1412
|
+
:param str opc_request_id: (optional)
|
1413
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1414
|
+
particular request, please provide the request ID.
|
1415
|
+
|
1416
|
+
:param obj retry_strategy: (optional)
|
1417
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1418
|
+
|
1419
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1420
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1421
|
+
|
1422
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1423
|
+
|
1424
|
+
:param bool allow_control_chars: (optional)
|
1425
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1426
|
+
By default, the response will not allow control characters in strings
|
1427
|
+
|
1428
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.PbfListingVersionsCollection`
|
1429
|
+
:rtype: :class:`~oci.response.Response`
|
1430
|
+
|
1431
|
+
:example:
|
1432
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/list_pbf_listing_versions.py.html>`__ to see an example of how to use list_pbf_listing_versions API.
|
1433
|
+
"""
|
1434
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1435
|
+
required_arguments = ['pbfListingId']
|
1436
|
+
resource_path = "/pbfListingVersions"
|
1437
|
+
method = "GET"
|
1438
|
+
operation_name = "list_pbf_listing_versions"
|
1439
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/PbfListingVersion/ListPbfListingVersions"
|
1440
|
+
|
1441
|
+
# Don't accept unknown kwargs
|
1442
|
+
expected_kwargs = [
|
1443
|
+
"allow_control_chars",
|
1444
|
+
"retry_strategy",
|
1445
|
+
"pbf_listing_version_id",
|
1446
|
+
"name",
|
1447
|
+
"is_current_version",
|
1448
|
+
"lifecycle_state",
|
1449
|
+
"limit",
|
1450
|
+
"page",
|
1451
|
+
"sort_order",
|
1452
|
+
"sort_by",
|
1453
|
+
"opc_request_id"
|
1454
|
+
]
|
1455
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1456
|
+
if extra_kwargs:
|
1457
|
+
raise ValueError(
|
1458
|
+
f"list_pbf_listing_versions got unknown kwargs: {extra_kwargs!r}")
|
1459
|
+
|
1460
|
+
if 'lifecycle_state' in kwargs:
|
1461
|
+
lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE", "DELETED"]
|
1462
|
+
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
|
1463
|
+
raise ValueError(
|
1464
|
+
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
|
1465
|
+
)
|
1466
|
+
|
1467
|
+
if 'sort_order' in kwargs:
|
1468
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1469
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1470
|
+
raise ValueError(
|
1471
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1472
|
+
)
|
1473
|
+
|
1474
|
+
if 'sort_by' in kwargs:
|
1475
|
+
sort_by_allowed_values = ["timeCreated", "name"]
|
1476
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1477
|
+
raise ValueError(
|
1478
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1479
|
+
)
|
1480
|
+
|
1481
|
+
query_params = {
|
1482
|
+
"pbfListingId": pbf_listing_id,
|
1483
|
+
"pbfListingVersionId": kwargs.get("pbf_listing_version_id", missing),
|
1484
|
+
"name": kwargs.get("name", missing),
|
1485
|
+
"isCurrentVersion": kwargs.get("is_current_version", missing),
|
1486
|
+
"lifecycleState": kwargs.get("lifecycle_state", missing),
|
1487
|
+
"limit": kwargs.get("limit", missing),
|
1488
|
+
"page": kwargs.get("page", missing),
|
1489
|
+
"sortOrder": kwargs.get("sort_order", missing),
|
1490
|
+
"sortBy": kwargs.get("sort_by", missing)
|
1491
|
+
}
|
1492
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1493
|
+
|
1494
|
+
header_params = {
|
1495
|
+
"accept": "application/json",
|
1496
|
+
"content-type": "application/json",
|
1497
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1498
|
+
}
|
1499
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1500
|
+
|
1501
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1502
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1503
|
+
client_retry_strategy=self.retry_strategy
|
1504
|
+
)
|
1505
|
+
if retry_strategy is None:
|
1506
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1507
|
+
|
1508
|
+
if retry_strategy:
|
1509
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1510
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1511
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1512
|
+
return retry_strategy.make_retrying_call(
|
1513
|
+
self.base_client.call_api,
|
1514
|
+
resource_path=resource_path,
|
1515
|
+
method=method,
|
1516
|
+
query_params=query_params,
|
1517
|
+
header_params=header_params,
|
1518
|
+
response_type="PbfListingVersionsCollection",
|
1519
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1520
|
+
operation_name=operation_name,
|
1521
|
+
api_reference_link=api_reference_link,
|
1522
|
+
required_arguments=required_arguments)
|
1523
|
+
else:
|
1524
|
+
return self.base_client.call_api(
|
1525
|
+
resource_path=resource_path,
|
1526
|
+
method=method,
|
1527
|
+
query_params=query_params,
|
1528
|
+
header_params=header_params,
|
1529
|
+
response_type="PbfListingVersionsCollection",
|
1530
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1531
|
+
operation_name=operation_name,
|
1532
|
+
api_reference_link=api_reference_link,
|
1533
|
+
required_arguments=required_arguments)
|
1534
|
+
|
1535
|
+
def list_pbf_listings(self, **kwargs):
|
1536
|
+
"""
|
1537
|
+
Fetches a wrapped list of all Pre-built Function(PBF) Listings. Returns a PbfListingCollection containing
|
1538
|
+
an array of PbfListingSummary response models.
|
1539
|
+
|
1540
|
+
|
1541
|
+
:param str pbf_listing_id: (optional)
|
1542
|
+
unique PbfListing identifier
|
1543
|
+
|
1544
|
+
:param str name: (optional)
|
1545
|
+
A filter to return only resources that match the entire PBF name given.
|
1546
|
+
|
1547
|
+
:param str name_contains: (optional)
|
1548
|
+
A filter to return only resources that contain the supplied filter text in the PBF name given.
|
1549
|
+
|
1550
|
+
:param str name_starts_with: (optional)
|
1551
|
+
A filter to return only resources that start with the supplied filter text in the PBF name given.
|
1552
|
+
|
1553
|
+
:param list[str] trigger: (optional)
|
1554
|
+
A filter to return only resources that match the service trigger sources of a PBF.
|
1555
|
+
|
1556
|
+
:param str lifecycle_state: (optional)
|
1557
|
+
A filter to return only resources their lifecycleState matches the given lifecycleState.
|
1558
|
+
|
1559
|
+
Allowed values are: "ACTIVE", "INACTIVE", "DELETED"
|
1560
|
+
|
1561
|
+
:param int limit: (optional)
|
1562
|
+
The maximum number of items to return. 1 is the minimum, 50 is the maximum.
|
1563
|
+
|
1564
|
+
Default: 10
|
1565
|
+
|
1566
|
+
:param str page: (optional)
|
1567
|
+
The pagination token for a list query returned by a previous operation
|
1568
|
+
|
1569
|
+
:param str sort_order: (optional)
|
1570
|
+
Specifies sort order.
|
1571
|
+
|
1572
|
+
* **ASC:** Ascending sort order.
|
1573
|
+
* **DESC:** Descending sort order.
|
1574
|
+
|
1575
|
+
Allowed values are: "ASC", "DESC"
|
1576
|
+
|
1577
|
+
:param str sort_by: (optional)
|
1578
|
+
The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for name is ascending.
|
1579
|
+
|
1580
|
+
Allowed values are: "timeCreated", "name"
|
1581
|
+
|
1582
|
+
:param str opc_request_id: (optional)
|
1583
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1584
|
+
particular request, please provide the request ID.
|
1585
|
+
|
1586
|
+
:param obj retry_strategy: (optional)
|
1587
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1588
|
+
|
1589
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1590
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1591
|
+
|
1592
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1593
|
+
|
1594
|
+
:param bool allow_control_chars: (optional)
|
1595
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1596
|
+
By default, the response will not allow control characters in strings
|
1597
|
+
|
1598
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.PbfListingsCollection`
|
1599
|
+
:rtype: :class:`~oci.response.Response`
|
1600
|
+
|
1601
|
+
:example:
|
1602
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/list_pbf_listings.py.html>`__ to see an example of how to use list_pbf_listings API.
|
1603
|
+
"""
|
1604
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1605
|
+
required_arguments = []
|
1606
|
+
resource_path = "/pbfListings"
|
1607
|
+
method = "GET"
|
1608
|
+
operation_name = "list_pbf_listings"
|
1609
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/PbfListing/ListPbfListings"
|
1610
|
+
|
1611
|
+
# Don't accept unknown kwargs
|
1612
|
+
expected_kwargs = [
|
1613
|
+
"allow_control_chars",
|
1614
|
+
"retry_strategy",
|
1615
|
+
"pbf_listing_id",
|
1616
|
+
"name",
|
1617
|
+
"name_contains",
|
1618
|
+
"name_starts_with",
|
1619
|
+
"trigger",
|
1620
|
+
"lifecycle_state",
|
1621
|
+
"limit",
|
1622
|
+
"page",
|
1623
|
+
"sort_order",
|
1624
|
+
"sort_by",
|
1625
|
+
"opc_request_id"
|
1626
|
+
]
|
1627
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1628
|
+
if extra_kwargs:
|
1629
|
+
raise ValueError(
|
1630
|
+
f"list_pbf_listings got unknown kwargs: {extra_kwargs!r}")
|
1631
|
+
|
1632
|
+
if 'lifecycle_state' in kwargs:
|
1633
|
+
lifecycle_state_allowed_values = ["ACTIVE", "INACTIVE", "DELETED"]
|
1634
|
+
if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
|
1635
|
+
raise ValueError(
|
1636
|
+
f"Invalid value for `lifecycle_state`, must be one of { lifecycle_state_allowed_values }"
|
1637
|
+
)
|
1638
|
+
|
1639
|
+
if 'sort_order' in kwargs:
|
1640
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1641
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1642
|
+
raise ValueError(
|
1643
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1644
|
+
)
|
1645
|
+
|
1646
|
+
if 'sort_by' in kwargs:
|
1647
|
+
sort_by_allowed_values = ["timeCreated", "name"]
|
1648
|
+
if kwargs['sort_by'] not in sort_by_allowed_values:
|
1649
|
+
raise ValueError(
|
1650
|
+
f"Invalid value for `sort_by`, must be one of { sort_by_allowed_values }"
|
1651
|
+
)
|
1652
|
+
|
1653
|
+
query_params = {
|
1654
|
+
"pbfListingId": kwargs.get("pbf_listing_id", missing),
|
1655
|
+
"name": kwargs.get("name", missing),
|
1656
|
+
"nameContains": kwargs.get("name_contains", missing),
|
1657
|
+
"nameStartsWith": kwargs.get("name_starts_with", missing),
|
1658
|
+
"trigger": self.base_client.generate_collection_format_param(kwargs.get("trigger", missing), 'multi'),
|
1659
|
+
"lifecycleState": kwargs.get("lifecycle_state", missing),
|
1660
|
+
"limit": kwargs.get("limit", missing),
|
1661
|
+
"page": kwargs.get("page", missing),
|
1662
|
+
"sortOrder": kwargs.get("sort_order", missing),
|
1663
|
+
"sortBy": kwargs.get("sort_by", missing)
|
1664
|
+
}
|
1665
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1666
|
+
|
1667
|
+
header_params = {
|
1668
|
+
"accept": "application/json",
|
1669
|
+
"content-type": "application/json",
|
1670
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1671
|
+
}
|
1672
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1673
|
+
|
1674
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1675
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1676
|
+
client_retry_strategy=self.retry_strategy
|
1677
|
+
)
|
1678
|
+
if retry_strategy is None:
|
1679
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1680
|
+
|
1681
|
+
if retry_strategy:
|
1682
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1683
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1684
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1685
|
+
return retry_strategy.make_retrying_call(
|
1686
|
+
self.base_client.call_api,
|
1687
|
+
resource_path=resource_path,
|
1688
|
+
method=method,
|
1689
|
+
query_params=query_params,
|
1690
|
+
header_params=header_params,
|
1691
|
+
response_type="PbfListingsCollection",
|
1692
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1693
|
+
operation_name=operation_name,
|
1694
|
+
api_reference_link=api_reference_link,
|
1695
|
+
required_arguments=required_arguments)
|
1696
|
+
else:
|
1697
|
+
return self.base_client.call_api(
|
1698
|
+
resource_path=resource_path,
|
1699
|
+
method=method,
|
1700
|
+
query_params=query_params,
|
1701
|
+
header_params=header_params,
|
1702
|
+
response_type="PbfListingsCollection",
|
1703
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1704
|
+
operation_name=operation_name,
|
1705
|
+
api_reference_link=api_reference_link,
|
1706
|
+
required_arguments=required_arguments)
|
1707
|
+
|
1708
|
+
def list_triggers(self, **kwargs):
|
1709
|
+
"""
|
1710
|
+
Returns a list of Triggers.
|
1711
|
+
|
1712
|
+
|
1713
|
+
:param str name: (optional)
|
1714
|
+
A filter to return only resources that match the service trigger source of a PBF.
|
1715
|
+
|
1716
|
+
:param int limit: (optional)
|
1717
|
+
The maximum number of items to return. 1 is the minimum, 50 is the maximum.
|
1718
|
+
|
1719
|
+
Default: 10
|
1720
|
+
|
1721
|
+
:param str page: (optional)
|
1722
|
+
The pagination token for a list query returned by a previous operation
|
1723
|
+
|
1724
|
+
:param str sort_order: (optional)
|
1725
|
+
Specifies sort order.
|
1726
|
+
|
1727
|
+
* **ASC:** Ascending sort order.
|
1728
|
+
* **DESC:** Descending sort order.
|
1729
|
+
|
1730
|
+
Allowed values are: "ASC", "DESC"
|
1731
|
+
|
1732
|
+
:param str opc_request_id: (optional)
|
1733
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1734
|
+
particular request, please provide the request ID.
|
1735
|
+
|
1736
|
+
:param obj retry_strategy: (optional)
|
1737
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1738
|
+
|
1739
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1740
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1741
|
+
|
1742
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1743
|
+
|
1744
|
+
:param bool allow_control_chars: (optional)
|
1745
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1746
|
+
By default, the response will not allow control characters in strings
|
1747
|
+
|
1748
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.TriggersCollection`
|
1749
|
+
:rtype: :class:`~oci.response.Response`
|
1750
|
+
|
1751
|
+
:example:
|
1752
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/list_triggers.py.html>`__ to see an example of how to use list_triggers API.
|
1753
|
+
"""
|
1754
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1755
|
+
required_arguments = []
|
1756
|
+
resource_path = "/pbfListings/triggers"
|
1757
|
+
method = "GET"
|
1758
|
+
operation_name = "list_triggers"
|
1759
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/TriggersCollection/ListTriggers"
|
1760
|
+
|
1761
|
+
# Don't accept unknown kwargs
|
1762
|
+
expected_kwargs = [
|
1763
|
+
"allow_control_chars",
|
1764
|
+
"retry_strategy",
|
1765
|
+
"name",
|
1766
|
+
"limit",
|
1767
|
+
"page",
|
1768
|
+
"sort_order",
|
1769
|
+
"opc_request_id"
|
1770
|
+
]
|
1771
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1772
|
+
if extra_kwargs:
|
1773
|
+
raise ValueError(
|
1774
|
+
f"list_triggers got unknown kwargs: {extra_kwargs!r}")
|
1775
|
+
|
1776
|
+
if 'sort_order' in kwargs:
|
1777
|
+
sort_order_allowed_values = ["ASC", "DESC"]
|
1778
|
+
if kwargs['sort_order'] not in sort_order_allowed_values:
|
1779
|
+
raise ValueError(
|
1780
|
+
f"Invalid value for `sort_order`, must be one of { sort_order_allowed_values }"
|
1781
|
+
)
|
1782
|
+
|
1783
|
+
query_params = {
|
1784
|
+
"name": kwargs.get("name", missing),
|
1785
|
+
"limit": kwargs.get("limit", missing),
|
1786
|
+
"page": kwargs.get("page", missing),
|
1787
|
+
"sortOrder": kwargs.get("sort_order", missing)
|
1788
|
+
}
|
1789
|
+
query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None}
|
1790
|
+
|
1791
|
+
header_params = {
|
1792
|
+
"accept": "application/json",
|
1793
|
+
"content-type": "application/json",
|
1794
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1795
|
+
}
|
1796
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1797
|
+
|
1798
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1799
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1800
|
+
client_retry_strategy=self.retry_strategy
|
1801
|
+
)
|
1802
|
+
if retry_strategy is None:
|
1803
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1804
|
+
|
1805
|
+
if retry_strategy:
|
1806
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1807
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1808
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1809
|
+
return retry_strategy.make_retrying_call(
|
1810
|
+
self.base_client.call_api,
|
1811
|
+
resource_path=resource_path,
|
1812
|
+
method=method,
|
1813
|
+
query_params=query_params,
|
1814
|
+
header_params=header_params,
|
1815
|
+
response_type="TriggersCollection",
|
1816
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1817
|
+
operation_name=operation_name,
|
1818
|
+
api_reference_link=api_reference_link,
|
1819
|
+
required_arguments=required_arguments)
|
1820
|
+
else:
|
1821
|
+
return self.base_client.call_api(
|
1822
|
+
resource_path=resource_path,
|
1823
|
+
method=method,
|
1824
|
+
query_params=query_params,
|
1825
|
+
header_params=header_params,
|
1826
|
+
response_type="TriggersCollection",
|
1827
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1828
|
+
operation_name=operation_name,
|
1829
|
+
api_reference_link=api_reference_link,
|
1830
|
+
required_arguments=required_arguments)
|
1831
|
+
|
1832
|
+
def update_application(self, application_id, update_application_details, **kwargs):
|
1833
|
+
"""
|
1834
|
+
Modifies an application
|
1835
|
+
|
1836
|
+
|
1837
|
+
:param str application_id: (required)
|
1838
|
+
The `OCID`__ of this application.
|
1839
|
+
|
1840
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1841
|
+
|
1842
|
+
:param oci.functions.models.UpdateApplicationDetails update_application_details: (required)
|
1843
|
+
The new application spec to apply
|
1844
|
+
|
1845
|
+
:param str if_match: (optional)
|
1846
|
+
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1847
|
+
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1848
|
+
will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1849
|
+
|
1850
|
+
:param str opc_request_id: (optional)
|
1851
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1852
|
+
particular request, please provide the request ID.
|
1853
|
+
|
1854
|
+
:param obj retry_strategy: (optional)
|
1855
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1856
|
+
|
1857
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1858
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1859
|
+
|
1860
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1861
|
+
|
1862
|
+
:param bool allow_control_chars: (optional)
|
1863
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1864
|
+
By default, the response will not allow control characters in strings
|
1865
|
+
|
1866
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.Application`
|
1867
|
+
:rtype: :class:`~oci.response.Response`
|
1868
|
+
|
1869
|
+
:example:
|
1870
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/update_application.py.html>`__ to see an example of how to use update_application API.
|
1871
|
+
"""
|
1872
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1873
|
+
required_arguments = ['applicationId']
|
1874
|
+
resource_path = "/applications/{applicationId}"
|
1875
|
+
method = "PUT"
|
1876
|
+
operation_name = "update_application"
|
1877
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Application/UpdateApplication"
|
1878
|
+
|
1879
|
+
# Don't accept unknown kwargs
|
1880
|
+
expected_kwargs = [
|
1881
|
+
"allow_control_chars",
|
1882
|
+
"retry_strategy",
|
1883
|
+
"if_match",
|
1884
|
+
"opc_request_id"
|
1885
|
+
]
|
1886
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
1887
|
+
if extra_kwargs:
|
1888
|
+
raise ValueError(
|
1889
|
+
f"update_application got unknown kwargs: {extra_kwargs!r}")
|
1890
|
+
|
1891
|
+
path_params = {
|
1892
|
+
"applicationId": application_id
|
1893
|
+
}
|
1894
|
+
|
1895
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
1896
|
+
|
1897
|
+
for (k, v) in six.iteritems(path_params):
|
1898
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
1899
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
1900
|
+
|
1901
|
+
header_params = {
|
1902
|
+
"accept": "application/json",
|
1903
|
+
"content-type": "application/json",
|
1904
|
+
"if-match": kwargs.get("if_match", missing),
|
1905
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
1906
|
+
}
|
1907
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
1908
|
+
|
1909
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
1910
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
1911
|
+
client_retry_strategy=self.retry_strategy
|
1912
|
+
)
|
1913
|
+
if retry_strategy is None:
|
1914
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
1915
|
+
|
1916
|
+
if retry_strategy:
|
1917
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
1918
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
1919
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
1920
|
+
return retry_strategy.make_retrying_call(
|
1921
|
+
self.base_client.call_api,
|
1922
|
+
resource_path=resource_path,
|
1923
|
+
method=method,
|
1924
|
+
path_params=path_params,
|
1925
|
+
header_params=header_params,
|
1926
|
+
body=update_application_details,
|
1927
|
+
response_type="Application",
|
1928
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1929
|
+
operation_name=operation_name,
|
1930
|
+
api_reference_link=api_reference_link,
|
1931
|
+
required_arguments=required_arguments)
|
1932
|
+
else:
|
1933
|
+
return self.base_client.call_api(
|
1934
|
+
resource_path=resource_path,
|
1935
|
+
method=method,
|
1936
|
+
path_params=path_params,
|
1937
|
+
header_params=header_params,
|
1938
|
+
body=update_application_details,
|
1939
|
+
response_type="Application",
|
1940
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
1941
|
+
operation_name=operation_name,
|
1942
|
+
api_reference_link=api_reference_link,
|
1943
|
+
required_arguments=required_arguments)
|
1944
|
+
|
1945
|
+
def update_function(self, function_id, update_function_details, **kwargs):
|
1946
|
+
"""
|
1947
|
+
Modifies a function
|
1948
|
+
|
1949
|
+
|
1950
|
+
:param str function_id: (required)
|
1951
|
+
The `OCID`__ of this function.
|
1952
|
+
|
1953
|
+
__ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm
|
1954
|
+
|
1955
|
+
:param oci.functions.models.UpdateFunctionDetails update_function_details: (required)
|
1956
|
+
The new function spec to apply
|
1957
|
+
|
1958
|
+
:param str if_match: (optional)
|
1959
|
+
For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
|
1960
|
+
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
|
1961
|
+
will be updated or deleted only if the etag you provide matches the resource's current etag value.
|
1962
|
+
|
1963
|
+
:param str opc_request_id: (optional)
|
1964
|
+
The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a
|
1965
|
+
particular request, please provide the request ID.
|
1966
|
+
|
1967
|
+
:param obj retry_strategy: (optional)
|
1968
|
+
A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.
|
1969
|
+
|
1970
|
+
This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation uses :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` as default if no retry strategy is provided.
|
1971
|
+
The specifics of the default retry strategy are described `here <https://docs.oracle.com/en-us/iaas/tools/python/latest/sdk_behaviors/retries.html>`__.
|
1972
|
+
|
1973
|
+
To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`.
|
1974
|
+
|
1975
|
+
:param bool allow_control_chars: (optional)
|
1976
|
+
allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object.
|
1977
|
+
By default, the response will not allow control characters in strings
|
1978
|
+
|
1979
|
+
:return: A :class:`~oci.response.Response` object with data of type :class:`~oci.functions.models.Function`
|
1980
|
+
:rtype: :class:`~oci.response.Response`
|
1981
|
+
|
1982
|
+
:example:
|
1983
|
+
Click `here <https://docs.cloud.oracle.com/en-us/iaas/tools/python-sdk-examples/latest/functions/update_function.py.html>`__ to see an example of how to use update_function API.
|
1984
|
+
"""
|
1985
|
+
# Required path and query arguments. These are in camelCase to replace values in service endpoints.
|
1986
|
+
required_arguments = ['functionId']
|
1987
|
+
resource_path = "/functions/{functionId}"
|
1988
|
+
method = "PUT"
|
1989
|
+
operation_name = "update_function"
|
1990
|
+
api_reference_link = "https://docs.oracle.com/iaas/api/#/en/functions/20181201/Function/UpdateFunction"
|
1991
|
+
|
1992
|
+
# Don't accept unknown kwargs
|
1993
|
+
expected_kwargs = [
|
1994
|
+
"allow_control_chars",
|
1995
|
+
"retry_strategy",
|
1996
|
+
"if_match",
|
1997
|
+
"opc_request_id"
|
1998
|
+
]
|
1999
|
+
extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]
|
2000
|
+
if extra_kwargs:
|
2001
|
+
raise ValueError(
|
2002
|
+
f"update_function got unknown kwargs: {extra_kwargs!r}")
|
2003
|
+
|
2004
|
+
path_params = {
|
2005
|
+
"functionId": function_id
|
2006
|
+
}
|
2007
|
+
|
2008
|
+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
|
2009
|
+
|
2010
|
+
for (k, v) in six.iteritems(path_params):
|
2011
|
+
if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
|
2012
|
+
raise ValueError(f'Parameter {k} cannot be None, whitespace or empty string')
|
2013
|
+
|
2014
|
+
header_params = {
|
2015
|
+
"accept": "application/json",
|
2016
|
+
"content-type": "application/json",
|
2017
|
+
"if-match": kwargs.get("if_match", missing),
|
2018
|
+
"opc-request-id": kwargs.get("opc_request_id", missing)
|
2019
|
+
}
|
2020
|
+
header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None}
|
2021
|
+
|
2022
|
+
retry_strategy = self.base_client.get_preferred_retry_strategy(
|
2023
|
+
operation_retry_strategy=kwargs.get('retry_strategy'),
|
2024
|
+
client_retry_strategy=self.retry_strategy
|
2025
|
+
)
|
2026
|
+
if retry_strategy is None:
|
2027
|
+
retry_strategy = retry.DEFAULT_RETRY_STRATEGY
|
2028
|
+
|
2029
|
+
if retry_strategy:
|
2030
|
+
if not isinstance(retry_strategy, retry.NoneRetryStrategy):
|
2031
|
+
self.base_client.add_opc_client_retries_header(header_params)
|
2032
|
+
retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback)
|
2033
|
+
return retry_strategy.make_retrying_call(
|
2034
|
+
self.base_client.call_api,
|
2035
|
+
resource_path=resource_path,
|
2036
|
+
method=method,
|
2037
|
+
path_params=path_params,
|
2038
|
+
header_params=header_params,
|
2039
|
+
body=update_function_details,
|
2040
|
+
response_type="Function",
|
2041
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
2042
|
+
operation_name=operation_name,
|
2043
|
+
api_reference_link=api_reference_link,
|
2044
|
+
required_arguments=required_arguments)
|
2045
|
+
else:
|
2046
|
+
return self.base_client.call_api(
|
2047
|
+
resource_path=resource_path,
|
2048
|
+
method=method,
|
2049
|
+
path_params=path_params,
|
2050
|
+
header_params=header_params,
|
2051
|
+
body=update_function_details,
|
2052
|
+
response_type="Function",
|
2053
|
+
allow_control_chars=kwargs.get('allow_control_chars'),
|
2054
|
+
operation_name=operation_name,
|
2055
|
+
api_reference_link=api_reference_link,
|
2056
|
+
required_arguments=required_arguments)
|