sdk.lusid.api.legacy_compliance_api.LegacyComplianceApi

class LegacyComplianceApi(api_client=None)[source]

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech

Do not edit the class manually.

Methods

delete_legacy_compliance_rule

[EXPERIMENTAL] DeleteLegacyComplianceRule: Deletes a compliance rule.

delete_legacy_compliance_rule_with_http_info

[EXPERIMENTAL] DeleteLegacyComplianceRule: Deletes a compliance rule.

get_legacy_breached_orders_info

[EXPERIMENTAL] GetLegacyBreachedOrdersInfo: Get the Ids of Breached orders in a given compliance run and the corresponding list of rules that could have caused it.

get_legacy_breached_orders_info_with_http_info

[EXPERIMENTAL] GetLegacyBreachedOrdersInfo: Get the Ids of Breached orders in a given compliance run and the corresponding list of rules that could have caused it.

get_legacy_compliance_rule

[EXPERIMENTAL] GetLegacyComplianceRule: Retrieve the definition of single compliance rule.

get_legacy_compliance_rule_with_http_info

[EXPERIMENTAL] GetLegacyComplianceRule: Retrieve the definition of single compliance rule.

get_legacy_compliance_run_results

[EXPERIMENTAL] GetLegacyComplianceRunResults: Get the details of a single compliance run.

get_legacy_compliance_run_results_with_http_info

[EXPERIMENTAL] GetLegacyComplianceRunResults: Get the details of a single compliance run.

list_legacy_compliance_rules

[EXPERIMENTAL] ListLegacyComplianceRules: List compliance rules, with optional filtering.

list_legacy_compliance_rules_with_http_info

[EXPERIMENTAL] ListLegacyComplianceRules: List compliance rules, with optional filtering.

list_legacy_compliance_run_info

[EXPERIMENTAL] ListLegacyComplianceRunInfo: List historical compliance run ids.

list_legacy_compliance_run_info_with_http_info

[EXPERIMENTAL] ListLegacyComplianceRunInfo: List historical compliance run ids.

run_legacy_compliance

[EXPERIMENTAL] RunLegacyCompliance: Kick off the compliance check process # noqa: E501

run_legacy_compliance_with_http_info

[EXPERIMENTAL] RunLegacyCompliance: Kick off the compliance check process # noqa: E501

upsert_legacy_compliance_rules

[EXPERIMENTAL] UpsertLegacyComplianceRules: Upsert compliance rules.

upsert_legacy_compliance_rules_with_http_info

[EXPERIMENTAL] UpsertLegacyComplianceRules: Upsert compliance rules.

delete_legacy_compliance_rule(scope, code, async_req=None, **kwargs)[source]

[EXPERIMENTAL] DeleteLegacyComplianceRule: Deletes a compliance rule. # noqa: E501

Deletes the rule for all effective time. The rule will remain viewable at previous as at times, and as part of the results of compliance runs, but it will no longer be considered in new compliance runs. This cannot be undone. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_legacy_compliance_rule(scope, code, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The compliance rule scope. (required)

  • code (str) – The compliance rule code. (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

DeletedEntityResponse

delete_legacy_compliance_rule_with_http_info(scope, code, **kwargs)[source]

[EXPERIMENTAL] DeleteLegacyComplianceRule: Deletes a compliance rule. # noqa: E501

Deletes the rule for all effective time. The rule will remain viewable at previous as at times, and as part of the results of compliance runs, but it will no longer be considered in new compliance runs. This cannot be undone. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_legacy_compliance_rule_with_http_info(scope, code, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The compliance rule scope. (required)

  • code (str) – The compliance rule code. (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict))

get_legacy_breached_orders_info(run_id, order_scope=None, order_code=None, limit=None, async_req=None, **kwargs)[source]

[EXPERIMENTAL] GetLegacyBreachedOrdersInfo: Get the Ids of Breached orders in a given compliance run and the corresponding list of rules that could have caused it. # noqa: E501

Use this endpoint to get a list or breached orders and the set of rules that may have caused the breach. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_legacy_breached_orders_info(run_id, order_scope, order_code, limit, async_req=True)
>>> result = thread.get()
Parameters:
  • run_id (str) – The RunId that the results should be checked for (required)

  • order_scope (str) – Optional. Find rules related to a specific order by providing an Order Scope/Code combination

  • order_code (str) – Optional. Find rules related to a specific order by providing an Order Scope/Code combination

  • limit (int) – When paginating, limit the number of returned results to this many.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ResourceListOfComplianceBreachedOrderInfo

get_legacy_breached_orders_info_with_http_info(run_id, order_scope=None, order_code=None, limit=None, **kwargs)[source]

[EXPERIMENTAL] GetLegacyBreachedOrdersInfo: Get the Ids of Breached orders in a given compliance run and the corresponding list of rules that could have caused it. # noqa: E501

Use this endpoint to get a list or breached orders and the set of rules that may have caused the breach. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_legacy_breached_orders_info_with_http_info(run_id, order_scope, order_code, limit, async_req=True)
>>> result = thread.get()
Parameters:
  • run_id (str) – The RunId that the results should be checked for (required)

  • order_scope (str) – Optional. Find rules related to a specific order by providing an Order Scope/Code combination

  • order_code (str) – Optional. Find rules related to a specific order by providing an Order Scope/Code combination

  • limit (int) – When paginating, limit the number of returned results to this many.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ResourceListOfComplianceBreachedOrderInfo, status_code(int), headers(HTTPHeaderDict))

get_legacy_compliance_rule(scope, code, effective_at=None, as_at=None, async_req=None, **kwargs)[source]

[EXPERIMENTAL] GetLegacyComplianceRule: Retrieve the definition of single compliance rule. # noqa: E501

Retrieves the compliance rule definition at the given effective and as at times. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_legacy_compliance_rule(scope, code, effective_at, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The compliance rule scope. (required)

  • code (str) – The compliance rule code. (required)

  • effective_at (str) – The effective datetime or cut label at which to retrieve the rule definition. Defaults to the current LUSID system datetime if not specified.

  • as_at (datetime) – The asAt datetime at which to retrieve the rule definition. Defaults to returning the latest version if not specified.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ComplianceRule

get_legacy_compliance_rule_with_http_info(scope, code, effective_at=None, as_at=None, **kwargs)[source]

[EXPERIMENTAL] GetLegacyComplianceRule: Retrieve the definition of single compliance rule. # noqa: E501

Retrieves the compliance rule definition at the given effective and as at times. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_legacy_compliance_rule_with_http_info(scope, code, effective_at, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The compliance rule scope. (required)

  • code (str) – The compliance rule code. (required)

  • effective_at (str) – The effective datetime or cut label at which to retrieve the rule definition. Defaults to the current LUSID system datetime if not specified.

  • as_at (datetime) – The asAt datetime at which to retrieve the rule definition. Defaults to returning the latest version if not specified.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ComplianceRule, status_code(int), headers(HTTPHeaderDict))

get_legacy_compliance_run_results(run_id, page=None, limit=None, filter=None, async_req=None, **kwargs)[source]

[EXPERIMENTAL] GetLegacyComplianceRunResults: Get the details of a single compliance run. # noqa: E501

Use this endpoint to fetch the detail associated with a specific compliance run, including a breakdown of the passing state of each rule, portfolio combination. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_legacy_compliance_run_results(run_id, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • run_id (str) – The unique identifier of the compliance run requested. (required)

  • page (str) – The pagination token to use to continue listing compliance rule results from a previous call to list compliance rule result. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ResourceListOfComplianceRuleResult

get_legacy_compliance_run_results_with_http_info(run_id, page=None, limit=None, filter=None, **kwargs)[source]

[EXPERIMENTAL] GetLegacyComplianceRunResults: Get the details of a single compliance run. # noqa: E501

Use this endpoint to fetch the detail associated with a specific compliance run, including a breakdown of the passing state of each rule, portfolio combination. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.get_legacy_compliance_run_results_with_http_info(run_id, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • run_id (str) – The unique identifier of the compliance run requested. (required)

  • page (str) – The pagination token to use to continue listing compliance rule results from a previous call to list compliance rule result. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ResourceListOfComplianceRuleResult, status_code(int), headers(HTTPHeaderDict))

list_legacy_compliance_rules(effective_at=None, as_at=None, page=None, limit=None, filter=None, async_req=None, **kwargs)[source]

[EXPERIMENTAL] ListLegacyComplianceRules: List compliance rules, with optional filtering. # noqa: E501

For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_legacy_compliance_rules(effective_at, as_at, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • effective_at (str) – The effective datetime or cut label at which to retrieve the rule definitions. Defaults to the current LUSID system datetime if not specified.

  • as_at (datetime) – The asAt datetime at which to retrieve the rule definitions. Defaults to returning the latest version if not specified.

  • page (str) – The pagination token to use to continue listing entities; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the results to this number. Defaults to 100 if not specified.

  • filter (str) – Expression to filter the results.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ResourceListOfComplianceRule

list_legacy_compliance_rules_with_http_info(effective_at=None, as_at=None, page=None, limit=None, filter=None, **kwargs)[source]

[EXPERIMENTAL] ListLegacyComplianceRules: List compliance rules, with optional filtering. # noqa: E501

For more information about filtering results, see https://support.lusid.com/knowledgebase/article/KA-01914. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_legacy_compliance_rules_with_http_info(effective_at, as_at, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • effective_at (str) – The effective datetime or cut label at which to retrieve the rule definitions. Defaults to the current LUSID system datetime if not specified.

  • as_at (datetime) – The asAt datetime at which to retrieve the rule definitions. Defaults to returning the latest version if not specified.

  • page (str) – The pagination token to use to continue listing entities; this value is returned from the previous call. If a pagination token is provided, the filter, effectiveAt and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the results to this number. Defaults to 100 if not specified.

  • filter (str) – Expression to filter the results.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ResourceListOfComplianceRule, status_code(int), headers(HTTPHeaderDict))

list_legacy_compliance_run_info(as_at=None, page=None, limit=None, filter=None, async_req=None, **kwargs)[source]

[EXPERIMENTAL] ListLegacyComplianceRunInfo: List historical compliance run ids. # noqa: E501

Use this endpoint to fetch a list of all historical compliance runs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_legacy_compliance_run_info(as_at, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – Optional. The time at which to get results from. Default : latest

  • page (str) – The pagination token to use to continue listing compliance runs from a previous call to list compliance runs. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ResourceListOfComplianceRunInfo

list_legacy_compliance_run_info_with_http_info(as_at=None, page=None, limit=None, filter=None, **kwargs)[source]

[EXPERIMENTAL] ListLegacyComplianceRunInfo: List historical compliance run ids. # noqa: E501

Use this endpoint to fetch a list of all historical compliance runs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_legacy_compliance_run_info_with_http_info(as_at, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – Optional. The time at which to get results from. Default : latest

  • page (str) – The pagination token to use to continue listing compliance runs from a previous call to list compliance runs. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, and asAt fields must not have changed since the original request.

  • limit (int) – When paginating, limit the number of returned results to this many.

  • filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ResourceListOfComplianceRunInfo, status_code(int), headers(HTTPHeaderDict))

run_legacy_compliance(is_pre_trade, recipe_id_scope, recipe_id_code=None, by_taxlots=None, async_req=None, **kwargs)[source]

[EXPERIMENTAL] RunLegacyCompliance: Kick off the compliance check process # noqa: E501

Use this endpoint to fetch the start a compliance run, based on a pre-set mapping file. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.run_legacy_compliance(is_pre_trade, recipe_id_scope, recipe_id_code, by_taxlots, async_req=True)
>>> result = thread.get()
Parameters:
  • is_pre_trade (bool) – Required: Boolean flag indicating if a run should be PreTrade (Including orders). For post-trade only, set to false (required)

  • recipe_id_scope (str) – Required: the scope of the recipe to be used (required)

  • recipe_id_code (str) – Optional: The code of the recipe to be used. If left blank, the default recipe will be used.

  • by_taxlots (bool) – Optional.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ComplianceRunInfo

run_legacy_compliance_with_http_info(is_pre_trade, recipe_id_scope, recipe_id_code=None, by_taxlots=None, **kwargs)[source]

[EXPERIMENTAL] RunLegacyCompliance: Kick off the compliance check process # noqa: E501

Use this endpoint to fetch the start a compliance run, based on a pre-set mapping file. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.run_legacy_compliance_with_http_info(is_pre_trade, recipe_id_scope, recipe_id_code, by_taxlots, async_req=True)
>>> result = thread.get()
Parameters:
  • is_pre_trade (bool) – Required: Boolean flag indicating if a run should be PreTrade (Including orders). For post-trade only, set to false (required)

  • recipe_id_scope (str) – Required: the scope of the recipe to be used (required)

  • recipe_id_code (str) – Optional: The code of the recipe to be used. If left blank, the default recipe will be used.

  • by_taxlots (bool) – Optional.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ComplianceRunInfo, status_code(int), headers(HTTPHeaderDict))

upsert_legacy_compliance_rules(request_body, effective_at=None, async_req=None, **kwargs)[source]

[EXPERIMENTAL] UpsertLegacyComplianceRules: Upsert compliance rules. # noqa: E501

To upsert a new rule, the code field must be left empty, a code will then be assigned and returned as part of the response. To update an existing rule, include the rule code. It is possible to both create and update compliance rules in the same request. The upsert is transactional - either all create/update operations will succeed or none of them will. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.upsert_legacy_compliance_rules(request_body, effective_at, async_req=True)
>>> result = thread.get()
Parameters:
  • request_body (Dict[str, ComplianceRuleUpsertRequest]) – A dictionary of upsert request identifiers to rule upsert requests. The request identifiers are valid for the request only and can be used to link the upserted compliance rule to the code of a created compliance rule. (required)

  • effective_at (str) – The effective datetime or cut label at which the rule will take effect. Defaults to the current LUSID system datetime if not specified. In the case of an update, the changes will take place from this effective time until the next effective time that the rule as been upserted at. For example, consider a rule that already exists, and has previously had an update applied so that the definition will change on the first day of the coming month. An upsert effective from the current day will only change the definition until the first day of the coming month. An additional upsert at the same time (first day of the month) is required if the newly-updated definition is to supersede the future definition.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ComplianceRuleUpsertResponse

upsert_legacy_compliance_rules_with_http_info(request_body, effective_at=None, **kwargs)[source]

[EXPERIMENTAL] UpsertLegacyComplianceRules: Upsert compliance rules. # noqa: E501

To upsert a new rule, the code field must be left empty, a code will then be assigned and returned as part of the response. To update an existing rule, include the rule code. It is possible to both create and update compliance rules in the same request. The upsert is transactional - either all create/update operations will succeed or none of them will. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.upsert_legacy_compliance_rules_with_http_info(request_body, effective_at, async_req=True)
>>> result = thread.get()
Parameters:
  • request_body (Dict[str, ComplianceRuleUpsertRequest]) – A dictionary of upsert request identifiers to rule upsert requests. The request identifiers are valid for the request only and can be used to link the upserted compliance rule to the code of a created compliance rule. (required)

  • effective_at (str) – The effective datetime or cut label at which the rule will take effect. Defaults to the current LUSID system datetime if not specified. In the case of an update, the changes will take place from this effective time until the next effective time that the rule as been upserted at. For example, consider a rule that already exists, and has previously had an update applied so that the definition will change on the first day of the coming month. An upsert effective from the current day will only change the definition until the first day of the coming month. An additional upsert at the same time (first day of the month) is required if the newly-updated definition is to supersede the future definition.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(ComplianceRuleUpsertResponse, status_code(int), headers(HTTPHeaderDict))