FunctionsManagementClient

class oci.functions.FunctionsManagementClient(config, **kwargs)

API for the Functions service.

Methods

__init__(config, **kwargs) Creates a new service client
change_application_compartment(…) Moves an application into a different compartment within the same tenancy.
create_application(…) Creates a new application.
create_function(create_function_details, …) Creates a new function.
delete_application(application_id, **kwargs) Deletes an application.
delete_function(function_id, **kwargs) Deletes a function.
get_application(application_id, **kwargs) Retrieves an application.
get_function(function_id, **kwargs) Retrieves a function.
list_applications(compartment_id, **kwargs) Lists applications for a compartment.
list_functions(application_id, **kwargs) Lists functions for an application.
update_application(application_id, …) Modifies an application
update_function(function_id, …) Modifies a function
__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) – Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) – (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is 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 need to specify a service endpoint.
  • timeout (float or tuple(float, float)) – (optional) 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 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 a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) –

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) –

    (optional) 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. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • allow_control_chars – (optional) 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 allow control characters to be in the response object.
change_application_compartment(application_id, change_application_compartment_details, **kwargs)

Moves an application into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources Between Compartments.

Parameters:
  • application_id (str) –

    (required) The OCID of this application.

  • change_application_compartment_details (oci.functions.models.ChangeApplicationCompartmentDetails) – (required) Properties to change the compartment of an application.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_application_compartment API.

create_application(create_application_details, **kwargs)

Creates a new application.

Parameters:
  • create_application_details (oci.functions.models.CreateApplicationDetails) – (required) Specification of the application to create
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Application

Return type:

Response

Example:

Click here to see an example of how to use create_application API.

create_function(create_function_details, **kwargs)

Creates a new function.

Parameters:
  • create_function_details (oci.functions.models.CreateFunctionDetails) – (required) Specification of the function to create
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Function

Return type:

Response

Example:

Click here to see an example of how to use create_function API.

delete_application(application_id, **kwargs)

Deletes an application.

Parameters:
  • application_id (str) –

    (required) The OCID of this application.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_application API.

delete_function(function_id, **kwargs)

Deletes a function.

Parameters:
  • function_id (str) –

    (required) The OCID of this function.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_function API.

get_application(application_id, **kwargs)

Retrieves an application.

Parameters:
  • application_id (str) –

    (required) The OCID of this application.

  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Application

Return type:

Response

Example:

Click here to see an example of how to use get_application API.

get_function(function_id, **kwargs)

Retrieves a function.

Parameters:
  • function_id (str) –

    (required) The OCID of this function.

  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Function

Return type:

Response

Example:

Click here to see an example of how to use get_function API.

list_applications(compartment_id, **kwargs)

Lists applications for a compartment.

Parameters:
  • compartment_id (str) –

    (required) The OCID of the compartment to which this resource belongs.

  • limit (int) –

    (optional) The maximum number of items to return. 1 is the minimum, 50 is the maximum.

    Default: 10

  • page (str) – (optional) The pagination token for a list query returned by a previous operation
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • lifecycle_state (str) –

    (optional) A filter to return only applications that match the lifecycle state in this parameter. Example: Creating

    Allowed values are: “CREATING”, “ACTIVE”, “INACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “FAILED”

  • display_name (str) – (optional) A filter to return only applications with display names that match the display name string. Matching is exact.
  • id (str) – (optional) A filter to return only applications with the specified OCID.
  • sort_order (str) –

    (optional) Specifies sort order.

    • ASC: Ascending sort order.
    • DESC: Descending sort order.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the attribute with which to sort the rules.

    Default: displayName

    • timeCreated: Sorts by timeCreated.
    • displayName: Sorts by displayName.
    • id: Sorts by id.

    Allowed values are: “timeCreated”, “id”, “displayName”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of ApplicationSummary

Return type:

Response

Example:

Click here to see an example of how to use list_applications API.

list_functions(application_id, **kwargs)

Lists functions for an application.

Parameters:
  • application_id (str) –

    (required) The OCID of the application to which this function belongs.

  • limit (int) –

    (optional) The maximum number of items to return. 1 is the minimum, 50 is the maximum.

    Default: 10

  • page (str) – (optional) The pagination token for a list query returned by a previous operation
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • lifecycle_state (str) –

    (optional) A filter to return only functions that match the lifecycle state in this parameter. Example: Creating

    Allowed values are: “CREATING”, “ACTIVE”, “INACTIVE”, “UPDATING”, “DELETING”, “DELETED”, “FAILED”

  • display_name (str) – (optional) A filter to return only functions with display names that match the display name string. Matching is exact.
  • id (str) – (optional) A filter to return only functions with the specified OCID.
  • sort_order (str) –

    (optional) Specifies sort order.

    • ASC: Ascending sort order.
    • DESC: Descending sort order.

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the attribute with which to sort the rules.

    Default: displayName

    • timeCreated: Sorts by timeCreated.
    • displayName: Sorts by displayName.
    • id: Sorts by id.

    Allowed values are: “timeCreated”, “id”, “displayName”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of FunctionSummary

Return type:

Response

Example:

Click here to see an example of how to use list_functions API.

update_application(application_id, update_application_details, **kwargs)

Modifies an application

Parameters:
  • application_id (str) –

    (required) The OCID of this application.

  • update_application_details (oci.functions.models.UpdateApplicationDetails) – (required) The new application spec to apply
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Application

Return type:

Response

Example:

Click here to see an example of how to use update_application API.

update_function(function_id, update_function_details, **kwargs)

Modifies a function

Parameters:
  • function_id (str) –

    (required) The OCID of this function.

  • update_function_details (oci.functions.models.UpdateFunctionDetails) – (required) The new function spec to apply
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Function

Return type:

Response

Example:

Click here to see an example of how to use update_function API.