def METHOD_NAME():
    client = StorageCacheManagementClient(
        credential=DefaultAzureCredential(),
        subscription_id="00000000-0000-0000-0000-000000000000",
    )
    response = client.caches.begin_create_or_update(
        resource_group_name="scgroup",
        cache_name="sc1",
        cache={
            "identity": {
                "type": "UserAssigned",
                "userAssignedIdentities": {
                    "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}
                },
            },
            "location": "westus",
            "properties": {
                "cacheSizeGB": 3072,
                "directoryServicesSettings": {
                    "activeDirectory": {
                        "cacheNetBiosName": "contosoSmb",
                        "credentials": {"password": "<password>", "username": "consotoAdmin"},
                        "domainName": "contosoAd.contoso.local",
                        "domainNetBiosName": "contosoAd",
                        "primaryDnsIpAddress": "192.0.2.10",
                        "secondaryDnsIpAddress": "192.0.2.11",
                    },
                    "usernameDownload": {
                        "credentials": {
                            "bindDn": "cn=ldapadmin,dc=contosoad,dc=contoso,dc=local",
                            "bindPassword": "<bindPassword>",
                        },
                        "extendedGroups": True,
                        "ldapBaseDN": "dc=contosoad,dc=contoso,dc=local",
                        "ldapServer": "192.0.2.12",
                        "usernameSource": "LDAP",
                    },
                },
                "encryptionSettings": {
                    "keyEncryptionKey": {
                        "keyUrl": "https://keyvault-cmk.vault.azure.net/keys/key2047/test",
                        "sourceVault": {
                            "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.KeyVault/vaults/keyvault-cmk"
                        },
                    }
                },
                "securitySettings": {
                    "accessPolicies": [
                        {
                            "accessRules": [
                                {
                                    "access": "rw",
                                    "rootSquash": False,
                                    "scope": "default",
                                    "submountAccess": True,
                                    "suid": False,
                                }
                            ],
                            "name": "default",
                        }
                    ]
                },
                "subnet": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scgroup/providers/Microsoft.Network/virtualNetworks/scvnet/subnets/sub1",
                "upgradeSettings": {"scheduledTime": "2022-04-26T18:25:43.511Z", "upgradeScheduleEnabled": True},
            },
            "sku": {"name": "Standard_2G"},
            "tags": {"Dept": "Contoso"},
        },
    ).result()
    print(response)