FunctionsManagementClient

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

API for the Functions service.

__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 is that the client never times out. 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.

change_application_compartment(application_id, change_application_compartment_details, **kwargs)

Moves an application into a different compartment. When provided, If-Match is checked against ETag values of the resource. 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 (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

create_application(create_application_details, **kwargs)

Creates a new application Creates a new application.

Parameters:
  • create_application_details (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Application

Return type:

Response

create_function(create_function_details, **kwargs)

Creates a new function Creates a new function.

Parameters:
  • create_function_details (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Function

Return type:

Response

delete_application(application_id, **kwargs)

Deletes an application 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

delete_function(function_id, **kwargs)

Deletes a function 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type None

Return type:

Response

get_application(application_id, **kwargs)

Retrieves an application 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Application

Return type:

Response

get_function(function_id, **kwargs)

Retrieves a function 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Function

Return type:

Response

list_applications(compartment_id, **kwargs)

Lists applications for a compartment 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 specfied 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type list of ApplicationSummary

Return type:

Response

list_functions(application_id, **kwargs)

Lists functions for an application 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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type list of FunctionSummary

Return type:

Response

update_application(application_id, update_application_details, **kwargs)

Modifies an application Modifies an application

Parameters:
  • application_id (str) --

    (required) The OCID of this application.

  • update_application_details (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Application

Return type:

Response

update_function(function_id, update_function_details, **kwargs)

Modifies a function Modifies a function

Parameters:
  • function_id (str) --

    (required) The OCID of this function.

  • update_function_details (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. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

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

Returns:

A Response object with data of type Function

Return type:

Response