Coverage for abb_rws_client_python_rw6/rws/cfg.py: 100%

47 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-13 22:17 +0000

1# This file is AUTO-GENERATED by utils/generator/main.py 

2# DO NOT EDIT MANUALLY — run the generator to regenerate. 

3# Generator author: Clement RACINET 

4""" 

5RWS module: RobotWare Services → CFG Service → Get CFG resources 

6 

71:1 mirror of the ABB RobotWare 6 REST API. 

8Each function maps to exactly one HTTP endpoint. 

9No composed logic — see highlevel/ for wrappers. 

10""" 

11 

12from __future__ import annotations 

13 

14import httpx 

15 

16from abb_rws_client_python_rw6.core.client import RWSClient 

17 

18 

19async def get_cfg_resources(client: RWSClient) -> httpx.Response: 

20 """ 

21 Get CFG resources. 

22 

23 Route: ``GET /rw/cfg`` 

24 ABB constraints: Not supported in bootserver mode 

25 

26 Args: 

27 client: Open RWSClient instance. 

28 

29 Returns: 

30 Raw HTTP response. Expected success: HTTP 200. 

31 

32 Raises: 

33 RWSAuthenticationError: On HTTP 401. 

34 RWSNotFoundError: On HTTP 404. 

35 RWSHTTPError: On any other HTTP >= 400. 

36 

37 Example: 

38 ```python 

39 >>> await get_cfg_resources(client) 

40 <Response [200]> 

41 ``` 

42 """ 

43 return await client.get("/rw/cfg") 

44 

45 

46async def get_cfg_actions( 

47 client: RWSClient, 

48 action: str | None = None, 

49) -> httpx.Response: 

50 """ 

51 Get CFG actions. 

52 

53 Route: ``GET /rw/cfg`` 

54 ABB constraints: Not supported in bootserver mode 

55 

56 Args: 

57 client: Open RWSClient instance. 

58 action: Query parameter. Optional. 

59 

60 Returns: 

61 Raw HTTP response. Expected success: HTTP 200. 

62 

63 Raises: 

64 RWSAuthenticationError: On HTTP 401. 

65 RWSNotFoundError: On HTTP 404. 

66 RWSHTTPError: On any other HTTP >= 400. 

67 # ABB codes: BAD_REQUEST(400) 

68 

69 Example: 

70 ```python 

71 >>> await get_cfg_actions(client) 

72 <Response [200]> 

73 ``` 

74 """ 

75 return await client.get( 

76 "/rw/cfg", 

77 params={k: v for k, v in {"action": action}.items() if v is not None}, 

78 ) 

79 

80 

81async def validate_cfg_file( 

82 client: RWSClient, 

83 action: str | None = None, 

84) -> httpx.Response: 

85 """ 

86 Validate CFG file. 

87 

88 Route: ``POST /rw/cfg`` 

89 ABB constraints: Not supported in bootserver mode 

90 

91 Args: 

92 client: Open RWSClient instance. 

93 action: Query parameter. Optional. 

94 

95 Returns: 

96 Raw HTTP response. Expected success: HTTP 200. 

97 

98 Raises: 

99 RWSAuthenticationError: On HTTP 401. 

100 RWSNotFoundError: On HTTP 404. 

101 RWSHTTPError: On any other HTTP >= 400. 

102 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415) 

103 

104 Example: 

105 ```python 

106 >>> await validate_cfg_file(client) 

107 <Response [200]> 

108 ``` 

109 """ 

110 return await client.post( 

111 "/rw/cfg", 

112 params={k: v for k, v in {"action": action}.items() if v is not None}, 

113 data={}, 

114 ) 

115 

116 

117async def load_cfg_file( 

118 client: RWSClient, 

119 action: str | None = None, 

120) -> httpx.Response: 

121 """ 

122 Load CFG file. 

123 

124 Route: ``POST /rw/cfg`` 

125 ABB constraints: Not supported in bootserver mode 

126 

127 Args: 

128 client: Open RWSClient instance. 

129 action: Query parameter. Optional. 

130 

131 Returns: 

132 Raw HTTP response. Expected success: HTTP 204. 

133 

134 Raises: 

135 RWSAuthenticationError: On HTTP 401. 

136 RWSNotFoundError: On HTTP 404. 

137 RWSHTTPError: On any other HTTP >= 400. 

138 # ABB codes: BAD_REQUEST(400) 

139 

140 Example: 

141 ```python 

142 >>> await load_cfg_file(client) 

143 <Response [204]> 

144 ``` 

145 """ 

146 return await client.post( 

147 "/rw/cfg", 

148 params={k: v for k, v in {"action": action}.items() if v is not None}, 

149 data={}, 

150 ) 

151 

152 

153async def validate_cfg_instance_before_delete( 

154 client: RWSClient, 

155 action: str | None = None, 

156 name: str | None = None, 

157) -> httpx.Response: 

158 """ 

159 Validate CFG Instance before Delete. 

160 

161 Route: ``POST /rw/cfg`` 

162 ABB constraints: Not supported in bootserver mode 

163 

164 Args: 

165 client: Open RWSClient instance. 

166 action: Query parameter. Optional. 

167 name: Body parameter. Optional. 

168 

169 Returns: 

170 Raw HTTP response. Expected success: HTTP 204. 

171 

172 Raises: 

173 RWSAuthenticationError: On HTTP 401. 

174 RWSNotFoundError: On HTTP 404. 

175 RWSHTTPError: On any other HTTP >= 400. 

176 # ABB codes: BAD_REQUEST(400), NOT_FOUND(404), see 

177 

178 Example: 

179 ```python 

180 >>> await validate_cfg_instance_before_delete(client) 

181 <Response [204]> 

182 ``` 

183 """ 

184 return await client.post( 

185 "/rw/cfg", 

186 params={k: v for k, v in {"action": action}.items() if v is not None}, 

187 data={k: v for k, v in {"name": name}.items() if v is not None}, 

188 ) 

189 

190 

191async def validate_cfg_instances( 

192 client: RWSClient, 

193 action: str | None = None, 

194 operation: str | None = None, 

195 cfgdomain: str | None = None, 

196 cfgtype: str | None = None, 

197 instances: str | None = None, 

198 instancescount: str | None = None, 

199) -> httpx.Response: 

200 """ 

201 Validate CFG Instances. 

202 

203 Route: ``POST /rw/cfg`` 

204 ABB constraints: Not supported in bootserver mode 

205 

206 Args: 

207 client: Open RWSClient instance. 

208 action: Query parameter. Optional. 

209 operation: Body parameter. Optional. 

210 cfgdomain: Body parameter. Optional. 

211 cfgtype: Body parameter. Optional. 

212 instances: Body parameter. Optional. 

213 instancescount: Body parameter. Optional. 

214 

215 Returns: 

216 Raw HTTP response. Expected success: HTTP 204. 

217 

218 Raises: 

219 RWSAuthenticationError: On HTTP 401. 

220 RWSNotFoundError: On HTTP 404. 

221 RWSHTTPError: On any other HTTP >= 400. 

222 # ABB codes: BAD_REQUEST(400), NOT_FOUND(404), see 

223 

224 Example: 

225 ```python 

226 >>> await validate_cfg_instances(client) 

227 <Response [204]> 

228 ``` 

229 """ 

230 return await client.post( 

231 "/rw/cfg", 

232 params={k: v for k, v in {"action": action}.items() if v is not None}, 

233 data={ 

234 k: v 

235 for k, v in { 

236 "operation": operation, 

237 "cfgdomain": cfgdomain, 

238 "cfgtype": cfgtype, 

239 "instances": instances, 

240 "instancescount": instancescount, 

241 }.items() 

242 if v is not None 

243 }, 

244 ) 

245 

246 

247async def post_keyless_motor_on( 

248 client: RWSClient, 

249 action: str | None = None, 

250 state: str | None = None, 

251) -> httpx.Response: 

252 """ 

253 Keyless motor ON. 

254 

255 Route: ``POST /rw/cfg`` 

256 ABB constraints: Not supported in bootserver mode 

257 

258 Args: 

259 client: Open RWSClient instance. 

260 action: Query parameter. Optional. 

261 state: Body parameter. Optional. 

262 

263 Returns: 

264 Raw HTTP response. Expected success: HTTP 204. 

265 

266 Raises: 

267 RWSAuthenticationError: On HTTP 401. 

268 RWSNotFoundError: On HTTP 404. 

269 RWSHTTPError: On any other HTTP >= 400. 

270 # ABB codes: BAD_REQUEST(400) see 

271 

272 Example: 

273 ```python 

274 >>> await post_keyless_motor_on(client) 

275 <Response [204]> 

276 ``` 

277 """ 

278 return await client.post( 

279 "/rw/cfg", 

280 params={k: v for k, v in {"action": action}.items() if v is not None}, 

281 data={k: v for k, v in {"state": state}.items() if v is not None}, 

282 ) 

283 

284 

285async def subscribe_on_cfg_changecount( 

286 client: RWSClient, 

287 identifier: str | None = None, 

288 identifier_p: str | None = None, 

289) -> httpx.Response: 

290 """ 

291 Subscribe on cfg ChangeCount. 

292 

293 Route: ``POST /subscription`` 

294 ABB constraints: Not supported in bootserver mode. 

295 

296 Args: 

297 client: Open RWSClient instance. 

298 identifier: Body parameter. Optional. 

299 identifier_p: Body parameter. Optional. 

300 

301 Returns: 

302 Raw HTTP response. Expected success: HTTP 201. 

303 

304 Raises: 

305 RWSAuthenticationError: On HTTP 401. 

306 RWSNotFoundError: On HTTP 404. 

307 RWSHTTPError: On any other HTTP >= 400. 

308 # ABB codes: BAD_REQUEST(400), UNSUPPORTED_MEDIA(415) 

309 

310 Example: 

311 ```python 

312 >>> await subscribe_on_cfg_changecount(client) 

313 <Response [201]> 

314 ``` 

315 """ 

316 return await client.post( 

317 "/subscription", 

318 data={ 

319 k: v 

320 for k, v in {"identifier": identifier, "identifier_p": identifier_p}.items() 

321 if v is not None 

322 }, 

323 ) 

324 

325 

326async def get_cfg_domain_types( 

327 client: RWSClient, 

328 domain: str, 

329 start: str | None = None, 

330 limit: str | None = None, 

331) -> httpx.Response: 

332 """ 

333 Get CFG Domain Types. 

334 

335 Route: ``GET /rw/cfg/{domain}`` 

336 ABB constraints: Not supported in bootserver mode 

337 

338 Args: 

339 client: Open RWSClient instance. 

340 domain: URL path parameter. 

341 start: Query parameter. Optional. 

342 limit: Query parameter. Optional. 

343 

344 Returns: 

345 Raw HTTP response. Expected success: HTTP 200. 

346 

347 Raises: 

348 RWSAuthenticationError: On HTTP 401. 

349 RWSNotFoundError: On HTTP 404. 

350 RWSHTTPError: On any other HTTP >= 400. 

351 

352 Example: 

353 ```python 

354 >>> await get_cfg_domain_types(client, "domain_value") 

355 <Response [200]> 

356 ``` 

357 """ 

358 return await client.get( 

359 f"/rw/cfg/{domain}", 

360 params={k: v for k, v in {"start": start, "limit": limit}.items() if v is not None}, 

361 ) 

362 

363 

364async def get_actions_on_cfg_domain( 

365 client: RWSClient, 

366 domain: str, 

367 action: str | None = None, 

368) -> httpx.Response: 

369 """ 

370 Get Actions on a CFG domain. 

371 

372 Route: ``GET /rw/cfg/{domain}`` 

373 ABB constraints: CFG Mastership is handled internally if not explicit held by the client. Not 

374 supported in bootserver mode 

375 

376 Args: 

377 client: Open RWSClient instance. 

378 domain: URL path parameter. 

379 action: Query parameter. Optional. 

380 

381 Returns: 

382 Raw HTTP response. Expected success: HTTP 200. 

383 

384 Raises: 

385 RWSAuthenticationError: On HTTP 401. 

386 RWSNotFoundError: On HTTP 404. 

387 RWSHTTPError: On any other HTTP >= 400. 

388 # ABB codes: BAD_REQUEST(400) 

389 

390 Example: 

391 ```python 

392 >>> await get_actions_on_cfg_domain(client, "domain_value") 

393 <Response [200]> 

394 ``` 

395 """ 

396 return await client.get( 

397 f"/rw/cfg/{domain}", 

398 params={k: v for k, v in {"action": action}.items() if v is not None}, 

399 ) 

400 

401 

402async def save_cfg_domain( 

403 client: RWSClient, 

404 domain: str, 

405 action: str | None = None, 

406) -> httpx.Response: 

407 """ 

408 Save CFG domain. 

409 

410 Route: ``POST /rw/cfg/{domain}`` 

411 ABB constraints: Not supported in bootserver mode 

412 

413 Args: 

414 client: Open RWSClient instance. 

415 domain: URL path parameter. 

416 action: Query parameter. Optional. 

417 

418 Returns: 

419 Raw HTTP response. Expected success: HTTP 204. 

420 

421 Raises: 

422 RWSAuthenticationError: On HTTP 401. 

423 RWSNotFoundError: On HTTP 404. 

424 RWSHTTPError: On any other HTTP >= 400. 

425 # ABB codes: BAD_REQUEST(400), FORBIDDEN(403), UNAUTHORIZED(401) 

426 

427 Example: 

428 ```python 

429 >>> await save_cfg_domain(client, "domain_value") 

430 <Response [204]> 

431 ``` 

432 """ 

433 return await client.post( 

434 f"/rw/cfg/{domain}", 

435 params={k: v for k, v in {"action": action}.items() if v is not None}, 

436 data={}, 

437 ) 

438 

439 

440async def reset_cfg_domain( 

441 client: RWSClient, 

442 domain: str, 

443 action: str | None = None, 

444) -> httpx.Response: 

445 """ 

446 Reset CFG domain. 

447 

448 Route: ``POST /rw/cfg/{domain}`` 

449 ABB constraints: Not supported in bootserver mode 

450 

451 Args: 

452 client: Open RWSClient instance. 

453 domain: URL path parameter. 

454 action: Query parameter. Optional. 

455 

456 Returns: 

457 Raw HTTP response. Expected success: HTTP 200. 

458 

459 Raises: 

460 RWSAuthenticationError: On HTTP 401. 

461 RWSNotFoundError: On HTTP 404. 

462 RWSHTTPError: On any other HTTP >= 400. 

463 # ABB codes: BAD_REQUEST(400) 

464 

465 Example: 

466 ```python 

467 >>> await reset_cfg_domain(client, "domain_value") 

468 <Response [200]> 

469 ``` 

470 """ 

471 return await client.post( 

472 f"/rw/cfg/{domain}", 

473 params={k: v for k, v in {"action": action}.items() if v is not None}, 

474 data={}, 

475 ) 

476 

477 

478async def get_cfg_type( 

479 client: RWSClient, 

480 domain: str, 

481 type: str, 

482) -> httpx.Response: 

483 """ 

484 Get CFG type. 

485 

486 Route: ``GET /rw/cfg/{domain}/{type}`` 

487 ABB constraints: Not supported in bootserver mode 

488 

489 Args: 

490 client: Open RWSClient instance. 

491 domain: URL path parameter. 

492 type: URL path parameter. 

493 

494 Returns: 

495 Raw HTTP response. Expected success: HTTP 200. 

496 

497 Raises: 

498 RWSAuthenticationError: On HTTP 401. 

499 RWSNotFoundError: On HTTP 404. 

500 RWSHTTPError: On any other HTTP >= 400. 

501 # ABB codes: NOT_FOUND(404) 

502 

503 Example: 

504 ```python 

505 >>> await get_cfg_type(client, "domain_value", "type_value") 

506 <Response [200]> 

507 ``` 

508 """ 

509 return await client.get(f"/rw/cfg/{domain}/{type}") 

510 

511 

512async def get_all_attributes_of_the_given_domain( 

513 client: RWSClient, 

514 domain: str, 

515 type: str, 

516) -> httpx.Response: 

517 """ 

518 Get all attributes of the given domain type. 

519 

520 Route: ``GET /rw/cfg/{domain}/{type}/attributes`` 

521 ABB constraints: Not supported in bootserver mode 

522 

523 Args: 

524 client: Open RWSClient instance. 

525 domain: URL path parameter. 

526 type: URL path parameter. 

527 

528 Returns: 

529 Raw HTTP response. Expected success: HTTP 200. 

530 

531 Raises: 

532 RWSAuthenticationError: On HTTP 401. 

533 RWSNotFoundError: On HTTP 404. 

534 RWSHTTPError: On any other HTTP >= 400. 

535 # ABB codes: BAD_REQUEST(400) 

536 

537 Example: 

538 ```python 

539 >>> await get_all_attributes_of_the_given_domain(client, "domain_value", "type_value") 

540 <Response [200]> 

541 ``` 

542 """ 

543 return await client.get(f"/rw/cfg/{domain}/{type}/attributes") 

544 

545 

546async def get_all_instances_of_the_given_domain( 

547 client: RWSClient, 

548 domain: str, 

549 type: str, 

550) -> httpx.Response: 

551 """ 

552 Get all instances of the given domain type. 

553 

554 Route: ``GET /rw/cfg/{domain}/{type}/instances`` 

555 ABB constraints: Not supported in bootserver mode 

556 

557 Args: 

558 client: Open RWSClient instance. 

559 domain: URL path parameter. 

560 type: URL path parameter. 

561 

562 Returns: 

563 Raw HTTP response. Expected success: HTTP 200. 

564 

565 Raises: 

566 RWSAuthenticationError: On HTTP 401. 

567 RWSNotFoundError: On HTTP 404. 

568 RWSHTTPError: On any other HTTP >= 400. 

569 # ABB codes: BAD_REQUEST(400) 

570 

571 Example: 

572 ```python 

573 >>> await get_all_instances_of_the_given_domain(client, "domain_value", "type_value") 

574 <Response [200]> 

575 ``` 

576 """ 

577 return await client.get(f"/rw/cfg/{domain}/{type}/instances") 

578 

579 

580async def get_actions_on_cfg_instances( 

581 client: RWSClient, 

582 domain: str, 

583 type: str, 

584 action: str | None = None, 

585) -> httpx.Response: 

586 """ 

587 Get actions on CFG instances. 

588 

589 Route: ``GET /rw/cfg/{domain}/{type}/instances`` 

590 ABB constraints: Not supported in bootserver mode 

591 

592 Args: 

593 client: Open RWSClient instance. 

594 domain: URL path parameter. 

595 type: URL path parameter. 

596 action: Query parameter. Optional. 

597 

598 Returns: 

599 Raw HTTP response. Expected success: HTTP 200. 

600 

601 Raises: 

602 RWSAuthenticationError: On HTTP 401. 

603 RWSNotFoundError: On HTTP 404. 

604 RWSHTTPError: On any other HTTP >= 400. 

605 # ABB codes: BAD_REQUEST(400) 

606 

607 Example: 

608 ```python 

609 >>> await get_actions_on_cfg_instances(client, "domain_value", "type_value") 

610 <Response [200]> 

611 ``` 

612 """ 

613 return await client.get( 

614 f"/rw/cfg/{domain}/{type}/instances", 

615 params={k: v for k, v in {"action": action}.items() if v is not None}, 

616 ) 

617 

618 

619async def reset_cfg_instances( 

620 client: RWSClient, 

621 domain: str, 

622 type: str, 

623 action: str | None = None, 

624) -> httpx.Response: 

625 """ 

626 Reset CFG instances. 

627 

628 Route: ``POST /rw/cfg/{domain}/{type}/instances`` 

629 ABB constraints: Not supported in bootserver mode 

630 

631 Args: 

632 client: Open RWSClient instance. 

633 domain: URL path parameter. 

634 type: URL path parameter. 

635 action: Query parameter. Optional. 

636 

637 Returns: 

638 Raw HTTP response. Expected success: HTTP 204. 

639 

640 Raises: 

641 RWSAuthenticationError: On HTTP 401. 

642 RWSNotFoundError: On HTTP 404. 

643 RWSHTTPError: On any other HTTP >= 400. 

644 # ABB codes: BAD_REQUEST(400) 

645 

646 Example: 

647 ```python 

648 >>> await reset_cfg_instances(client, "domain_value", "type_value") 

649 <Response [204]> 

650 ``` 

651 """ 

652 return await client.post( 

653 f"/rw/cfg/{domain}/{type}/instances", 

654 params={k: v for k, v in {"action": action}.items() if v is not None}, 

655 data={}, 

656 ) 

657 

658 

659async def create_default_cfg_instance( 

660 client: RWSClient, 

661 domain: str, 

662 type: str, 

663 action: str | None = None, 

664) -> httpx.Response: 

665 """ 

666 Create default CFG instance. 

667 

668 Route: ``POST /rw/cfg/{domain}/{type}/instances`` 

669 ABB constraints: Use location header to fetch information about newly created resource. Not 

670 supported in bootserver mode 

671 

672 Args: 

673 client: Open RWSClient instance. 

674 domain: URL path parameter. 

675 type: URL path parameter. 

676 action: Query parameter. Optional. 

677 

678 Returns: 

679 Raw HTTP response. Expected success: HTTP 201. 

680 

681 Raises: 

682 RWSAuthenticationError: On HTTP 401. 

683 RWSNotFoundError: On HTTP 404. 

684 RWSHTTPError: On any other HTTP >= 400. 

685 # ABB codes: BAD_REQUEST(400) 

686 

687 Example: 

688 ```python 

689 >>> await create_default_cfg_instance(client, "domain_value", "type_value") 

690 <Response [201]> 

691 ``` 

692 """ 

693 return await client.post( 

694 f"/rw/cfg/{domain}/{type}/instances", 

695 params={k: v for k, v in {"action": action}.items() if v is not None}, 

696 data={}, 

697 ) 

698 

699 

700async def get_cfg_instance( 

701 client: RWSClient, 

702 domain: str, 

703 type: str, 

704 instance_name: str, 

705) -> httpx.Response: 

706 """ 

707 Get CFG instance. 

708 

709 Route: ``GET /rw/cfg/{domain}/{type}/instances/{instance name}`` 

710 ABB constraints: Not supported in bootserver mode 

711 

712 Args: 

713 client: Open RWSClient instance. 

714 domain: URL path parameter. 

715 type: URL path parameter. 

716 instance_name: URL path parameter. 

717 

718 Returns: 

719 Raw HTTP response. Expected success: HTTP 200. 

720 

721 Raises: 

722 RWSAuthenticationError: On HTTP 401. 

723 RWSNotFoundError: On HTTP 404. 

724 RWSHTTPError: On any other HTTP >= 400. 

725 # ABB codes: BAD_REQUEST(400) 

726 

727 Example: 

728 ```python 

729 >>> await get_cfg_instance(client, "domain_value", "type_value", "instance_name_value") 

730 <Response [200]> 

731 ``` 

732 """ 

733 return await client.get(f"/rw/cfg/{domain}/{type}/instances/{instance_name}") 

734 

735 

736async def get_cfg_instance_actions( 

737 client: RWSClient, 

738 domain: str, 

739 type: str, 

740 instance: str, 

741 action: str | None = None, 

742) -> httpx.Response: 

743 """ 

744 Get CFG instance actions. 

745 

746 Route: ``GET /rw/cfg/{domain}/{type}/instances/{instance}`` 

747 ABB constraints: Not supported in bootserver mode 

748 

749 Args: 

750 client: Open RWSClient instance. 

751 domain: URL path parameter. 

752 type: URL path parameter. 

753 instance: URL path parameter. 

754 action: Query parameter. Optional. 

755 

756 Returns: 

757 Raw HTTP response. Expected success: HTTP 200. 

758 

759 Raises: 

760 RWSAuthenticationError: On HTTP 401. 

761 RWSNotFoundError: On HTTP 404. 

762 RWSHTTPError: On any other HTTP >= 400. 

763 # ABB codes: BAD_REQUEST(400) 

764 

765 Example: 

766 ```python 

767 >>> await get_cfg_instance_actions( 

768 ... client, 

769 ... "domain_value", 

770 ... "type_value", 

771 ... "instance_value" 

772 ... ) 

773 <Response [200]> 

774 ``` 

775 """ 

776 return await client.get( 

777 f"/rw/cfg/{domain}/{type}/instances/{instance}", 

778 params={k: v for k, v in {"action": action}.items() if v is not None}, 

779 ) 

780 

781 

782async def update_cfg_instance( 

783 client: RWSClient, 

784 domain: str, 

785 type: str, 

786 instance: str, 

787 action: str | None = None, 

788 attribute_name: str | None = None, 

789) -> httpx.Response: 

790 """ 

791 Update CFG instance. 

792 

793 Route: ``POST /rw/cfg/{domain}/{type}/instances/{instance}`` 

794 ABB constraints: Not supported in bootserver mode 

795 

796 Args: 

797 client: Open RWSClient instance. 

798 domain: URL path parameter. 

799 type: URL path parameter. 

800 instance: URL path parameter. 

801 action: Query parameter. Optional. 

802 attribute_name: Body parameter. Optional. 

803 

804 Returns: 

805 Raw HTTP response. Expected success: HTTP 204. 

806 

807 Raises: 

808 RWSAuthenticationError: On HTTP 401. 

809 RWSNotFoundError: On HTTP 404. 

810 RWSHTTPError: On any other HTTP >= 400. 

811 # ABB codes: UNSUPPORTED_MEDIA(415), BAD_REQUEST(400) 

812 

813 Example: 

814 ```python 

815 >>> await update_cfg_instance(client, "domain_value", "type_value", "instance_value") 

816 <Response [204]> 

817 ``` 

818 """ 

819 return await client.post( 

820 f"/rw/cfg/{domain}/{type}/instances/{instance}", 

821 params={k: v for k, v in {"action": action}.items() if v is not None}, 

822 data={k: v for k, v in {"attribute_name": attribute_name}.items() if v is not None}, 

823 ) 

824 

825 

826async def delete_cfg_instance( 

827 client: RWSClient, 

828 domain: str, 

829 type: str, 

830 instance: str, 

831) -> httpx.Response: 

832 """ 

833 Delete CFG instance. 

834 

835 Route: ``DELETE /rw/cfg/{domain}/{type}/instances/{instance}`` 

836 ABB constraints: Not supported in bootserver mode 

837 

838 Args: 

839 client: Open RWSClient instance. 

840 domain: URL path parameter. 

841 type: URL path parameter. 

842 instance: URL path parameter. 

843 

844 Returns: 

845 Raw HTTP response. Expected success: HTTP 204. 

846 

847 Raises: 

848 RWSAuthenticationError: On HTTP 401. 

849 RWSNotFoundError: On HTTP 404. 

850 RWSHTTPError: On any other HTTP >= 400. 

851 # ABB codes: BAD_REQUEST(400) 

852 

853 Example: 

854 ```python 

855 >>> await delete_cfg_instance(client, "domain_value", "type_value", "instance_value") 

856 <Response [204]> 

857 ``` 

858 """ 

859 return await client.delete(f"/rw/cfg/{domain}/{type}/instances/{instance}")