|
60 | 60 | example_updated_policy_etag = None
|
61 | 61 | example_target_account_id = None
|
62 | 62 | example_assignment_etag = None
|
| 63 | +example_account_settings_etag = None |
63 | 64 |
|
64 | 65 | ##############################################################################
|
65 | 66 | # Start of Examples for Service: IamPolicyManagementV1
|
@@ -1003,6 +1004,66 @@ def test_delete_policy_template_example(self):
|
1003 | 1004 | except ApiException as e:
|
1004 | 1005 | pytest.fail(str(e))
|
1005 | 1006 |
|
| 1007 | + @needscredentials |
| 1008 | + def test_get_access_management_account_settings_example(self): |
| 1009 | + """ |
| 1010 | + get_access_management_account_settings request example |
| 1011 | + """ |
| 1012 | + try: |
| 1013 | + # begin-get_access_management_account_settings |
| 1014 | + |
| 1015 | + response = iam_policy_management_service.get_settings( |
| 1016 | + account_id=example_account_id, |
| 1017 | + accept_language='default', |
| 1018 | + ) |
| 1019 | + |
| 1020 | + # end-get_access_management_account_settings |
| 1021 | + print('\nget_settings() response status code: ', response.get_status_code()) |
| 1022 | + result = response.get_result() |
| 1023 | + assert result is not None |
| 1024 | + global example_account_settings_etag |
| 1025 | + example_account_settings_etag = response.get_headers().get("Etag") |
| 1026 | + print(json.dumps(result, indent=2)) |
| 1027 | + |
| 1028 | + except ApiException as e: |
| 1029 | + pytest.fail(str(e)) |
| 1030 | + |
| 1031 | + @needscredentials |
| 1032 | + def test_update_access_management_account_settings_example(self): |
| 1033 | + """ |
| 1034 | + update_access_management_account_settings request example |
| 1035 | + """ |
| 1036 | + try: |
| 1037 | + # Construct a dict representation of a IdentityTypesBase model |
| 1038 | + identity_types_base_model = {'state': 'monitor', 'external_allowed_accounts': []} |
| 1039 | + |
| 1040 | + # Construct a dict representation of a IdentityTypesPatch model |
| 1041 | + identity_types_patch_model = { |
| 1042 | + 'user': identity_types_base_model, |
| 1043 | + 'service_id': identity_types_base_model, |
| 1044 | + 'service': identity_types_base_model, |
| 1045 | + } |
| 1046 | + |
| 1047 | + # Construct a dict representation of a ExternalAccountIdentityInteractionPatch model |
| 1048 | + external_account_identity_interaction_patch_model = {'identity_types': identity_types_patch_model} |
| 1049 | + # begin-update_access_management_account_settings |
| 1050 | + |
| 1051 | + response = iam_policy_management_service.update_settings( |
| 1052 | + account_id=example_account_id, |
| 1053 | + accept_language='default', |
| 1054 | + if_match=example_account_settings_etag, |
| 1055 | + external_account_identity_interaction=external_account_identity_interaction_patch_model, |
| 1056 | + ) |
| 1057 | + |
| 1058 | + # end-update_access_management_account_settings |
| 1059 | + print('\nupdate_settings() response status code: ', response.get_status_code()) |
| 1060 | + result = response.get_result() |
| 1061 | + assert result is not None |
| 1062 | + print(json.dumps(result, indent=2)) |
| 1063 | + |
| 1064 | + except ApiException as e: |
| 1065 | + pytest.fail(str(e)) |
| 1066 | + |
1006 | 1067 |
|
1007 | 1068 | # endregion
|
1008 | 1069 | ##############################################################################
|
|
0 commit comments