# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).
import oci
# Create a default config using DEFAULT profile in default location
# Refer to
# https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File
# for more info
config = oci.config.from_file()
# Initialize service client with default config file
identity_domains_client = oci.identity_domains.IdentityDomainsClient(
config, "https://endpoint_of_this_service.com")
# Send the request to service, some parameters are not required, see API
# doc for more info
put_me_response = identity_domains_client.put_me(
authorization="EXAMPLE-authorization-Value",
resource_type_schema_version="EXAMPLE-resourceTypeSchemaVersion-Value",
attributes="EXAMPLE-attributes-Value",
attribute_sets=["all"],
me=oci.identity_domains.models.Me(
schemas=["EXAMPLE--Value"],
user_name="EXAMPLE-userName-Value",
id="ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
ocid="EXAMPLE-ocid-Value",
meta=oci.identity_domains.models.Meta(
resource_type="EXAMPLE-resourceType-Value",
created="EXAMPLE-created-Value",
last_modified="EXAMPLE-lastModified-Value",
location="EXAMPLE-location-Value",
version="EXAMPLE-version-Value"),
idcs_created_by=oci.identity_domains.models.IdcsCreatedBy(
value="EXAMPLE-value-Value",
ref=None,
type="User",
display="EXAMPLE-display-Value",
ocid="EXAMPLE-ocid-Value"),
idcs_last_modified_by=oci.identity_domains.models.IdcsLastModifiedBy(
value="EXAMPLE-value-Value",
ref=None,
type="App",
display="EXAMPLE-display-Value",
ocid="EXAMPLE-ocid-Value"),
idcs_prevented_operations=["replace"],
tags=[
oci.identity_domains.models.Tags(
key="EXAMPLE-key-Value",
value="EXAMPLE-value-Value")],
delete_in_progress=False,
idcs_last_upgraded_in_release="EXAMPLE-idcsLastUpgradedInRelease-Value",
domain_ocid="EXAMPLE-domainOcid-Value",
compartment_ocid="EXAMPLE-compartmentOcid-Value",
tenancy_ocid="EXAMPLE-tenancyOcid-Value",
external_id="ocid1.test.oc1..<unique_ID>EXAMPLE-externalId-Value",
description="EXAMPLE-description-Value",
display_name="EXAMPLE-displayName-Value",
nick_name="EXAMPLE-nickName-Value",
profile_url="EXAMPLE-profileUrl-Value",
title="EXAMPLE-title-Value",
user_type="Contractor",
locale="EXAMPLE-locale-Value",
preferred_language="EXAMPLE-preferredLanguage-Value",
timezone="EXAMPLE-timezone-Value",
active=False,
password="EXAMPLE-password-Value",
name=oci.identity_domains.models.MeName(
formatted="EXAMPLE-formatted-Value",
family_name="EXAMPLE-familyName-Value",
given_name="EXAMPLE-givenName-Value",
middle_name="EXAMPLE-middleName-Value",
honorific_prefix="EXAMPLE-honorificPrefix-Value",
honorific_suffix="EXAMPLE-honorificSuffix-Value"),
emails=[
oci.identity_domains.models.MeEmails(
value="EXAMPLE-value-Value",
type="recovery",
primary=True,
secondary=True,
verified=False,
pending_verification_data="EXAMPLE-pendingVerificationData-Value")],
phone_numbers=[
oci.identity_domains.models.MePhoneNumbers(
value="EXAMPLE-value-Value",
type="work",
display="EXAMPLE-display-Value",
primary=True,
verified=True)],
ims=[
oci.identity_domains.models.MeIms(
value="EXAMPLE-value-Value",
type="gtalk",
display="EXAMPLE-display-Value",
primary=True)],
photos=[
oci.identity_domains.models.MePhotos(
value="EXAMPLE-value-Value",
type="thumbnail",
display="EXAMPLE-display-Value",
primary=True)],
addresses=[
oci.identity_domains.models.Addresses(
type="work",
formatted="EXAMPLE-formatted-Value",
street_address="EXAMPLE-streetAddress-Value",
locality="EXAMPLE-locality-Value",
region="EXAMPLE-region-Value",
postal_code="EXAMPLE-postalCode-Value",
country="EXAMPLE-country-Value",
primary=False)],
groups=[
oci.identity_domains.models.MeGroups(
value="EXAMPLE-value-Value",
ocid="EXAMPLE-ocid-Value",
ref=None,
display="EXAMPLE-display-Value",
non_unique_display="EXAMPLE-nonUniqueDisplay-Value",
external_id="ocid1.test.oc1..<unique_ID>EXAMPLE-externalId-Value",
type="indirect",
membership_ocid="EXAMPLE-membershipOcid-Value",
date_added="EXAMPLE-dateAdded-Value")],
entitlements=[
oci.identity_domains.models.MeEntitlements(
value="EXAMPLE-value-Value",
type="EXAMPLE-type-Value",
display="EXAMPLE-display-Value",
primary=True)],
roles=[
oci.identity_domains.models.MeRoles(
value="EXAMPLE-value-Value",
type="EXAMPLE-type-Value",
display="EXAMPLE-display-Value",
primary=True)],
x509_certificates=[
oci.identity_domains.models.MeX509Certificates(
value="EXAMPLE-value-Value",
display="EXAMPLE-display-Value",
type="EXAMPLE-type-Value",
primary=True)],
urn_ietf_params_scim_schemas_extension_enterprise2_0_user=oci.identity_domains.models.ExtensionEnterprise20User(
employee_number="EXAMPLE-employeeNumber-Value",
cost_center="EXAMPLE-costCenter-Value",
organization="EXAMPLE-organization-Value",
division="EXAMPLE-division-Value",
department="EXAMPLE-department-Value",
manager=oci.identity_domains.models.UserExtManager(
value="EXAMPLE-value-Value",
ref=None,
display_name="EXAMPLE-displayName-Value")),
urn_ietf_params_scim_schemas_oracle_idcs_extension_user_user=oci.identity_domains.models.ExtensionUserUser(
is_federated_user=False,
is_authentication_delegated=True,
status="verified",
provider="twitter",
preferred_ui_landing_page="MyApps",
creation_mechanism="import",
group_membership_last_modified="EXAMPLE-groupMembershipLastModified-Value",
do_not_show_getting_started=False,
bypass_notification=True,
is_account_recovery_enrolled=True,
account_recovery_required=False,
user_flow_controlled_by_external_client=False,
is_group_membership_normalized=True,
is_group_membership_synced_to_users_groups=False,
notification_email_template_id="ocid1.test.oc1..<unique_ID>EXAMPLE-notificationEmailTemplateId-Value",
service_user=True,
support_accounts=[
oci.identity_domains.models.UserExtSupportAccounts(
value="EXAMPLE-value-Value",
provider="EXAMPLE-provider-Value",
user_id="ocid1.test.oc1..<unique_ID>EXAMPLE-userId-Value",
ocid="EXAMPLE-ocid-Value",
ref=None)],
idcs_app_roles_limited_to_groups=[
oci.identity_domains.models.UserExtIdcsAppRolesLimitedToGroups(
idcs_app_role_id="ocid1.test.oc1..<unique_ID>EXAMPLE-idcsAppRoleId-Value",
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value",
ocid="EXAMPLE-ocid-Value")],
user_token=oci.identity_domains.models.UserExtUserToken(
value="EXAMPLE-value-Value",
ref=None),
synced_from_app=oci.identity_domains.models.UserExtSyncedFromApp(
value="EXAMPLE-value-Value",
type="IdentityProvider",
ref=None,
display="EXAMPLE-display-Value"),
applicable_authentication_target_app=oci.identity_domains.models.UserExtApplicableAuthenticationTargetApp(
type="EXAMPLE-type-Value",
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value",
target_request_timeout=491),
delegated_authentication_target_app=oci.identity_domains.models.UserExtDelegatedAuthenticationTargetApp(
value="EXAMPLE-value-Value",
type="App",
ref=None,
display="EXAMPLE-display-Value"),
accounts=[
oci.identity_domains.models.UserExtAccounts(
value="EXAMPLE-value-Value",
ref=None,
app_id="ocid1.test.oc1..<unique_ID>EXAMPLE-appId-Value",
name="EXAMPLE-name-Value",
active=True)],
grants=[
oci.identity_domains.models.UserExtGrants(
value="EXAMPLE-value-Value",
ref=None,
app_id="ocid1.test.oc1..<unique_ID>EXAMPLE-appId-Value",
grant_mechanism="GROUP_MEMBERSHIP",
grantor_id="ocid1.test.oc1..<unique_ID>EXAMPLE-grantorId-Value")],
app_roles=[
oci.identity_domains.models.UserExtAppRoles(
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value",
type="direct",
app_id="ocid1.test.oc1..<unique_ID>EXAMPLE-appId-Value",
app_name="EXAMPLE-appName-Value",
admin_role=True,
legacy_group_name="EXAMPLE-legacyGroupName-Value")]),
urn_ietf_params_scim_schemas_oracle_idcs_extension_password_state_user=oci.identity_domains.models.ExtensionPasswordStateUser(
last_successful_set_date="EXAMPLE-lastSuccessfulSetDate-Value",
cant_change=True,
cant_expire=True,
must_change=True,
expired=False,
last_successful_validation_date="EXAMPLE-lastSuccessfulValidationDate-Value",
last_failed_validation_date="EXAMPLE-lastFailedValidationDate-Value",
applicable_password_policy=oci.identity_domains.models.UserExtApplicablePasswordPolicy(
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value",
priority=179)),
urn_ietf_params_scim_schemas_oracle_idcs_extension_user_state_user=oci.identity_domains.models.ExtensionUserStateUser(
last_successful_login_date="EXAMPLE-lastSuccessfulLoginDate-Value",
previous_successful_login_date="EXAMPLE-previousSuccessfulLoginDate-Value",
last_failed_login_date="EXAMPLE-lastFailedLoginDate-Value",
login_attempts=384,
recovery_attempts=276,
recovery_enroll_attempts=458,
max_concurrent_sessions=482,
recovery_locked=oci.identity_domains.models.UserExtRecoveryLocked(
on=True,
lock_date="EXAMPLE-lockDate-Value"),
locked=oci.identity_domains.models.UserExtLocked(
reason=721,
on=True,
lock_date="EXAMPLE-lockDate-Value",
expired=True)),
urn_ietf_params_scim_schemas_oracle_idcs_extension_me_user=oci.identity_domains.models.ExtensionMeUser(
current_password="EXAMPLE-currentPassword-Value"),
urn_ietf_params_scim_schemas_oracle_idcs_extension_posix_user=oci.identity_domains.models.ExtensionPosixUser(
uid_number=892,
gid_number=448,
gecos="EXAMPLE-gecos-Value",
home_directory="EXAMPLE-homeDirectory-Value",
login_shell="EXAMPLE-loginShell-Value"),
urn_ietf_params_scim_schemas_oracle_idcs_extension_mfa_user=oci.identity_domains.models.ExtensionMfaUser(
preferred_authentication_factor="USERNAME_PASSWORD",
mfa_status="DISABLED",
preferred_third_party_vendor="EXAMPLE-preferredThirdPartyVendor-Value",
preferred_authentication_method="EXAMPLE-preferredAuthenticationMethod-Value",
login_attempts=92,
mfa_enabled_on="EXAMPLE-mfaEnabledOn-Value",
mfa_ignored_apps=["EXAMPLE--Value"],
preferred_device=oci.identity_domains.models.UserExtPreferredDevice(
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value"),
devices=[
oci.identity_domains.models.UserExtDevices(
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value",
status="EXAMPLE-status-Value",
last_sync_time="EXAMPLE-lastSyncTime-Value",
factor_type="EXAMPLE-factorType-Value",
factor_status="EXAMPLE-factorStatus-Value",
authentication_method="EXAMPLE-authenticationMethod-Value",
third_party_vendor_name="EXAMPLE-thirdPartyVendorName-Value")],
bypass_codes=[
oci.identity_domains.models.UserExtBypassCodes(
value="EXAMPLE-value-Value",
ref=None)],
trusted_user_agents=[
oci.identity_domains.models.UserExtTrustedUserAgents(
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value")]),
urn_ietf_params_scim_schemas_oracle_idcs_extension_security_questions_user=oci.identity_domains.models.ExtensionSecurityQuestionsUser(
sec_questions=[
oci.identity_domains.models.UserExtSecQuestions(
value="EXAMPLE-value-Value",
answer="EXAMPLE-answer-Value",
ref=None,
hint_text="EXAMPLE-hintText-Value")]),
urn_ietf_params_scim_schemas_oracle_idcs_extension_self_registration_user=oci.identity_domains.models.ExtensionSelfRegistrationUser(
self_registration_profile=oci.identity_domains.models.UserExtSelfRegistrationProfile(
value="EXAMPLE-value-Value",
ref=None,
display="EXAMPLE-display-Value"),
consent_granted=False,
user_token="EXAMPLE-userToken-Value"),
urn_ietf_params_scim_schemas_oracle_idcs_extension_terms_of_use_user=oci.identity_domains.models.ExtensionTermsOfUseUser(
terms_of_use_consents=[
oci.identity_domains.models.UserExtTermsOfUseConsents(
value="EXAMPLE-value-Value",
ref=None)]),
urn_ietf_params_scim_schemas_oracle_idcs_extension_oci_tags=oci.identity_domains.models.ExtensionOCITags(
freeform_tags=[
oci.identity_domains.models.FreeformTags(
key="EXAMPLE-key-Value",
value="EXAMPLE-value-Value")],
defined_tags=[
oci.identity_domains.models.DefinedTags(
namespace="EXAMPLE-namespace-Value",
key="EXAMPLE-key-Value",
value="EXAMPLE-value-Value")],
tag_slug="EXAMPLE-tagSlug-Value"),
urn_ietf_params_scim_schemas_oracle_idcs_extension_user_credentials_user=oci.identity_domains.models.ExtensionUserCredentialsUser(
db_credentials=[
oci.identity_domains.models.UserExtDbCredentials(
value="EXAMPLE-value-Value",
ref=None,
ocid="EXAMPLE-ocid-Value")],
customer_secret_keys=[
oci.identity_domains.models.UserExtCustomerSecretKeys(
value="EXAMPLE-value-Value",
ocid="EXAMPLE-ocid-Value",
ref=None)],
auth_tokens=[
oci.identity_domains.models.UserExtAuthTokens(
value="EXAMPLE-value-Value",
ocid="EXAMPLE-ocid-Value",
ref=None)],
smtp_credentials=[
oci.identity_domains.models.UserExtSmtpCredentials(
value="EXAMPLE-value-Value",
ocid="EXAMPLE-ocid-Value",
ref=None)],
api_keys=[
oci.identity_domains.models.UserExtApiKeys(
key="EXAMPLE-key-Value",
value="EXAMPLE-value-Value",
ocid="EXAMPLE-ocid-Value",
ref=None)],
o_auth2_client_credentials=[
oci.identity_domains.models.UserExtOAuth2ClientCredentials(
value="EXAMPLE-value-Value",
ocid="EXAMPLE-ocid-Value",
ref=None)]),
urn_ietf_params_scim_schemas_oracle_idcs_extension_capabilities_user=oci.identity_domains.models.ExtensionCapabilitiesUser(
can_use_api_keys=False,
can_use_auth_tokens=True,
can_use_console_password=False,
can_use_customer_secret_keys=True,
can_use_o_auth2_client_credentials=False,
can_use_smtp_credentials=False,
can_use_db_credentials=False,
can_use_console=True),
urn_ietf_params_scim_schemas_oracle_idcs_extension_db_credentials_user=oci.identity_domains.models.ExtensionDbCredentialsUser(
db_user_name="EXAMPLE-dbUserName-Value",
db_login_attempts=255)),
if_match="EXAMPLE-ifMatch-Value",
opc_retry_token="EXAMPLE-opcRetryToken-Value")
# Get the data from response
print(put_me_response.data)