|
52 | 52 |
|
53 | 53 | apikey_name = 'Example-ApiKey'
|
54 | 54 | serviceid_name = 'Example-ServiceId'
|
| 55 | +serviceid_group_name = 'Example-ServiceId' |
55 | 56 | service = 'console'
|
56 | 57 | value_string = '/billing'
|
57 | 58 | preference_id1 = 'landing_page'
|
|
70 | 71 | svc_id = None
|
71 | 72 | svc_id_etag = None
|
72 | 73 |
|
| 74 | +service_id_group_id = None |
| 75 | +service_id_group_etag = None |
| 76 | + |
73 | 77 | profile_id = None
|
74 | 78 | profile_etag = None
|
75 | 79 | profile_identity_etag = None
|
@@ -512,6 +516,109 @@ def test_delete_service_id_example(self):
|
512 | 516 | except ApiException as e:
|
513 | 517 | pytest.fail(str(e))
|
514 | 518 |
|
| 519 | + @needscredentials |
| 520 | + def test_create_service_id_group_example(self): |
| 521 | + """ |
| 522 | + create_service_id_group request example |
| 523 | + """ |
| 524 | + try: |
| 525 | + print('\ncreate_service_id_group() result:') |
| 526 | + # begin-create_service_id_group |
| 527 | + |
| 528 | + service_id_group = iam_identity_service.create_service_id_group( |
| 529 | + account_id=account_id, name=serviceid_group_name, description='Example ServiceId group' |
| 530 | + ).get_result() |
| 531 | + print(json.dumps(service_id_group, indent=2)) |
| 532 | + |
| 533 | + # end-create_service_id_group |
| 534 | + |
| 535 | + global service_id_group_id |
| 536 | + service_id_group_id = service_id_group['id'] |
| 537 | + |
| 538 | + except ApiException as e: |
| 539 | + pytest.fail(str(e)) |
| 540 | + |
| 541 | + @needscredentials |
| 542 | + def test_get_service_id_group_example(self): |
| 543 | + """ |
| 544 | + get_service_id_group request example |
| 545 | + """ |
| 546 | + try: |
| 547 | + print('\nget_service_id_group() result:') |
| 548 | + # begin-get_service_id_group |
| 549 | + |
| 550 | + response = iam_identity_service.get_service_id_group( |
| 551 | + id=service_id_group_id, |
| 552 | + ) |
| 553 | + service_id_group = response.get_result() |
| 554 | + print(json.dumps(service_id_group, indent=2)) |
| 555 | + |
| 556 | + # end-get_service_id_group |
| 557 | + |
| 558 | + global service_id_group_etag |
| 559 | + service_id_group_etag = response.get_headers()['Etag'] |
| 560 | + |
| 561 | + except ApiException as e: |
| 562 | + pytest.fail(str(e)) |
| 563 | + |
| 564 | + @needscredentials |
| 565 | + def test_list_service_id_group_example(self): |
| 566 | + """ |
| 567 | + list_service_id_group request example |
| 568 | + """ |
| 569 | + try: |
| 570 | + print('\nlist_service_id_group() result:') |
| 571 | + # begin-list_service_id_group |
| 572 | + |
| 573 | + service_id_group_list = iam_identity_service.list_service_id_group( |
| 574 | + account_id=account_id, name=serviceid_name |
| 575 | + ).get_result() |
| 576 | + print(json.dumps(service_id_group_list, indent=2)) |
| 577 | + |
| 578 | + # end-list_service_id_group |
| 579 | + |
| 580 | + except ApiException as e: |
| 581 | + pytest.fail(str(e)) |
| 582 | + |
| 583 | + @needscredentials |
| 584 | + def test_update_service_id_group_example(self): |
| 585 | + """ |
| 586 | + update_service_id_group request example |
| 587 | + """ |
| 588 | + try: |
| 589 | + print('\nupdate_service_id_group() result:') |
| 590 | + # begin-update_service_id_group |
| 591 | + |
| 592 | + service_id_group = iam_identity_service.update_service_id_group( |
| 593 | + id=service_id_group_id, |
| 594 | + if_match=service_id_group_etag, |
| 595 | + name=serviceid_group_name, |
| 596 | + description='This is an updated description', |
| 597 | + ).get_result() |
| 598 | + print(json.dumps(service_id_group, indent=2)) |
| 599 | + |
| 600 | + # end-update_service_id_group |
| 601 | + |
| 602 | + except ApiException as e: |
| 603 | + pytest.fail(str(e)) |
| 604 | + |
| 605 | + @needscredentials |
| 606 | + def test_delete_service_id_group_example(self): |
| 607 | + """ |
| 608 | + delete_service_id_group request example |
| 609 | + """ |
| 610 | + try: |
| 611 | + # begin-delete_service_id_group |
| 612 | + |
| 613 | + response = iam_identity_service.delete_service_id_group(id=service_id_group_id) |
| 614 | + |
| 615 | + # end-delete_service_id_group |
| 616 | + |
| 617 | + print('\ndelete_service_id_group() response status code: ', response.get_status_code()) |
| 618 | + |
| 619 | + except ApiException as e: |
| 620 | + pytest.fail(str(e)) |
| 621 | + |
515 | 622 | @needscredentials
|
516 | 623 | def test_create_profile_example(self):
|
517 | 624 | """
|
|
0 commit comments