# F5-SDK

**URL:** <https://community.f5.com/t/f5-sdk/72886>\
**Category:** Technical Forums\
**Tags:** application-delivery\
**Created:** [August 13, 2023, 9:16pm UTC](https://community.f5.com/t/f5-sdk/72886 "2023-08-13T21:16:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathew](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Mathew](https://community.f5.com/u/Mathew)\
**Post date:** [August 13, 2023, 9:16pm UTC](https://community.f5.com/t/f5-sdk/72886/1 "2023-08-13T21:16:16Z")

</div>

def createmonitor(Node\_Val​😞&nbsp; &nbsp; &nbsp;pool\_monitor = Node\_Val[5]&nbsp; &nbsp; &nbsp;monitor= mgmt.tm.ltm.monitor&nbsp; &nbsp; &nbsp;monitor.create (partition=‘Common’,name = pool\_monitor + “\_https\_monitor”,)&nbsp;I am trying to create a monitor using F5 SDK and its getting error&nbsp;raise InvalidResource(error\_message)  
f5.sdk\_exception.InvalidResource: Only Resources support ‘create’.&nbsp;Can anyone share the link to understand the issue or please help to understand this.

---

<div class="post-metadata">

**Author:** ![Nikoolayy1](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nikoolayy1/32/3589_2.png) [@Nikoolayy1](https://community.f5.com/u/Nikoolayy1)\
**Post date:** [August 14, 2023, 10:23am UTC](https://community.f5.com/t/f5-sdk/72886/2 "2023-08-14T10:23:09Z")

</div>

Never used the F5 SDK myself (I tried just once as a test and had issues) but maybe try Ansible as it is stable from experience or terraform.

[https://docs.ansible.com/ansible/latest/collections/f5networks/f5\_modules/bigip\_monitor\_http\_module.html](https://docs.ansible.com/ansible/latest/collections/f5networks/f5_modules/bigip_monitor_http_module.html)

> **[bigip\_monitor\_https – Manages F5 BIG-IP LTM HTTPS monitors](https://clouddocs.f5.com/products/orchestration/ansible/devel/modules/bigip_monitor_https_module.html#bigip-monitor-https-module-3)**
>
> Version notice:

> **[Terraform Registry](https://registry.terraform.io/providers/F5Networks/bigip/latest/docs/resources/bigip_ltm_monitor.html)**

---

<div class="post-metadata">

**Author:** ![JRahm](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/jrahm/32/3327_2.png) [@JRahm](https://community.f5.com/u/JRahm)\
**Post date:** [August 14, 2023, 6:34pm UTC](https://community.f5.com/t/f5-sdk/72886/3 "2023-08-14T18:34:09Z")

</div>

Hi @Mathew , if wanting to stick with one-off simple imperative scripts…I’d use the [bigrest library](https://bigrest.readthedocs.io/) over the f5-sdk, which is no longer under development or community support. But to answer the question for others, assuming this is for an https monitor, it would look something like this:

```tcl
resource = mgmt_root.tm.ltm.monitor.https_s.https.create(
        name=temp_name, partition='Common')

```

where mgmt\_root is whatever you instantiated your session variable as.

If you wanted to do this in bigrest, it’d be similar to what you posted:

```tcl
from bigrest.bigip import BIGIP
br = BIGIP('ltm3.test.local', 'admin', 'admin', session_verify=False)

data = {'name': 'monitor_object', ...additional required/optional key/value pairs}
resource = br.create('/mgmt/tm/ltm/monitor/https', data)

```

I just moved and don’t have my lab up yet, so this is untested on both counts, but should be very close to what you want. Ping back if you need additional assistance.

If you do want to do a more mature/robust approach, what&nbsp; @Nikoolayy1 &nbsp;is suggesting is a great path forward.

---

<div class="post-metadata">

**Author:** ![Mathew](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Mathew](https://community.f5.com/u/Mathew)\
**Post date:** [August 14, 2023, 8:44pm UTC](https://community.f5.com/t/f5-sdk/72886/4 "2023-08-14T20:44:13Z")

</div>

Thanks Jason

---

<div class="post-metadata">

**Author:** ![Nikoolayy1](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nikoolayy1/32/3589_2.png) [@Nikoolayy1](https://community.f5.com/u/Nikoolayy1)\
**Post date:** [August 15, 2023, 4:38am UTC](https://community.f5.com/t/f5-sdk/72886/5 "2023-08-15T04:38:43Z")

</div>

In the future you can review AS3 as to create a full configuration with one REST API request [https://community.f5.com/t5/codeshare/code-comparison-between-deploying-as3-or-fast-api-declarations/ta-p/309613](https://community.f5.com/topic/309613)
